/* Sign-in pages: the left pane's illustrated slides (markup in _AuthSlides.cshtml, behaviour in auth-slides.js).
   The pane is a panel in the accent colour itself (running a little deeper towards the bottom) with a cream shape behind the artwork. Everything here uses the accent
   ramp (--violet-*), so the teal accent recolours it; the pane looks the same in light and dark mode, like the ink cards. */

.auth2-art.as {
    --as-a: var(--violet-600);
    --as-a2: var(--violet-400);
    --as-a3: var(--violet-200);
    --as-a4: var(--violet-100);
    --as-ink: #14121F;
    --as-ink2: #2A2740;
    --as-dur: 6.5s;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    justify-content: flex-start;
    gap: 18px;
    padding: 28px 36px 30px;
    color: #fff;
    background:
        radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--violet-400) 55%, transparent), transparent 62%),
        linear-gradient(160deg, var(--violet-600) 0%, var(--violet-700) 52%, var(--violet-800) 100%);
}

/* ---- Stage: the cream shape and the scenes stacked on it ---- */
.as-stage { flex: 1; min-height: 0; display: grid; place-items: center; }
.as-frame { position: relative; width: min(100%, 470px); aspect-ratio: 420 / 340; }

.as-blob {
    position: absolute;
    inset: 3% 5%;
    background: #F5F1E8;
    border-radius: 58% 42% 46% 54% / 50% 46% 54% 50%;
    transition: border-radius 1.2s cubic-bezier(.45, .05, .2, 1), transform 1.2s cubic-bezier(.45, .05, .2, 1);
    will-change: border-radius, transform;
}
.as[data-active="1"] .as-blob { border-radius: 44% 56% 52% 48% / 56% 42% 58% 44%; transform: rotate(5deg) scale(1.02); }
.as[data-active="2"] .as-blob { border-radius: 52% 48% 40% 60% / 44% 54% 46% 56%; transform: rotate(-4deg) scale(.99); }
.as[data-active="3"] .as-blob { border-radius: 46% 54% 58% 42% / 54% 50% 50% 46%; transform: rotate(3deg) scale(1.03); }

.as-scene {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(30px, 0, 0) scale(.97);
    transition: opacity .5s ease, transform .85s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .5s;
}
    .as-scene svg { display: block; width: 100%; height: 100%; overflow: visible; font-family: var(--font); }
    .as-scene.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: .1s, .1s, 0s; }
    /* The slide going out leaves to the left; the class is taken off once it is hidden, so it next comes in from the right. */
    .as-scene.is-leaving { transform: translate3d(-30px, 0, 0) scale(.97); }

/* Parts arrive one after another, then some drift a little while the slide is up. */
.as-scene .in, .as-scene .fl, .as-scene .tg-knob, .as-scene .bar, .as-scene .pulse, .as-scene .now { transform-box: fill-box; transform-origin: center; }
.as-scene .in { opacity: 0; transform: translateY(18px) scale(.95); transition: opacity .35s ease, transform .35s ease; }
.as-scene.is-active .in { opacity: 1; transform: none; transition: opacity .55s ease, transform .9s cubic-bezier(.22, 1, .36, 1); transition-delay: calc(.2s + var(--i, 0) * 80ms); }
.as-scene.is-active .fl { animation: as-float var(--fd, 6s) ease-in-out var(--fdl, 0s) infinite; }
.as-scene .sh { filter: drop-shadow(0 12px 14px rgba(20, 18, 31, .14)); }

@keyframes as-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---- Artwork colours ---- */
.as-scene .p { fill: #fff; }
.as-scene .p2 { fill: #F3F0F8; }
.as-scene .ln { fill: #E7E3EF; }
.as-scene .ln2 { fill: #D3CDE2; }
.as-scene .ink { fill: var(--as-ink); }
.as-scene .ink2 { fill: var(--as-ink2); }
.as-scene .a { fill: var(--as-a); }
.as-scene .a2 { fill: var(--as-a2); }
.as-scene .a3 { fill: var(--as-a3); }
.as-scene .a4 { fill: var(--as-a4); }
.as-scene .lime { fill: var(--lime-400); }
.as-scene .ok { fill: #1C8B57; }
.as-scene .ok-soft { fill: #DDF3E6; }
.as-scene .warn { fill: #D98A0B; }
.as-scene .warn-soft { fill: #FFEFD0; }
.as-scene .danger { fill: #E5484D; }
.as-scene .danger-soft { fill: #FDE4E3; }
.as-scene .t-ok { fill: #0F6A3E; }
.as-scene .t-ink { fill: var(--as-ink); }
.as-scene .t-ink2 { fill: #4B4859; }
.as-scene .t-a { fill: var(--violet-700); }
.as-scene .t-danger { fill: #AE2020; }
.as-scene [class^="s-"], .as-scene [class*=" s-"] { stroke-linecap: round; stroke-linejoin: round; }
.as-scene .s-a, .as-scene .s-a2, .as-scene .s-a3, .as-scene .s-ln, .as-scene .s-ln2, .as-scene .s-ink, .as-scene .s-ok, .as-scene .s-warn, .as-scene .s-lime { fill: none; }
.as-scene .s-a, .as-scene .s-a-on { stroke: var(--as-a); }
.as-scene .s-a2 { stroke: var(--as-a2); }
.as-scene .s-a3 { stroke: var(--as-a3); }
.as-scene .s-ln { stroke: #E7E3EF; }
.as-scene .s-ln2, .as-scene .s-ln2-on { stroke: #D3CDE2; }
.as-scene .s-ink { stroke: var(--as-ink); }
.as-scene .s-ok { stroke: #1C8B57; }
.as-scene .s-warn { stroke: #D98A0B; }
.as-scene .s-lime { stroke: var(--lime-400); }

/* ---- Small moving details, running only while their slide is up ---- */
/* Consent: the second choice switches on. */
.as-scene .tg-track { fill: #D3CDE2; }
.as-scene.is-active .tg-track { animation: as-track .45s ease 1.5s both; }
.as-scene.is-active .tg-knob { animation: as-knob .5s cubic-bezier(.3, 1.4, .5, 1) 1.5s both; }
@keyframes as-track { to { fill: var(--as-a); } }
@keyframes as-knob { to { transform: translateX(15px); } }

/* Rights: the progress line draws to the current step, the ring fills to the days left, the current step breathes. */
.as-scene .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.as-scene.is-active .draw { animation: as-draw 1s cubic-bezier(.3, .7, .2, 1) .7s both; }
@keyframes as-draw { to { stroke-dashoffset: 0; } }
.as-scene .ring { stroke-dasharray: 100; stroke-dashoffset: 100; }
.as-scene.is-active .ring { animation: as-ring 1.4s cubic-bezier(.3, .7, .2, 1) .8s both; }
@keyframes as-ring { to { stroke-dashoffset: 34; } }
.as-scene.is-active .now { animation: as-now 2.2s ease-in-out 1.6s infinite; }
@keyframes as-now { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* Dashed routes flow towards where they lead. */
.as-scene .flow { stroke-dasharray: 3 9; }
.as-scene.is-active .flow { animation: as-flow 1.6s linear infinite; }
@keyframes as-flow { to { stroke-dashoffset: -24; } }

/* Breaches: a ring pulses out from the shield and the notice clock's bar fills. */
.as-scene.is-active .pulse { animation: as-pulse 3s ease-out infinite; }
@keyframes as-pulse { 0% { transform: scale(.72); opacity: .9; } 100% { transform: scale(1.22); opacity: 0; } }
.as-scene .bar { transform-origin: left center; transform: scaleX(0); }
.as-scene.is-active .bar { animation: as-bar 1.3s cubic-bezier(.3, .7, .2, 1) .9s both; }
@keyframes as-bar { to { transform: scaleX(1); } }

/* ---- Headline and sentence: stacked in one cell so the pane never changes height ---- */
.as-copy { display: grid; }
.as-text { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s; }
    .as-text.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .6s ease .25s, transform .8s cubic-bezier(.22, 1, .36, 1) .25s, visibility 0s; }
.as .auth2-headline { max-width: 20ch; font-size: 28px; color: #fff; }
.as .as-text p { margin: 10px 0 0; max-width: 40ch; font-size: calc(15px * var(--ts)); line-height: 1.55; color: rgba(255, 255, 255, .74); }

/* ---- Dots: the current one is a bar that fills as its slide plays; when it is full the next slide comes in ---- */
.as-dots { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.as-dot { position: relative; width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; transition: width .5s cubic-bezier(.22, 1, .36, 1); }
    .as-dot::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .28); transition: background-color .2s; }
    .as-dot:hover::before { background: rgba(255, 255, 255, .5); }
    .as-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
    .as-dot.is-active { width: 44px; }
.as-fill { position: absolute; left: 0; right: 0; top: 8px; height: 6px; border-radius: 3px; background: var(--lime-400); transform: scaleX(0); transform-origin: left center; }
.as-dot.is-active .as-fill { animation: as-fill var(--as-dur) linear forwards; }
.as.is-paused .as-dot.is-active .as-fill { animation-play-state: paused; }
@keyframes as-fill { to { transform: scaleX(1); } }

/* Less motion: no auto-play and no drifting; slides change with a plain fade when a dot is pressed. */
@media (prefers-reduced-motion: reduce) {
    .as-blob { transition: none; }
    .as-scene, .as-scene.is-leaving { transform: none; transition: opacity .2s linear, visibility 0s linear .2s; }
    .as-scene.is-active { transition-delay: 0s; }
    .as-scene .in, .as-scene.is-active .in { opacity: 1; transform: none; transition: none; }
    .as-scene.is-active .fl, .as-scene.is-active .pulse, .as-scene.is-active .now, .as-scene.is-active .flow { animation: none; }
    .as-scene.is-active .tg-track, .as-scene.is-active .tg-knob, .as-scene.is-active .draw, .as-scene.is-active .ring, .as-scene.is-active .bar { animation-duration: .01s; animation-delay: 0s; }
    .as-text, .as-text.is-active { transform: none; transition: opacity .2s linear, visibility 0s; }
    .as-dot.is-active .as-fill { animation: none; transform: scaleX(1); }
}

/* ---- Form side ---- */
/* The logo row is as wide as the form and centred like it, so the logo starts on the form's left edge and the settings
   button ends on its right edge. */
.auth2-top { width: 100%; max-width: 380px; margin-inline: auto; }
/* The settings button is pulled out by its own padding, so the icon itself (not the button's empty edge) ends on the form's right edge. */
.auth2-top .ui-settings { margin-right: -12px; }
/* The footer line shares that column and starts on the same left edge as the logo and the form. */
.auth2-foot { width: 100%; max-width: 380px; margin-inline: auto; text-align: left; }
/* The tagline sits under the name, as in the sidebar. */
.auth2-logo .brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.auth2-logo .brand-sub { align-self: auto; margin: 0; padding: 0; line-height: 1.2; white-space: nowrap; }
/* Tablet and phone, where only the form shows: it sits in the middle of the space under the logo. */
@media (max-width: 860px) {
    .auth2-form { margin-block: auto; }
}
