/* ==========================================================================
   pantherSIS -- Book a Demo page (web/demo/)
   Layered on top of /web/assets/css/site.css: reuses its tokens (--panel,
   --border, --violet, --blue, --cyan, radii), nav, buttons and footer.
   Everything here is prefixed demo- (or scoped under .demo-page) so it can
   never leak into the main marketing page.
   ========================================================================== */

.demo-page [hidden] {
    display: none !important;
}

.demo-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    padding: clamp(36px, 6vw, 72px) 0 clamp(60px, 8vw, 100px);
}

/* ---------- Pitch column ---------- */

.demo-pitch {
    position: sticky;
    top: 110px;
}

.demo-title {
    margin: 0;
    font-size: clamp(2.3rem, 4.6vw, 3.5rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.demo-title .gradient-text {
    display: block;
}

.demo-copy {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 460px;
}

.demo-meta {
    display: grid;
    gap: 14px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.demo-meta li {
    display: flex;
    gap: 14px;
    align-items: center;
}

.demo-meta strong {
    display: block;
    font-size: 0.95rem;
}

.demo-meta small {
    display: block;
    color: var(--muted-soft);
    font-size: 0.8rem;
    margin-top: 2px;
}

.demo-meta-ic {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(157, 92, 255, 0.28);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(111, 69, 255, 0.18), rgba(45, 168, 255, 0.12));
}

.demo-meta-ic svg,
.demo-verify-ic svg,
.demo-done-ic svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #cdb8ff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.demo-clock {
    display: grid;
    gap: 8px;
    margin-top: 30px;
    font-size: 0.85rem;
}

.demo-clock-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.demo-clock-label {
    color: var(--muted-soft);
}

.demo-clock-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.demo-clock-host .demo-clock-time {
    color: var(--muted);
    font-weight: 600;
}

/* ---------- Scheduler card ---------- */

.demo-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    scroll-margin-top: 100px;
}

.demo-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--violet), var(--blue), var(--cyan));
}

.demo-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border-soft);
}

.demo-card-title {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.demo-steps {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.demo-steps li {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 6px 12px 6px 6px;
    color: var(--muted-soft);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}

.demo-steps li span {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.7rem;
}

.demo-steps li.is-active {
    color: var(--text);
    border-color: rgba(157, 92, 255, 0.45);
    background: rgba(111, 69, 255, 0.12);
}

.demo-steps li.is-active span {
    color: #fff;
    background: linear-gradient(120deg, var(--violet), var(--blue));
}

.demo-steps li.is-done {
    color: var(--muted);
}

.demo-steps li.is-done span {
    color: #05060a;
    background: var(--cyan);
}

.demo-banner {
    margin: 18px 28px 0;
    padding: 12px 16px;
    color: #ffd3dc;
    border: 1px solid rgba(255, 92, 128, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(255, 92, 128, 0.08);
    font-size: 0.9rem;
    line-height: 1.5;
}

.demo-panel {
    padding: 24px 28px 28px;
    animation: demo-in 260ms ease;
}

@keyframes demo-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Time zone ---------- */

.demo-tz {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 12px;
    align-items: center;
    margin-bottom: 22px;
}

.demo-tz label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.demo-tz select {
    width: 100%;
    max-width: 340px;
}

.demo-tz-note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted-soft);
    font-size: 0.8rem;
    line-height: 1.5;
}

.demo-tz-note:empty {
    display: none;
}

/* Shared control skin (selects & inputs inside the card) */
.demo-card select,
.demo-card input,
.demo-card textarea {
    width: 100%;
    padding: 12px 14px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    background: rgba(255, 255, 255, 0.04);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.demo-card select {
    padding-right: 38px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%239ca7b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

.demo-card select option,
.demo-card select optgroup {
    color: #0d0f18;
    background: #fff;
}

.demo-card select:focus,
.demo-card input:focus,
.demo-card textarea:focus {
    border-color: rgba(157, 92, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(111, 69, 255, 0.18);
}

.demo-card textarea {
    resize: vertical;
    min-height: 92px;
}

/* ---------- Calendar + slots ---------- */

.demo-pick {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 24px;
}

.demo-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.demo-cal-month {
    font-weight: 800;
    font-size: 1rem;
}

.demo-cal-nav {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}

.demo-cal-nav:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
}

.demo-cal-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.demo-cal-nav svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.demo-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.demo-cal-dow {
    padding-bottom: 6px;
    color: var(--muted-soft);
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.demo-day {
    position: relative;
    aspect-ratio: 1;
    min-height: 38px;
    padding: 0;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.demo-day:hover:not(:disabled) {
    border-color: rgba(157, 92, 255, 0.45);
    background: rgba(111, 69, 255, 0.12);
}

.demo-day:disabled {
    color: rgba(255, 255, 255, 0.18);
    background: transparent;
    cursor: default;
}

.demo-day.is-none {
    color: var(--muted-soft);
    background: transparent;
}

.demo-day.is-open {
    background: rgba(56, 242, 220, 0.06);
    border-color: rgba(56, 242, 220, 0.18);
}

.demo-day.is-open::after {
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 5px;
    height: 5px;
    content: "";
    border-radius: 50%;
    background: var(--cyan);
    transform: translateX(-50%);
}

.demo-day.is-today {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.demo-day.is-selected,
.demo-day.is-selected:hover {
    color: white;
    border-color: transparent;
    background: linear-gradient(120deg, var(--violet), var(--blue));
    box-shadow: 0 8px 22px rgba(78, 92, 255, 0.35);
}

.demo-day.is-selected::after {
    background: white;
}

.demo-cal-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    color: var(--muted-soft);
    font-size: 0.75rem;
}

.demo-cal-legend span::before {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    content: "";
    border-radius: 50%;
    background: var(--cyan);
    vertical-align: 1px;
}

.demo-slots {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.demo-slots-head {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
    font-weight: 800;
    font-size: 0.95rem;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.demo-slots-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-content: start;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.demo-slot {
    padding: 11px 8px;
    color: var(--text);
    border: 1px solid rgba(157, 92, 255, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(111, 69, 255, 0.06);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.demo-slot small {
    display: block;
    margin-top: 3px;
    color: var(--muted-soft);
    font-size: 0.7rem;
    font-weight: 500;
}

.demo-slot:hover {
    border-color: rgba(157, 92, 255, 0.75);
    background: rgba(111, 69, 255, 0.16);
    transform: translateY(-1px);
}

.demo-slot[aria-pressed="true"] {
    color: white;
    border-color: transparent;
    background: linear-gradient(120deg, var(--violet), var(--blue));
    box-shadow: 0 8px 22px rgba(78, 92, 255, 0.35);
}

.demo-slot[aria-pressed="true"] small {
    color: rgba(255, 255, 255, 0.75);
}

.demo-empty {
    grid-column: 1 / -1;
    padding: 18px 4px;
    color: var(--muted-soft);
    font-size: 0.88rem;
    line-height: 1.6;
}

.demo-skeleton {
    height: 44px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    background-size: 200% 100%;
    animation: demo-shimmer 1.2s linear infinite;
}

@keyframes demo-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.demo-actionbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
    padding: 14px 14px 14px 18px;
    border: 1px solid rgba(157, 92, 255, 0.3);
    border-radius: var(--radius-md);
    background: rgba(111, 69, 255, 0.08);
    animation: demo-in 220ms ease;
}

.demo-actionbar-text small,
.demo-chosen small {
    display: block;
    color: var(--muted-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-actionbar-text strong {
    font-size: 0.98rem;
}

/* ---------- Details ---------- */

.demo-chosen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(56, 242, 220, 0.22);
    border-radius: var(--radius-md);
    background: rgba(56, 242, 220, 0.05);
}

.demo-chosen-when {
    display: block;
    margin-top: 2px;
    font-size: 1.02rem;
}

.demo-chosen-alt {
    display: block;
    margin-top: 3px;
    color: var(--muted-soft);
    font-size: 0.8rem;
}

.demo-link {
    padding: 0;
    color: #b8c6ff;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(184, 198, 255, 0.35);
    text-underline-offset: 3px;
}

.demo-link:hover {
    color: white;
    text-decoration-color: currentColor;
}

.demo-form {
    display: grid;
    gap: 18px;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.demo-grid:empty {
    display: none;
}

.field-wide {
    grid-column: 1 / -1;
}

/* Floating labels */
.field {
    position: relative;
}

.field input,
.field select,
.field textarea {
    padding-top: 22px;
    padding-bottom: 8px;
}

.field label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: var(--muted-soft);
    font-size: 0.93rem;
    pointer-events: none;
    transform-origin: 0 0;
    transition: transform 150ms ease, color 150ms ease;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select + label {
    color: var(--muted);
    transform: translateY(-9px) scale(0.76);
}

.field input::placeholder,
.field textarea::placeholder {
    color: transparent;
}

.field-error {
    display: none;
    margin-top: 6px;
    color: #ff9db3;
    font-size: 0.8rem;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
    border-color: rgba(255, 92, 128, 0.7);
    box-shadow: 0 0 0 4px rgba(255, 92, 128, 0.12);
}

.field.is-invalid .field-error {
    display: block;
}

.field-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.field-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    padding: 0;
    accent-color: var(--violet);
    flex-shrink: 0;
}

.demo-chips {
    margin: 0;
    padding: 0;
    border: 0;
}

.demo-chips legend {
    margin-bottom: 10px;
    padding: 0;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.demo-chips legend small {
    color: var(--muted-soft);
    font-weight: 500;
}

.demo-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.demo-chip {
    padding: 8px 14px;
    color: #cdd6e5;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.demo-chip:hover {
    border-color: rgba(255, 255, 255, 0.24);
    color: white;
}

.demo-chip[aria-pressed="true"] {
    color: white;
    border-color: rgba(56, 242, 220, 0.5);
    background: rgba(56, 242, 220, 0.12);
}

.demo-form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 6px;
}

.demo-fineprint {
    flex: 1 1 260px;
    margin: 0;
    color: var(--muted-soft);
    font-size: 0.78rem;
    line-height: 1.6;
}

.demo-fineprint a {
    color: var(--muted);
}

.btn.is-busy {
    pointer-events: none;
    opacity: 0.7;
}

.btn.is-busy::after {
    width: 14px;
    height: 14px;
    content: "";
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: demo-spin 700ms linear infinite;
}

@keyframes demo-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Verify / Done ---------- */

.demo-verify,
.demo-done {
    display: grid;
    justify-items: center;
    gap: 14px;
    max-width: 440px;
    margin: 0 auto;
    padding: 18px 0 8px;
    text-align: center;
}

.demo-verify h3,
.demo-done h3 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.demo-verify p,
.demo-done p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.demo-verify-ic,
.demo-done-ic {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(157, 92, 255, 0.35);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(111, 69, 255, 0.22), rgba(45, 168, 255, 0.14));
}

.demo-verify-ic svg {
    width: 26px;
    height: 26px;
}

.demo-done-ic {
    border-color: rgba(56, 242, 220, 0.45);
    background: rgba(56, 242, 220, 0.12);
    box-shadow: 0 0 40px rgba(56, 242, 220, 0.2);
}

.demo-done-ic svg {
    width: 28px;
    height: 28px;
    stroke: var(--cyan);
    stroke-width: 2.4;
}

.demo-otp-field {
    width: 100%;
    max-width: 280px;
    margin-top: 6px;
}

.demo-otp-field input {
    padding: 14px 10px 14px calc(10px + 0.5em);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 0.5em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.demo-otp-field input::placeholder {
    color: rgba(255, 255, 255, 0.14);
}

.demo-verify-links {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted-soft);
}

.demo-link:disabled {
    color: var(--muted-soft);
    cursor: default;
    text-decoration: none;
}

.demo-resend-note {
    min-height: 1.2em;
    font-size: 0.82rem;
}

.demo-resend-note.is-ok {
    color: var(--green) !important;
}

.demo-resend-note.is-err {
    color: #ff9db3 !important;
}

.demo-done-when {
    color: var(--text) !important;
    font-size: 1.12rem;
    font-weight: 800;
}

.demo-done-alt {
    font-size: 0.85rem;
}

.demo-done-copy {
    font-size: 0.92rem;
}

.demo-done-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 6px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .demo-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-pitch {
        position: static;
    }

    .demo-clock {
        display: none;
    }
}

@media (max-width: 720px) {
    .demo-pick {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-slots-list {
        max-height: none;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .demo-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-card-head,
    .demo-panel {
        padding-right: 18px;
        padding-left: 18px;
    }

    .demo-banner {
        margin-right: 18px;
        margin-left: 18px;
    }

    .demo-tz {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-tz select {
        max-width: none;
    }

    .demo-actionbar .btn,
    .demo-form-foot .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .demo-slots-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-steps li {
        padding-right: 8px;
        font-size: 0;
        gap: 0;
    }

    .demo-steps li span {
        font-size: 0.7rem;
    }
}
