/* Cloud import walkthrough, interactive 3-stage simulator, and free-plan storage strip. */
.cloud-import {
  padding-block: clamp(1rem, 2vw, 1.5rem) var(--closing-gap);
  scroll-margin-block-start: 1.5rem;
}

.cloud-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 2.35vw, 2rem);
}

.cloud-import-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.cloud-import-copy .eyebrow {
  margin-block-end: .75rem;
}

.cloud-import-copy h2 {
  margin: 0;
  font-size: clamp(1.875rem, 3.125vw, 2.75rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.045em;
}

.cloud-import-copy h2 span {
  color: var(--color-blue);
}

.cloud-import-description {
  max-width: 23em;
  margin-block-start: .75rem;
  color: var(--color-muted);
  font-size: clamp(.875rem, 1.36vw, 1.1875rem);
  line-height: 1.45;
}

.cloud-import-description strong {
  color: var(--color-ink);
  font-weight: 500;
}

.import-steps {
  --step-gap: clamp(2rem, 2.65vw, 2.5rem);
  --step-icon-size: clamp(2.25rem, 3.5vw, 3.125rem);
  --step-arrow-size: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--step-gap);
  padding: 0;
  margin: clamp(1.25rem, 2vw, 1.75rem) 0 0;
  list-style: none;
}

.import-step {
  position: relative;
  display: grid;
  grid-template-columns: var(--step-icon-size) minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  opacity: .72;
  transition: opacity .25s ease;
}

.import-step.is-active,
.import-step.is-done {
  opacity: 1;
}

.import-step[data-clickable="true"] {
  cursor: pointer;
}

.import-step-icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid #ffffffb3;
  border-radius: 30%;
  background: linear-gradient(145deg, #ffffffcf, #f1f7ff80);
  box-shadow: 0 5px 12px #547cc315;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.import-step.is-active .import-step-icon {
  border-color: #7eb3ff;
  box-shadow: 0 6px 18px #186dff29, inset 0 1px 0 #fff;
}

.import-step.is-done .import-step-icon {
  border-color: #93c0ff;
  background: linear-gradient(145deg, #ffffff, #e6f0ff);
}

.import-step-icon img,
.import-step-icon svg {
  width: 65%;
  height: 65%;
}

.import-step h3 {
  margin: .375rem 0 .25rem;
  font-size: clamp(.625rem, .98vw, .875rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.035em;
}

.import-step p {
  color: var(--color-muted);
  font-size: clamp(.5625rem, .88vw, .8125rem);
  line-height: 1.45;
}

.step-arrow {
  position: absolute;
  inset-inline-end: calc((var(--step-gap) + var(--step-arrow-size)) / -2);
  inset-block-start: calc((var(--step-icon-size) - var(--step-arrow-size)) / 2);
  width: var(--step-arrow-size);
  height: var(--step-arrow-size);
  padding: .1875rem;
  color: #7899c6;
  border-radius: 50%;
  background: #ffffffb0;
}

.import-preview {
  position: relative;
  isolation: isolate;
  min-width: 0;
}

.import-preview::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block-start: -10%;
  inset-inline-end: -12%;
  width: 150%;
  height: 112%;
  background: url("../public/assets/images/cloud-import-backdrop.svg") center / contain no-repeat;
  pointer-events: none;
}

.import-window {
  padding: 1.6em;
  border: 2px solid #ffffffc9;
  border-radius: 2em;
  background: linear-gradient(145deg, #ffffffb0, #dceeffa8);
  box-shadow: 0 12px 28px #4278cf16, inset 0 0 0 3px #ffffff65;
  font-size: clamp(.625rem, .98vw, .875rem);
}

.import-window-header {
  display: flex;
  align-items: flex-start;
  gap: 1.2em;
}

.import-cloud-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 3.2em;
  aspect-ratio: 1;
  color: #0665ff;
  border-radius: 1em;
  background: linear-gradient(145deg, #f4faff, #dbeaff);
  box-shadow: 0 4px 8px #5b86d326;
}

.import-cloud-icon svg {
  width: 75%;
  height: 75%;
}

.import-window-heading {
  flex: 1;
  min-width: 0;
}

.import-window-heading > p {
  font-size: 1.4em;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -.04em;
}

.import-window-heading > span {
  display: block;
  margin-block-start: .3em;
  color: var(--color-muted);
  font-size: .9em;
  line-height: 1.35;
}

.import-preview-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.4em;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #ffffffeb;
  color: #304976;
  border-radius: 50%;
  background: #ffffffc9;
  box-shadow: 0 3px 8px #6187c115;
  cursor: pointer;
}

.import-preview-close svg {
  width: 65%;
  height: 65%;
}

.import-window-body {
  margin-block-start: 1.2em;
}

.import-stage[hidden] {
  display: none;
}

.import-provider-list {
  min-width: 0;
  margin: 0;
  padding: 0 .9em;
  border: 1px solid #ffffffdc;
  border-radius: 1.3em;
  background: linear-gradient(130deg, #fffffff5, #f5f9ffb8);
  box-shadow: 0 6px 12px #548bd31a;
}

.import-provider {
  display: grid;
  grid-template-columns: 1.2em 2.1em minmax(0, 1fr);
  gap: 1em;
  align-items: center;
  min-height: 4.4em;
  padding-block: .7em;
  cursor: pointer;
}

.import-provider + .import-provider {
  border-block-start: 1px solid #d8e3f3;
}

.preview-radio {
  appearance: none;
  width: 1.2em;
  height: 1.2em;
  margin: 0;
  font: inherit;
  border: 1px solid #bdcce4;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.preview-radio:checked {
  border-color: #3885ff;
  background: #0871ff;
  box-shadow: inset 0 0 0 2px white;
}

.preview-radio:focus-visible {
  outline-offset: 3px;
}

.import-provider img {
  width: 2.1em;
  height: 2.1em;
  object-fit: contain;
}

.import-provider strong {
  display: block;
  font-size: 1.1em;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.035em;
}

.import-provider-description {
  display: block;
  margin-block-start: .2em;
  color: var(--color-muted);
  font-size: .9em;
  line-height: 1.3;
}

.import-preview-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.8em;
  margin-block-start: 1.2em;
  padding: 0 1.2em;
  border: 1px solid #ffffff40;
  border-radius: .9em;
  color: white;
  background: linear-gradient(180deg, #2487ff, #0050ef);
  box-shadow: inset 0 1px 1px #ffffff66, 0 5px 9px #0861ff1c;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
}

.import-preview-continue:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.import-stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75em;
  margin-block-end: .85em;
}

.import-provider-pill {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .35em .75em;
  border: 1px solid #ffffff;
  border-radius: 99px;
  background: #ffffffd9;
  font-size: .88em;
  font-weight: 600;
}

.import-provider-pill img {
  width: 1.25em;
  height: 1.25em;
  object-fit: contain;
}

.import-selection-summary {
  color: var(--color-muted);
  font-size: .88em;
  font-weight: 600;
}

.import-item-list {
  display: grid;
  padding: 0 .9em;
  border: 1px solid #ffffffdc;
  border-radius: 1.3em;
  background: linear-gradient(130deg, #fffffff5, #f5f9ffb8);
  box-shadow: 0 6px 12px #548bd31a;
}

.import-item {
  display: grid;
  grid-template-columns: 1.25em minmax(0, 1fr) auto;
  gap: .85em;
  align-items: center;
  min-height: 3.9em;
  padding-block: .55em;
  cursor: pointer;
}

.import-item + .import-item {
  border-block-start: 1px solid #d8e3f3;
}

.preview-check {
  appearance: none;
  display: grid;
  place-items: center;
  width: 1.25em;
  height: 1.25em;
  margin: 0;
  border: 1px solid #b5c6e2;
  border-radius: .35em;
  background: white;
  cursor: pointer;
}

.preview-check:checked {
  border-color: #1672ff;
  background: #086bff;
}

.preview-check:checked::before {
  content: "";
  width: .55em;
  height: .3em;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: translateY(-.06em) rotate(-45deg);
}

.import-item-info strong {
  display: block;
  font-size: 1.02em;
  font-weight: 650;
  letter-spacing: -.02em;
}

.import-item-info span {
  display: block;
  color: var(--color-muted);
  font-size: .85em;
}

.import-item-size {
  color: var(--color-muted);
  font-size: .86em;
  font-weight: 600;
  white-space: nowrap;
}

.import-stage-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .75em;
  margin-block-start: 1.2em;
}

.import-stage-actions .import-preview-continue {
  margin-block-start: 0;
}

.import-preview-back {
  min-height: 2.8em;
  padding: 0 1.2em;
  border: 1px solid #ffffffed;
  border-radius: .9em;
  color: var(--color-ink);
  background: #ffffffcc;
  font-size: 1.05em;
  font-weight: 600;
  cursor: pointer;
}

.import-progress-box {
  padding: 1em 1.1em;
  border: 1px solid #ffffffdc;
  border-radius: 1.3em;
  background: linear-gradient(130deg, #fffffff5, #f5f9ffb8);
  box-shadow: 0 6px 12px #548bd31a;
}

.import-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75em;
  font-size: .95em;
  font-weight: 600;
}

.import-progress-head strong {
  color: var(--color-blue);
  font-variant-numeric: tabular-nums;
}

.import-progress-track {
  height: .55em;
  margin-block-start: .75em;
  border-radius: 99px;
  background: #dfeaff;
  overflow: hidden;
}

.import-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2487ff, #0050ef);
}

.import-done-list {
  display: grid;
  gap: .55em;
  list-style: none;
  padding: 0;
  margin: .9em 0 0;
}

.import-done-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75em;
  padding: .7em .95em;
  border: 1px solid #ffffff;
  border-radius: 1em;
  background: #ffffffdc;
  font-size: .95em;
  font-weight: 600;
}

.import-done-chip span:last-child {
  color: #057a55;
  font-size: .88em;
}

.free-plan {
  display: grid;
  grid-template-columns: 31% minmax(0, 41%) minmax(0, 28%);
  align-items: center;
  min-height: clamp(7.5rem, 11.72vw, 10.5rem);
  margin-block-start: clamp(2rem, 3.125vw, 3rem);
  margin-inline: -1.5rem;
  padding-block: 1rem;
  border: 1px solid #ffffffed;
  border-radius: var(--radius-panel);
  background: linear-gradient(120deg, #ffffffa6, #edf4ff75);
  box-shadow: inset 0 1px 0 white, 0 10px 24px #376ab516;
}

.free-plan-art {
  display: grid;
  place-items: center;
  align-content: center;
  align-self: center;
  height: clamp(5rem, 7.8vw, 7rem);
  border-inline-end: 1px solid #b7cdeb;
}

.free-plan-art img {
  width: clamp(9rem, 16vw, 14rem);
  height: auto;
  margin-block: -.75rem;
}

.free-plan-copy {
  min-width: 0;
  padding-inline: clamp(1.5rem, 4.4vw, 4rem) .5rem;
}

.free-plan-copy h3 {
  margin: 0 0 .25rem;
  font-size: clamp(1.5rem, 2.35vw, 2.125rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.045em;
}

.free-plan-copy p {
  color: var(--color-muted);
  font-size: clamp(1rem, 1.56vw, 1.375rem);
  line-height: 1.45;
}

.storage-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-inline: 1rem clamp(1.5rem, 4.6vw, 4rem);
  padding: .75rem;
  border: 1px solid #ffffffe8;
  border-radius: 1.5rem;
  background: linear-gradient(130deg, #ffffffb5, #e8f0ff8c);
  box-shadow: 0 8px 16px #4e7cc91c;
}

.storage-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: clamp(2.5rem, 4.4vw, 3.5rem);
  aspect-ratio: 1;
  color: #0665ff;
  border-radius: 30%;
  background: linear-gradient(145deg, #ebf3ff, #dce9ff);
  box-shadow: 0 4px 8px #6589c619;
}

.storage-icon svg {
  width: 60%;
  height: 60%;
}

.storage-meta {
  min-width: 0;
}

.storage-badge strong {
  display: block;
  white-space: nowrap;
  font-size: clamp(1.5rem, 2.35vw, 2.125rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}

.storage-meta > span:not(.storage-meter) {
  display: block;
  margin-block-start: .125rem;
  color: var(--color-muted);
  font-size: clamp(.75rem, 1.17vw, 1rem);
  line-height: 1.4;
}

.storage-meter {
  display: block;
  height: 4px;
  margin-block-start: .375rem;
  border-radius: 99px;
  background: #dbe7fc;
  overflow: hidden;
}

.storage-meter-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2487ff, #0050ef);
}

@media (hover: hover) {
  .import-preview-continue:not(:disabled):hover {
    background: linear-gradient(180deg, #177aff, var(--color-blue-dark));
  }

  .import-preview-back:hover,
  .import-preview-close:hover {
    background: #ffffff;
  }
}

@media (max-width: 900px) {
  .cloud-import-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .cloud-import-copy {
    width: 100%;
    max-width: 38rem;
    margin-inline: auto;
    text-align: center;
  }

  .cloud-import-copy h2 {
    font-size: clamp(2rem, 5.5vw, 2.75rem);
  }

  .cloud-import-description {
    max-width: 32rem;
    margin-inline: auto;
    font-size: 1rem;
  }

  .import-steps {
    margin-block-start: 1.5rem;
    text-align: start;
  }

  .import-step h3 {
    font-size: .75rem;
  }

  .import-step p {
    font-size: .6875rem;
  }

  .import-preview {
    width: 100%;
    max-width: 36rem;
    margin-inline: auto;
  }

  .import-preview::before {
    inset-inline-end: -5%;
    width: 125%;
  }

  .import-window {
    font-size: clamp(.625rem, 1.65vw, .875rem);
  }

  .free-plan {
    grid-template-columns: 24% minmax(0, 1fr) auto;
    gap: 1.25rem;
    margin-inline: 0;
    padding: 1.25rem;
  }

  .free-plan-art {
    height: auto;
    padding-inline-end: 1rem;
  }

  .free-plan-art img {
    width: 100%;
    margin: 0;
  }

  .free-plan-copy {
    padding: 0;
  }

  .free-plan-copy p {
    font-size: 1rem;
  }

  .plan-line-break {
    display: none;
  }

  .storage-badge {
    margin: 0;
  }
}

@media (max-width: 760px) {
  .free-plan {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1.5rem;
    text-align: center;
  }

  .free-plan-art {
    border: 0;
    padding: 0;
  }

  .free-plan-art img {
    width: 10rem;
  }

  .free-plan-copy {
    max-width: 25rem;
    margin-inline: auto;
  }

  .storage-badge {
    justify-self: center;
    min-width: 12rem;
    text-align: start;
  }
}

@media (max-width: 580px) {
  .cloud-import-copy h2 {
    font-size: clamp(1.75rem, 7.3vw, 2.125rem);
  }

  .import-steps {
    --step-gap: 2rem;
    --step-icon-size: 2.5rem;
    grid-template-columns: minmax(0, 1fr);
    max-width: 19rem;
    margin-inline: auto;
  }

  .import-step {
    gap: 1rem;
  }

  .import-step h3 {
    margin-block-start: .125rem;
    font-size: .875rem;
  }

  .import-step p {
    font-size: .75rem;
  }

  .step-arrow {
    inset-inline-end: auto;
    inset-inline-start: calc((var(--step-icon-size) - var(--step-arrow-size)) / 2);
    inset-block-start: calc(100% + (var(--step-gap) - var(--step-arrow-size)) / 2);
    transform: rotate(90deg);
  }

  .import-preview::before {
    inset-inline-end: 0;
    width: 110%;
  }

  .free-plan {
    margin-block-start: 2rem;
  }
}

@media (forced-colors: active) {
  .import-window,
  .import-provider-list,
  .import-item-list,
  .import-progress-box,
  .import-done-chip,
  .import-preview-continue,
  .import-preview-back,
  .import-preview-close,
  .free-plan,
  .storage-badge,
  .import-step-icon {
    border-color: CanvasText;
  }

  .preview-radio,
  .preview-check {
    appearance: auto;
    box-shadow: none;
  }
}
