:root {
  --toefl-import-ink: #17352b;
  --toefl-import-muted: #6c7e77;
  --toefl-import-green: #2f755e;
  --toefl-import-green-dark: #245b49;
  --toefl-import-mint: #eaf3ee;
  --toefl-import-canvas: #f4f7f5;
  --toefl-import-line: #dce5e0;
  --toefl-import-white: #fff;
  --toefl-import-danger: #a23e3d;
}

.toefl-flash-import,
.toefl-flash-import * {
  box-sizing: border-box;
}

.toefl-flash-import {
  width: min(1060px, calc(100% - 40px));
  min-width: 0;
  margin: 0 auto;
  padding: 36px 0 112px;
  color: var(--toefl-import-ink);
}

.toefl-flash-import [hidden] {
  display: none !important;
}

.toefl-flash-import button,
.toefl-flash-import input,
.toefl-flash-import textarea,
.toefl-flash-import select {
  font: inherit;
}

.toefl-flash-import-breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--toefl-import-muted);
}

.toefl-flash-import-breadcrumb > a {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--toefl-import-line);
  border-radius: 50%;
  background: white;
}

.toefl-flash-import-breadcrumb svg {
  width: 22px;
  fill: none;
  stroke: var(--toefl-import-ink);
  stroke-width: 2;
}

.toefl-flash-import-breadcrumb span a {
  color: var(--toefl-import-muted);
  text-decoration: none;
}

.toefl-flash-import-auth:empty,
.toefl-flash-import-state:empty {
  display: none;
}

.toefl-flash-import-auth,
.toefl-flash-import-state {
  margin: 14px 0;
  padding: 13px 15px;
  border-radius: 12px;
  color: var(--toefl-import-muted);
  background: var(--toefl-import-mint);
}

.toefl-flash-import-auth button {
  margin-left: 8px;
  border: 0;
  color: white;
  background: var(--toefl-import-green);
}

.toefl-flash-import-file-heading,
.toefl-flash-import-paste-card,
.toefl-flash-import-complete {
  padding: 22px;
  border: 1px solid var(--toefl-import-line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 16px 42px rgba(30, 70, 56, .07);
}

.toefl-flash-import-file-heading {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(340px, 1.3fr);
  gap: 18px;
  align-items: stretch;
}

.toefl-flash-import label > span {
  display: block;
  margin-bottom: 8px;
  color: var(--toefl-import-muted);
  font-size: .88rem;
  font-weight: 650;
}

.toefl-flash-import input[type="text"],
.toefl-flash-import select,
.toefl-flash-import textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d6dfda;
  border-radius: 13px;
  color: var(--toefl-import-ink);
  background: #f7f9f8;
}

.toefl-flash-import input[type="text"],
.toefl-flash-import select {
  min-height: 52px;
  padding: 12px 14px;
}

.toefl-flash-import textarea {
  padding: 13px 14px;
  line-height: 1.5;
  resize: vertical;
}

.toefl-flash-import-deck-name {
  display: grid;
  align-content: start;
}

.toefl-flash-import-upload {
  position: relative;
  display: grid;
  min-height: 140px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 2px dashed #bfd0c8;
  border-radius: 17px;
  text-align: center;
  background: #f8faf9;
  cursor: pointer;
}

.toefl-flash-import-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toefl-flash-import-upload svg {
  width: 36px;
  fill: none;
  stroke: var(--toefl-import-green);
  stroke-width: 1.8;
}

.toefl-flash-import-upload small {
  color: var(--toefl-import-muted);
}

.toefl-flash-import-mapping {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--toefl-import-line);
  border-radius: 18px;
  background: white;
}

.toefl-flash-import-mapping h2 {
  margin: 0 0 14px;
}

.toefl-flash-import-mapping > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.toefl-flash-import-mapping label {
  display: grid;
  gap: 7px;
  font-weight: 750;
}

.toefl-flash-import-mapping button {
  margin-top: 14px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  color: white;
  font-weight: 800;
  background: var(--toefl-import-green);
}

.toefl-flash-import-generated {
  margin-top: 26px;
}

.toefl-flash-import-generated h1 {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 4vw, 2rem);
}

.toefl-flash-import-generated-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toefl-flash-import-generated-heading > button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--toefl-import-line);
  border-radius: 50%;
  color: var(--toefl-import-danger);
  background: white;
}

.toefl-flash-import-generated-heading svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.toefl-flash-import-card-list {
  display: grid;
  gap: 12px;
}

.toefl-flash-import-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--toefl-import-line);
  border-radius: 17px;
  background: white;
}

.toefl-flash-import-card > div {
  display: grid;
  gap: 6px;
}

.toefl-flash-import-card input,
.toefl-flash-import-card textarea {
  min-height: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.toefl-flash-import-card input {
  font-weight: 750;
}

.toefl-flash-import-card textarea {
  color: var(--toefl-import-muted);
}

.toefl-flash-import-card > button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--toefl-import-muted);
  font-size: 1.3rem;
  background: #f2f5f3;
}

.toefl-flash-import-card > small {
  grid-column: 1 / -1;
  color: #8a6729;
}

.toefl-flash-import-paste-card {
  display: grid;
  gap: 24px;
}

.toefl-flash-import-notes > span strong {
  color: var(--toefl-import-ink);
}

.toefl-flash-import-notes textarea {
  min-height: 220px;
}

.toefl-flash-import-separators {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.toefl-flash-import-separators fieldset {
  display: grid;
  grid-template-columns: repeat(3, auto) minmax(120px, 1fr);
  gap: 12px 18px;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.toefl-flash-import-separators legend {
  grid-column: 1 / -1;
  margin-bottom: 10px;
  font-size: 1.15rem;
  font-weight: 820;
}

.toefl-flash-import-separators label {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.toefl-flash-import-separators input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--toefl-import-green);
}

.toefl-flash-import-separators input[type="text"]:disabled {
  opacity: .55;
}

.toefl-flash-import-sticky-action {
  position: sticky;
  z-index: 10;
  bottom: 18px;
  margin-top: 32px;
}

.toefl-flash-import-sticky-action button {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 15px;
  color: white;
  font-weight: 850;
  background: var(--toefl-import-green);
  box-shadow: 0 12px 28px rgba(36, 91, 73, .2);
}

.toefl-flash-import-sticky-action button:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.toefl-flash-import-complete {
  text-align: center;
}

.toefl-flash-import-complete > p {
  margin: 0;
  color: var(--toefl-import-green);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.toefl-flash-import-complete h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.toefl-flash-import-complete #toefl-flash-import-result-summary {
  margin: 18px 0 26px;
  color: var(--toefl-import-muted);
}

.toefl-flash-import-complete > div:last-child {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toefl-flash-import-complete a {
  padding: 12px 18px;
  border: 1px solid var(--toefl-import-green);
  border-radius: 12px;
  color: white;
  font-weight: 800;
  text-decoration: none;
  background: var(--toefl-import-green);
}

.toefl-flash-import input:focus,
.toefl-flash-import textarea:focus,
.toefl-flash-import select:focus,
.toefl-flash-import button:focus,
.toefl-flash-import a:focus,
.toefl-flash-import input:focus-visible,
.toefl-flash-import textarea:focus-visible,
.toefl-flash-import select:focus-visible,
.toefl-flash-import button:focus-visible,
.toefl-flash-import a:focus-visible {
  outline: 2px solid var(--toefl-import-green);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .toefl-flash-import-file-heading,
  .toefl-flash-import-separators {
    grid-template-columns: 1fr;
  }

  .toefl-flash-import-separators {
    gap: 24px;
  }
}

@media (max-width: 560px) {
  .toefl-flash-import-separators fieldset {
    grid-template-columns: 1fr 1fr;
  }

  .toefl-flash-import-separators input[type="text"] {
    grid-column: 1 / -1;
  }

  .toefl-flash-import-mapping > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .toefl-flash-import {
    width: min(100% - 24px, 1060px);
    padding-top: 24px;
  }

  .toefl-flash-import-file-heading,
  .toefl-flash-import-paste-card {
    padding: 16px;
  }

  .toefl-flash-import-card {
    grid-template-columns: minmax(0, 1fr) 34px;
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toefl-flash-import * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
