/* Motion + wizard styles for the sign-in / request pages */

/* ---------- entrance: staggered fade-up of the form column, gentle slide-in of the brand panel ---------- */
.reveal-seq > * { opacity: 0; animation: rvIn .6s cubic-bezier(.2, .8, .2, 1) forwards; }
.reveal-seq > *:nth-child(1) { animation-delay: .05s; } .reveal-seq > *:nth-child(2) { animation-delay: .11s; }
.reveal-seq > *:nth-child(3) { animation-delay: .17s; } .reveal-seq > *:nth-child(4) { animation-delay: .23s; }
.reveal-seq > *:nth-child(5) { animation-delay: .29s; } .reveal-seq > *:nth-child(6) { animation-delay: .35s; }
.reveal-seq > *:nth-child(n+7) { animation-delay: .41s; }
.split-form .sf-top, .split-form .legal { animation: fadeIn .8s ease .1s both; }
.split-art .art-inner { animation: artWrap 1s cubic-bezier(.2, .8, .2, 1) both; }
.anim-in { animation: popIn .34s cubic-bezier(.2, .8, .2, 1) both; }       /* things that appear when toggled (e.g. the name field) */
.swap { animation: swapIn .38s cubic-bezier(.2, .8, .2, 1) both; }          /* heading/lead text that changes */
@keyframes rvIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes artWrap { from { opacity: 0; transform: translateX(26px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- smooth page-to-page transition between sign-in and request (the brand panel stays put) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .split-art { view-transition-name: art; }
  .split-form .sf-main { view-transition-name: formmain; }
  ::view-transition-old(formmain) { animation: vtOut .2s ease both; }
  ::view-transition-new(formmain) { animation: vtIn .4s cubic-bezier(.2, .8, .2, 1) both; }
  ::view-transition-group(art) { animation-duration: .45s; }
}
@keyframes vtOut { to { opacity: 0; transform: translateX(-16px); } }
@keyframes vtIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* ---------- wizard ---------- */
.wz-meta { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); margin-bottom: 8px; letter-spacing: .01em; }
.wz-meta b { color: #cfd0da; font-weight: 600; }
.wz-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 22px; }
.wz-bar i { height: 3px; border-radius: 3px; background: var(--line-strong); position: relative; overflow: hidden; }
.wz-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #3f86ff, var(--brand)); transform: scaleX(0); transform-origin: left; transition: transform .55s cubic-bezier(.2, .8, .2, 1); }
.wz-bar i.on::after, .wz-bar i.done::after { transform: scaleX(1); }
.step-pane.in-next { animation: stepNext .42s cubic-bezier(.2, .8, .2, 1) both; }
.step-pane.in-prev { animation: stepPrev .42s cubic-bezier(.2, .8, .2, 1) both; }
.step-pane.leaving { opacity: 0; transform: translateX(-18px); transition: opacity .16s ease, transform .16s ease; }
.step-pane.leaving.back { transform: translateX(18px); }
@keyframes stepNext { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes stepPrev { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
.wz-actions { display: flex; gap: 10px; margin-top: 4px; }
.wz-actions .btn { flex: 1; }
.wz-actions .btn.back { flex: 0 0 auto; padding-left: 16px; padding-right: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
input.invalid, select.invalid, .dial-btn.invalid { border-color: var(--bad) !important; box-shadow: 0 0 0 3px rgba(248,113,113,.15) !important; }

/* selects + textareas match the compact inputs */
.compact select, .compact textarea { width: 100%; background-color: #000; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: .92rem; transition: border-color .15s, box-shadow .15s; }
.compact select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5l4 4 4-4' fill='none' stroke='%238e8e99' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.compact select:hover, .compact textarea:hover { border-color: var(--line-strong); }
.compact select:focus, .compact textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,88,255,.25); }
.compact select:invalid { color: #55555f; }
.compact input[type=date], .compact input[type=tel] { width: 100%; padding: 9px 11px; font-size: .92rem; border-radius: 8px; }

/* segmented control */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; font-weight: 550; color: #c9c9d3; background: #000; transition: .15s; }
.seg label:hover span { border-color: var(--line-strong); }
.seg input:checked + span { background: var(--brand-soft); border-color: rgba(0,88,255,.6); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* phone input with searchable country codes */
.phone-row { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.dial { position: relative; }
.dial-btn { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 10px; background: #000; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .9rem; cursor: pointer; transition: border-color .15s; }
.dial-btn:hover { border-color: var(--line-strong); }
.dial-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.dial-flag { font-size: 1.05rem; line-height: 1; } .dial-code { font-variant-numeric: tabular-nums; } .dial-caret { opacity: .55; font-size: .8rem; }
.dial-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(300px, 78vw); background: #0c0c0e; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 44px -8px rgba(0,0,0,.9); padding: 8px; animation: popIn .18s ease both; }
.dial-search { width: 100%; padding: 8px 10px; font-size: .88rem; border-radius: 8px; margin-bottom: 6px; }
.dial-list { list-style: none; margin: 0; padding: 0; max-height: 236px; overflow: auto; }
.dial-list li { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: .88rem; }
.dial-list li .f { width: 20px; text-align: center; } .dial-list li .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dial-list li .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.dial-list li.hi, .dial-list li:hover { background: var(--raised); } .dial-list li.sel .n { color: #6ea4ff; font-weight: 600; }

/* success */
.tick { width: 48px; height: 48px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin-bottom: 16px; font-size: 1.4rem; position: relative; animation: tickPop .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.tick::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(52,211,153,.5); animation: tickRing 1.4s ease-out .3s both; }
@keyframes tickPop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tickRing { from { transform: scale(.8); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .reveal-seq > * { opacity: 1; animation: none; }
  .split-form .sf-top, .split-form .legal, .split-art .art-inner, .anim-in, .swap, .step-pane.in-next, .step-pane.in-prev, .tick, .tick::after, .dial-pop { animation: none; }
  .wz-bar i::after { transition: none; } .step-pane.leaving { transition: none; }
}

/* single-element entrance (used where a staggered list isn't practical) */
.rv { opacity: 0; animation: rvIn .6s cubic-bezier(.2, .8, .2, 1) forwards; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; animation: none; } }

.phone-row > .dial { height: 100%; } .phone-row .dial-btn { height: 100%; min-height: 38px; }

/* tel / date / list inputs get the same dark style as text inputs */
.compact input[type=tel], .compact input[type=date], .compact input[list] { background: #000; color: var(--ink); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; font: inherit; font-size: .92rem; }
.compact input[type=tel]:hover, .compact input[type=date]:hover, .compact input[list]:hover { border-color: var(--line-strong); }
.compact input[type=tel]:focus, .compact input[type=date]:focus, .compact input[list]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,88,255,.25); }
.compact input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.7); cursor: pointer; }
/* keep the open country picker above the buttons below it */
.step-pane { position: relative; z-index: 3; }
.wz-actions, #signinLink { position: relative; z-index: 1; }
.dial-pop.up { top: auto; bottom: calc(100% + 6px); }

/* ---------- styled dropdowns (same look as the country-code picker) ---------- */
.dd { position: relative; }
.dd-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; min-height: 38px; background: #000; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .92rem; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dd-btn:hover { border-color: var(--line-strong); }
.dd-btn:focus-visible, .dd-btn[aria-expanded=true] { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,88,255,.25); }
.dd-btn.invalid { border-color: var(--bad) !important; box-shadow: 0 0 0 3px rgba(248,113,113,.15) !important; }
.dd-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dd-val.ph { color: #55555f; }
.dd-caret { opacity: .55; font-size: .8rem; flex: none; transition: transform .2s; } .dd-btn[aria-expanded=true] .dd-caret { transform: rotate(180deg); }
.dd-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; min-width: 0; background: #0c0c0e; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 44px -8px rgba(0,0,0,.9); padding: 6px; animation: popIn .18s ease both; transform-origin: top; }
.dd-pop.up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom; }
.dd-list { list-style: none; margin: 0; padding: 0; overflow: auto; }
.dd-list li { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 7px; cursor: pointer; font-size: .9rem; }
.dd-list li .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-list li .ck { opacity: 0; color: #6ea4ff; font-weight: 700; }
.dd-list li.sel .n { color: #6ea4ff; font-weight: 600; } .dd-list li.sel .ck { opacity: 1; }
.dd-list li.hi, .dd-list li:hover { background: var(--raised); }
@media (prefers-reduced-motion: reduce) { .dd-pop { animation: none; } .dd-caret { transition: none; } }

/* a little more air between the rows of inputs in the wizard */
.step-pane .stack > * + * { margin-top: 18px; }
.step-pane .two { gap: 12px; }
.step-pane .lead { margin-bottom: 22px; }

.dd-caret svg, .dial-caret svg { display: block; }

/* ---------- date picker (vanilla-calendar-pro), themed to match ---------- */
.date-wrap { position: relative; }
.date-wrap input { cursor: pointer; padding-right: 36px; }
.date-wrap svg { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
[data-vc-theme=dark].vc {
  --vc-bg: #0c0c0e; --vc-color: #f1f1f5; --vc-focus-outline-color: #0058ff;
  --vc-date-color: #e4e4ec; --vc-date-hover-bg: #1a1a21; --vc-date-bg-hover: #1a1a21;
  --vc-date-selected-bg: #0058ff; --vc-date-selected-color: #fff; --vc-date-weekend-selected-bg: #0058ff; --vc-date-weekend-selected-color: #fff;
  --vc-date-today-color: #6ea4ff; --vc-date-weekend-today-color: #6ea4ff; --vc-date-weekend-color: #e4e4ec; --vc-date-weekend-hover-bg: #1a1a21; --vc-date-weekend-bg-hover: #1a1a21;
  --vc-date-outside-color: #4a4a55; --vc-date-weekend-outside-color: #4a4a55; --vc-date-disabled-color: #3a3a44; --vc-date-weekend-disabled-color: #3a3a44;
  --vc-week-day-color: #8e8e99; --vc-week-day-off-color: #8e8e99; --vc-header-color: #f1f1f5; --vc-title-color: #f1f1f5; --vc-title-color-hover: #6ea4ff;
  --vc-months-years-bg: #0c0c0e; --vc-months-years-bg-hover: #1a1a21; --vc-months-years-bg-selected: #0058ff; --vc-months-years-color: #e4e4ec; --vc-months-years-color-selected: #fff;
  border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 22px 54px -10px rgba(0,0,0,.92); font-family: inherit; z-index: 80;
}
