/* =====================================================
   AUTH DEMO LAYER  —  auth-demo.css
   Namespace: adl- (auth demo layer)
   
   Depends on: design-tokens.css, base.css, auth.css
   Adds:       two-column auth layout + embedded demo
               panel styles + mobile slide-up panel
   Does NOT:   override existing auth-screen, input-field,
               primary-btn, secondary-btn, or logo-text rules
   ===================================================== */

/* =====================================================
   LAYOUT: two-column wrapper
   - Auth col = left, fills min content
   - Demo col = right, fills remaining space
   - Below 960 px: stacks, demo col hidden (mobile panel handles it)
   ===================================================== */

.adl-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--color-app-bg, #F5F5F5);
}

[data-theme="dark"] .adl-layout {
    background: var(--color-app-bg, #0A0A0A);
}

/* Auth column — no width constraint, uses natural auth-screen sizing */
.adl-auth-col {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 380px;
    max-width: 520px;
    width: 42%;
    min-height: 100vh;
    z-index: 2;
    background: var(--bg-primary, #ffffff);
    box-shadow: 1px 0 0 var(--color-border-light, rgba(0,0,0,0.08));
}

[data-theme="dark"] .adl-auth-col {
    background: var(--bg-primary, #000000);
    box-shadow: 1px 0 0 var(--color-border-light, rgba(255,255,255,0.08));
}

/* Suppress the auth-screen min-height when inside adl-layout — let col handle it */
.adl-auth-col .auth-screen {
    min-height: unset;
    width: 100%;
    padding: 2.5rem 2rem;
    background: transparent;
}

/* Demo column */
.adl-demo-col {
    flex: 1 1 0%;
    display: none; /* shown via media query below */
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem 3rem 3rem;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Subtle texture on demo col */
.adl-demo-col::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 65% 40%, rgba(0,0,0,0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="dark"] .adl-demo-col::before {
    background:
        radial-gradient(ellipse 70% 55% at 65% 40%, rgba(255,255,255,0.025) 0%, transparent 70%);
}

.adl-demo-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* =====================================================
   DESKTOP DEMO HEADER
   ===================================================== */

.adl-demo-header {
    padding: 0 0 0.25rem;
}

.adl-demo-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-tertiary, #888);
    margin-bottom: 0.45rem;
}

.adl-demo-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-text-primary, #111);
    margin: 0 0 0.3rem;
    line-height: 1.2;
}

.adl-demo-sub {
    font-size: 0.82rem;
    color: var(--color-text-tertiary, #888);
    line-height: 1.55;
    margin: 0;
}

/* =====================================================
   DEMO SHELL (shared by desktop panel + mobile panel)
   ===================================================== */

.adl-shell {
    background: var(--color-surface-1, #FAFAFA);
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: var(--radius-xl, 24px);
    box-shadow: var(--shadow-s3, 0 12px 32px rgba(0,0,0,0.08));
    overflow: hidden;
}

[data-theme="dark"] .adl-shell {
    background: var(--color-surface-1, #121212);
    border-color: var(--color-border-light, rgba(255,255,255,0.08));
}

/* ---- Progress rail ---- */
.adl-progress-rail {
    display: flex;
    gap: 3px;
    padding: 1rem 1.25rem 0.5rem;
}

.adl-prog-seg {
    height: 3px;
    flex: 1;
    border-radius: 2px;
    background: var(--color-border-medium, rgba(0,0,0,0.1));
    transition: background 0.3s var(--ease-out, cubic-bezier(0.22,1,0.36,1));
}

.adl-prog-seg.done {
    background: var(--color-text-primary, #111);
}

.adl-prog-seg.active {
    background: var(--color-text-primary, #111);
    animation: adl-progseg 1.8s ease-in-out infinite;
}

@keyframes adl-progseg {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

[data-theme="dark"] .adl-prog-seg { background: var(--color-border-medium, rgba(255,255,255,0.12)); }
[data-theme="dark"] .adl-prog-seg.done,
[data-theme="dark"] .adl-prog-seg.active { background: #ffffff; }

/* ---- Body / cards ---- */
.adl-body {
    padding: 1.25rem 1.25rem 0.75rem;
    min-height: 240px;
}

.adl-card {
    display: none;
    animation: adl-appear 0.3s var(--ease-out, cubic-bezier(0.22,1,0.36,1)) both;
}

.adl-card.active {
    display: block;
}

@keyframes adl-appear {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .adl-card { animation: none; }
    .adl-prog-seg.active { animation: none; }
}

/* ---- Card typography ---- */
.adl-dc-label {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-tertiary, #888);
    margin-bottom: 0.3rem;
}

.adl-dc-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--color-text-primary, #111);
    margin-bottom: 0.25rem;
    letter-spacing: -0.015em;
}

.adl-dc-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary, #555);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ---- Trust note ---- */
.adl-trust-note {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 0.75rem;
    font-size: 0.72rem;
    color: var(--color-text-tertiary, #888);
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.07));
    border-radius: 100px;
    background: var(--color-surface-2, #F7F7F7);
}

[data-theme="dark"] .adl-trust-note {
    background: var(--color-surface-2, #1A1A1A);
    border-color: var(--color-border-light, rgba(255,255,255,0.07));
}

/* ---- Broker row ---- */
.adl-broker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-surface-2, #F7F7F7);
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: var(--radius-md, 12px);
    padding: 0.85rem 1rem;
    gap: 0.75rem;
}

[data-theme="dark"] .adl-broker-row {
    background: var(--color-surface-2, #1A1A1A);
    border-color: var(--color-border-light, rgba(255,255,255,0.08));
}

.adl-broker-name {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--color-text-primary, #111);
}

.adl-broker-s {
    font-size: 0.72rem;
    color: var(--color-text-tertiary, #888);
    margin-top: 2px;
}

.adl-broker-s.ok {
    color: var(--color-success, #10B981);
    font-weight: 600;
}

/* ---- Connect button ---- */
.adl-connect-btn {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.95rem;
    background: var(--color-btn-primary, #121212);
    color: var(--color-btn-primary-text, #fff);
    border: none;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    font-family: inherit;
    transition: opacity var(--duration-fast, 150ms);
    white-space: nowrap;
}

.adl-connect-btn:hover { opacity: 0.8; }
.adl-connect-btn:disabled { opacity: 0.35; cursor: not-allowed; }

[data-theme="dark"] .adl-connect-btn {
    background: var(--color-btn-primary, #ffffff);
    color: var(--color-btn-primary-text, #121212);
}

/* ---- Connected badge ---- */
.adl-connected-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    background: var(--color-success-bg, rgba(16,185,129,0.1));
    color: var(--color-success, #10B981);
    border-radius: 100px;
}

.adl-gdot {
    width: 5px;
    height: 5px;
    background: var(--color-success, #10B981);
    border-radius: 50%;
}

/* ---- Behavior options ---- */
.adl-bhv {
    border: 1.5px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: var(--radius-md, 12px);
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    transition: border-color var(--duration-fast, 150ms), background var(--duration-fast, 150ms);
    margin-bottom: 0.45rem;
    outline: none;
}

.adl-bhv:hover,
.adl-bhv:focus-visible {
    border-color: var(--color-text-primary, #111);
}

.adl-bhv.sel {
    border-color: var(--color-text-primary, #111);
    background: var(--color-surface-2, #F7F7F7);
}

[data-theme="dark"] .adl-bhv { border-color: var(--color-border-light, rgba(255,255,255,0.08)); }
[data-theme="dark"] .adl-bhv:hover,
[data-theme="dark"] .adl-bhv:focus-visible { border-color: #fff; }
[data-theme="dark"] .adl-bhv.sel { border-color: #fff; background: var(--color-surface-2, #1A1A1A); }

.adl-bhv-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-text-primary, #111);
    margin-bottom: 0.18rem;
}

.adl-bhv-desc {
    font-size: 0.74rem;
    color: var(--color-text-secondary, #555);
    line-height: 1.5;
}

/* ---- Playground grid ---- */
.adl-pg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-bottom: 0.6rem;
}

.adl-pg {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1.5px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: var(--radius-sm, 8px);
    padding: 0.52rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--duration-fast, 150ms), background var(--duration-fast, 150ms);
    color: var(--color-text-primary, #111);
    outline: none;
}

.adl-pg:hover,
.adl-pg:focus-visible { border-color: var(--color-text-primary, #111); }

.adl-pg.sel {
    border-color: var(--color-text-primary, #111);
    background: var(--color-surface-2, #F7F7F7);
}

[data-theme="dark"] .adl-pg { border-color: var(--color-border-light, rgba(255,255,255,0.08)); color: #fff; }
[data-theme="dark"] .adl-pg:hover,
[data-theme="dark"] .adl-pg:focus-visible { border-color: #fff; }
[data-theme="dark"] .adl-pg.sel { border-color: #fff; background: var(--color-surface-2, #1A1A1A); }

.adl-pg-chk {
    width: 14px;
    height: 14px;
    min-width: 14px;
    border: 1.5px solid var(--color-border-medium, rgba(0,0,0,0.12));
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    transition: all var(--duration-fast, 150ms);
}

.adl-pg.sel .adl-pg-chk {
    background: var(--color-btn-primary, #121212);
    border-color: var(--color-btn-primary, #121212);
    color: #fff;
}

[data-theme="dark"] .adl-pg.sel .adl-pg-chk {
    background: #fff;
    border-color: #fff;
    color: #000;
}

/* ---- Comfort slider ---- */
.adl-comfort-wrap {
    padding: 0.2rem 0 0.75rem;
}

.adl-slider-hd {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--color-text-tertiary, #888);
    margin-bottom: 0.6rem;
}

.adl-slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--color-border-medium, rgba(0,0,0,0.1));
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.adl-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-btn-primary, #121212);
    cursor: pointer;
    transition: transform var(--duration-fast, 150ms);
}

.adl-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.adl-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-btn-primary, #121212);
    border: none;
    cursor: pointer;
}

[data-theme="dark"] .adl-slider::-webkit-slider-thumb { background: #fff; }
[data-theme="dark"] .adl-slider::-moz-range-thumb { background: #fff; }

.adl-comfort-rd {
    text-align: center;
    margin-top: 0.7rem;
}

.adl-cval {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-primary, #111);
}

.adl-csub {
    font-size: 0.7rem;
    color: var(--color-text-tertiary, #888);
    margin-top: 0.1rem;
}

/* ---- Consent ---- */
.adl-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: var(--color-surface-2, #F7F7F7);
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: var(--radius-md, 12px);
    padding: 0.85rem;
    margin-bottom: 0.85rem;
}

[data-theme="dark"] .adl-consent-row {
    background: var(--color-surface-2, #1A1A1A);
    border-color: var(--color-border-light, rgba(255,255,255,0.08));
}

.adl-chk-box {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border: 1.5px solid var(--color-border-medium, rgba(0,0,0,0.12));
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all var(--duration-fast, 150ms);
    margin-top: 1px;
    outline: none;
}

.adl-chk-box:focus-visible { outline: 2px solid var(--color-text-primary, #111); outline-offset: 2px; }

.adl-chk-box.checked {
    background: var(--color-btn-primary, #121212);
    border-color: var(--color-btn-primary, #121212);
    color: #fff;
}

[data-theme="dark"] .adl-chk-box.checked { background: #fff; border-color: #fff; color: #000; }

.adl-consent-txt {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--color-text-secondary, #555);
}

/* ---- Trust pills ---- */
.adl-trust-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.adl-trust-pills span {
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: 100px;
    color: var(--color-text-tertiary, #888);
    background: var(--color-surface-2, #F7F7F7);
}

[data-theme="dark"] .adl-trust-pills span {
    background: var(--color-surface-2, #1A1A1A);
    border-color: var(--color-border-light, rgba(255,255,255,0.07));
}

/* ---- Flow list ---- */
.adl-flow-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-medium, rgba(0,0,0,0.1)) transparent;
}

.adl-flow-msg {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    background: var(--color-surface-2, #F7F7F7);
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.06));
    border-radius: var(--radius-sm, 8px);
    padding: 0.58rem 0.72rem;
    animation: adl-fmin 0.35s var(--ease-out, cubic-bezier(0.22,1,0.36,1)) both;
}

@keyframes adl-fmin {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) { .adl-flow-msg { animation: none; } }

[data-theme="dark"] .adl-flow-msg {
    background: var(--color-surface-2, #1A1A1A);
    border-color: var(--color-border-subtle, rgba(255,255,255,0.04));
}

.adl-fdot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.adl-fdot.ok   { background: var(--color-success-bg, rgba(16,185,129,0.12)); color: var(--color-success, #10B981); }
.adl-fdot.info { background: var(--color-info-bg, rgba(59,130,246,0.1));    color: var(--color-info, #3B82F6); }
.adl-fdot.mon  { background: var(--color-warning-bg, rgba(245,158,11,0.1)); color: var(--color-warning, #F59E0B); }

.adl-ftext  { font-size: 0.78rem; font-weight: 500; color: var(--color-text-primary, #111); margin-bottom: 0.06rem; }
.adl-fmeta  { font-size: 0.67rem; color: var(--color-text-tertiary, #888); }

/* ---- Footer ---- */
.adl-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.78rem 1.25rem;
    border-top: 1px solid var(--color-border-light, rgba(0,0,0,0.06));
}

[data-theme="dark"] .adl-foot { border-top-color: var(--color-border-light, rgba(255,255,255,0.06)); }

.adl-rst-btn {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-tertiary, #888);
    background: none;
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: var(--radius-sm, 8px);
    padding: 0.38rem 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: color var(--duration-fast, 150ms), border-color var(--duration-fast, 150ms);
    outline: none;
}

.adl-rst-btn:hover,
.adl-rst-btn:focus-visible { color: var(--color-text-primary, #111); border-color: var(--color-text-primary, #111); }

.adl-next-btn {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm, 8px);
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: var(--color-btn-primary, #121212);
    color: var(--color-btn-primary-text, #fff);
    transition: opacity var(--duration-fast, 150ms);
    outline: none;
}

.adl-next-btn:hover:not(:disabled) { opacity: 0.8; }
.adl-next-btn:focus-visible { outline: 2px solid var(--color-text-primary, #111); outline-offset: 2px; }
.adl-next-btn:disabled { opacity: 0.3; cursor: not-allowed; }

[data-theme="dark"] .adl-next-btn {
    background: var(--color-btn-primary, #ffffff);
    color: var(--color-btn-primary-text, #121212);
}

/* ---- Demo CTA (desktop) ---- */
.adl-demo-cta {
    display: none;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.1rem 1.25rem;
    background: var(--color-surface-1, #FAFAFA);
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: var(--radius-xl, 24px);
}

[data-theme="dark"] .adl-demo-cta {
    background: var(--color-surface-1, #121212);
    border-color: var(--color-border-light, rgba(255,255,255,0.08));
}

.adl-demo-cta-text {
    font-size: 0.82rem;
    color: var(--color-text-secondary, #555);
    margin: 0;
    line-height: 1.4;
}

.adl-demo-cta-btns {
    display: flex;
    gap: 0.55rem;
}

.adl-cta-primary {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.55rem 1rem;
    background: var(--color-btn-primary, #121212);
    color: var(--color-btn-primary-text, #fff);
    border: none;
    border-radius: var(--radius-lg, 14px);
    cursor: pointer;
    font-family: inherit;
    transition: opacity var(--duration-fast, 150ms);
    outline: none;
    text-align: center;
}

.adl-cta-primary:hover { opacity: 0.8; }
.adl-cta-primary:focus-visible { outline: 2px solid var(--color-text-primary, #111); outline-offset: 2px; }

[data-theme="dark"] .adl-cta-primary {
    background: var(--color-btn-primary, #ffffff);
    color: var(--color-btn-primary-text, #121212);
}

.adl-cta-ghost {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.55rem 1rem;
    background: transparent;
    color: var(--color-text-primary, #111);
    border: 1px solid var(--color-border-medium, rgba(0,0,0,0.12));
    border-radius: var(--radius-lg, 14px);
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--duration-fast, 150ms);
    outline: none;
    text-align: center;
}

.adl-cta-ghost:hover { border-color: var(--color-text-primary, #111); }
.adl-cta-ghost:focus-visible { outline: 2px solid var(--color-text-primary, #111); outline-offset: 2px; }

[data-theme="dark"] .adl-cta-ghost { color: #fff; border-color: var(--color-border-medium, rgba(255,255,255,0.12)); }

/* ---- Mobile trigger button ---- */
.adl-mobile-trigger {
    display: none; /* shown below 960px */
    align-items: center;
    gap: 6px;
    margin-top: 1.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-tertiary, #888);
    background: none;
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: 100px;
    padding: 0.45rem 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: color var(--duration-fast, 150ms), border-color var(--duration-fast, 150ms);
    outline: none;
}

.adl-mobile-trigger:hover,
.adl-mobile-trigger:focus-visible { color: var(--color-text-primary, #111); border-color: var(--color-text-primary, #111); }

[data-theme="dark"] .adl-mobile-trigger { border-color: var(--color-border-light, rgba(255,255,255,0.1)); color: #777; }

.adl-trigger-dot {
    width: 6px;
    height: 6px;
    background: var(--color-success, #10B981);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Auth divider ---- */
.auth-divider {
    text-align: center;
    position: relative;
    margin: 1.25rem 0;
    color: var(--color-text-tertiary, #888);
    font-size: 0.8rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-border-light, rgba(0,0,0,0.08));
    z-index: 0;
}

.auth-divider span {
    position: relative;
    z-index: 1;
    background: var(--bg-primary, #fff);
    padding: 0 0.75rem;
}

[data-theme="dark"] .auth-divider span { background: var(--bg-primary, #000); }

/* =====================================================
   MOBILE SLIDE-UP PANEL
   ===================================================== */

.adl-mobile-panel {
    display: none; /* activated by JS adding .open */
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 1000);
    pointer-events: none;
}

.adl-mobile-panel.open {
    pointer-events: auto;
}

/* Backdrop */
.adl-mobile-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--duration-slow, 300ms) var(--ease-out, cubic-bezier(0.22,1,0.36,1));
    cursor: pointer;
}

.adl-mobile-panel.open .adl-mobile-panel-backdrop {
    opacity: 1;
}

[data-theme="dark"] .adl-mobile-panel-backdrop { background: rgba(0,0,0,0.7); }

/* Sheet */
.adl-mobile-panel-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary, #fff);
    border-radius: 20px 20px 0 0;
    padding: 0 0 max(env(safe-area-inset-bottom, 16px), 16px);
    max-height: 92vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform var(--duration-slow, 300ms) var(--ease-out, cubic-bezier(0.22,1,0.36,1));
    box-shadow: 0 -8px 40px rgba(0,0,0,0.12);
    -webkit-overflow-scrolling: touch;
}

.adl-mobile-panel.open .adl-mobile-panel-sheet {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .adl-mobile-panel-sheet { transition: none; }
    .adl-mobile-panel-backdrop { transition: none; }
}

[data-theme="dark"] .adl-mobile-panel-sheet {
    background: var(--bg-primary, #000);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
}

/* Handle */
.adl-mobile-panel-handle {
    width: 36px;
    height: 4px;
    background: var(--color-border-medium, rgba(0,0,0,0.12));
    border-radius: 2px;
    margin: 0.7rem auto 0;
}

/* Panel header */
.adl-mobile-panel-hd {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.5rem;
}

.adl-mobile-panel-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-text-tertiary, #888);
    margin-bottom: 0.2rem;
}

.adl-mobile-panel-htitle {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-primary, #111);
    letter-spacing: -0.02em;
}

.adl-mobile-panel-close {
    background: var(--color-surface-2, #F7F7F7);
    border: 1px solid var(--color-border-light, rgba(0,0,0,0.08));
    border-radius: var(--radius-round, 50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-secondary, #555);
    flex-shrink: 0;
    margin-top: 2px;
    outline: none;
    transition: background var(--duration-fast, 150ms);
}

.adl-mobile-panel-close:hover { background: var(--color-border-light, rgba(0,0,0,0.08)); }
.adl-mobile-panel-close:focus-visible { outline: 2px solid var(--color-text-primary, #111); }

[data-theme="dark"] .adl-mobile-panel-close {
    background: var(--color-surface-2, #1A1A1A);
    border-color: var(--color-border-light, rgba(255,255,255,0.08));
    color: #aaa;
}

/* Mobile demo wrap */
.adl-mobile-demo-wrap {
    padding: 0.75rem 1rem 0;
}

/* Mobile CTA */
.adl-mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.1rem 1.25rem 0.5rem;
    border-top: 1px solid var(--color-border-light, rgba(0,0,0,0.06));
    margin-top: 0.75rem;
}

[data-theme="dark"] .adl-mobile-cta { border-top-color: var(--color-border-light, rgba(255,255,255,0.06)); }

.adl-cta-full {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.88rem;
}

/* =====================================================
   RESPONSIVE BREAKPOINTS
   ===================================================== */

/* Desktop: show demo col, hide mobile trigger */
@media (min-width: 960px) {
    .adl-demo-col {
        display: flex;
    }

    .adl-mobile-trigger {
        display: none !important;
    }

    /* Body scroll lock handled by JS; panel only appears on mobile anyway */
}

/* Below 960px: collapse to single-col, show trigger */
@media (max-width: 959px) {
    .adl-layout {
        flex-direction: column;
        min-height: 100vh;
    }

    .adl-auth-col {
        min-width: unset;
        max-width: unset;
        width: 100%;
        min-height: 100vh;
        box-shadow: none;
        justify-content: center;
    }

    .adl-auth-col .auth-screen {
        padding: 2rem 1.5rem;
    }

    .adl-demo-col {
        display: none;
    }

    .adl-mobile-trigger {
        display: flex;
    }

    .adl-mobile-panel {
        display: block;
    }
}

/* Very narrow phones */
@media (max-width: 400px) {
    .adl-auth-col .auth-screen {
        padding: 1.5rem 1.25rem;
    }
}
