.import-panel {
  position: relative;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line, #cfd7e6);
  border-radius: .5rem;
  background: #fff;
  font-size: 16px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.import-panel p {
  margin: .5rem 0;
  font-size: inherit;
  line-height: inherit;
}

.import-panel [data-import-status]:empty {
  margin: 0;
}

.import-panel label.button {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.import-panel:has(.import-close:not([hidden])) > label.button {
  max-width: calc(100% - 48px);
}

.import-panel label.button input[type=file] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.import-panel label.button:focus-within {
  outline: 3px solid var(--accent, #193e9c);
  outline-offset: 2px;
}

body .import-panel button.import-close[data-import=close]:not([hidden]) {
  position: absolute;
  top: .5rem;
  right: .5rem;
}

body .import-panel button.import-close[data-import=close]:not([hidden]),
body .fssp-import .fssp-import-head button.import-close:not([hidden]) {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.import-panel .import-close[hidden] {
  display: none;
}

body .import-panel button[data-handoff-open][hidden] {
  display: none;
}

body .import-panel button.import-close[data-import=close]:not([hidden]):hover,
body .fssp-import .fssp-import-head button.import-close:not([hidden]):hover {
  background: transparent;
  color: #fff;
}

.import-close svg {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 3px;
  background: #b52d30;
  color: #fff;
}

.import-close:hover svg {
  background: #922126;
}

.import-close:focus-visible {
  outline: 3px solid var(--accent, #193e9c);
  outline-offset: 2px;
}

.import-field,
.import-panel [data-import-review-box]:not(:empty) {
  margin: .5rem 0;
}

body .import-panel :is(.import-field, [data-import-review-box]) > label:has(> input[type=checkbox]) {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid var(--line, #cfd7e6);
  border-radius: .4rem;
  background: #f7f9fc !important;
  --active-button-ink: #182238;
  --active-button-hover-ink: #182238;
  color: #182238;
  box-shadow: none;
  font-size: 16px;
  line-height: 20px;
  cursor: pointer;
}

body .import-panel :is(.import-field, [data-import-review-box]) > label:has(> input[type=checkbox]):hover {
  background: #f0f4fa !important;
  color: #182238;
}

body .import-panel :is(.import-field, [data-import-review-box]) > label:has(> input[type=checkbox]) :is(span, strong, small, b) {
  color: #182238;
}

body .import-panel :is(.import-field, [data-import-review-box]) > label > input[type=checkbox] {
  flex: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  padding: 0;
}

.import-panel label > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.import-panel .import-field details {
  margin: .15rem 0 .4rem;
  padding: 0;
  border: 0;
}

body .import-panel .import-field details > summary {
  min-height: 0;
  margin: 0;
  padding: 3px 2px;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.import-panel .import-field details p {
  margin: .35rem 0;
}

.import-field img {
  max-width: 100%;
  height: auto;
}

body .import-panel button.import-apply[data-import=apply] {
  --active-button-face: var(--blue-button-face);
  --active-button-rim: var(--blue-button-rim);
  --active-button-ink: #fff;
  --active-button-hover-ink: #fff;
}

@media (max-width: 600px) {
  body .import-panel button.import-apply[data-import=apply] {
    width: 100%;
    min-height: 44px;
    margin-inline: 0;
    padding: 8px 10px;
    font-size: .875rem;
    line-height: 1.25;
    white-space: nowrap;
  }
}
.photo-controls { margin: .75rem 0; min-width: 0; }
.photo-controls canvas { display: block; max-width: 100%; max-height: 220px; width: auto; height: auto; margin-bottom: .5rem; }
.photo-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.photo-actions button { min-height: 44px; margin: 0; border-radius: .5rem; white-space: normal; }
@media (max-width: 480px) { .photo-actions { display: grid; grid-template-columns: 1fr; } .photo-actions button { width: 100%; } }

.fssp-photo-nav.photo-actions {
  display: flex;
  flex-wrap: nowrap;
}

.fssp-photo-nav button {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 480px) {
  .fssp-photo-actions.photo-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fssp-photo-nav.photo-actions button,
  .fssp-photo-actions.photo-actions button {
    min-width: 0;
    padding: 6px;
    font-size: .8125rem;
    line-height: 1.25;
  }

  .fssp-photo-actions [data-photo-retry],
  .fssp-photo-actions:has([data-fssp-add-page]) [data-fssp-remove-page] {
    grid-column: 1 / -1;
  }
}

body .import-panel button.import-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 176px);
  min-height: 44px;
  margin: 8px 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .875rem;
  line-height: 1.2;
}
.import-fragment { max-width: 100%; overflow: auto; }
.import-fragment canvas { display: block; max-width: 100%; height: auto; border: 2px solid #e12424; }
.import-fragment.is-enlarged canvas { width: 200%; max-width: none; }
