/**
 * Schedule Demo – full-screen overlay (app-style). Not Bootstrap modal.
 * Institutional tone: calm, structured, enterprise.
 */

.demo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.demo-overlay.active {
    opacity: 1;
    visibility: visible;
}

.demo-box {
    width: 900px;
    max-width: 95%;
    background: #ffffff;
    border-radius: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
}

.demo-side {
    background: #0f172a;
    color: #fff;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.demo-side-header {
    margin-bottom: 1.5rem;
}

.demo-logo-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.demo-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.demo-brand {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
}

.demo-heading {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

.demo-desc {
    font-size: 15px;
    color: #ffffff !important;
    opacity: 0.95;
    line-height: 1.6;
    margin: 0 0 1.25rem 0;
}

.demo-session-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.5rem 0;
}

.demo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.demo-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

.demo-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.8);
}

.demo-form-wrapper {
    padding: 40px 40px 32px;
    position: relative;
    overflow-y: auto;
}

.demo-close {
    position: absolute;
    right: 20px;
    top: 20px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s ease;
}

.demo-close:hover {
    color: #0f172a;
}

.demo-form-inner .demo-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.demo-subtitle {
    color: #64748b;
    font-size: 0.9375rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.schedule-demo-form {
    display: block;
}

.demo-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
}

.demo-form-full {
    grid-column: 1 / -1;
}

.demo-form-actions {
    margin-top: 0.5rem;
}

.schedule-form-group {
    margin-bottom: 0;
}

.schedule-form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
    display: block;
    font-size: 0.875rem;
}

.schedule-form-optional {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.8125rem;
}

.input-wrapper-schedule {
    position: relative;
}

.schedule-form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    width: 100%;
    color: #111827;
    box-sizing: border-box;
}

.schedule-form-control:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
    outline: none;
}

.schedule-form-control::placeholder {
    color: #9ca3af;
    font-size: 0.9375rem;
}

.demo-overlay .schedule-form-control,
.demo-overlay input.schedule-form-control,
.demo-overlay select.schedule-form-control,
.demo-overlay textarea.schedule-form-control {
    color: #111827;
}

.demo-overlay .schedule-form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
}

textarea.schedule-form-control {
    min-height: 80px;
    resize: vertical;
}

.schedule-demo-submit-btn {
    background: #0f172a;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    width: 100%;
    max-width: 320px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.schedule-demo-submit-btn:hover:not(:disabled) {
    background: #1e293b;
    color: white;
}

.schedule-demo-submit-btn:active {
    background: #0f172a;
}

.schedule-demo-submit-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.schedule-demo-submit-btn .btn-loading {
    display: none;
}

.schedule-demo-submit-btn.loading .btn-text {
    display: none;
}

.schedule-demo-submit-btn.loading .btn-loading {
    display: inline-block;
}

.schedule-note {
    color: #6b7280;
    font-size: 0.8125rem;
    margin: 0.75rem 0 0 0;
    line-height: 1.4;
}

/* Success message */
.schedule-demo-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.25rem;
    text-align: center;
    animation: scheduleDemoSlideInUp 0.4s ease-out;
}

.schedule-demo-success i {
    color: #16a34a;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.schedule-demo-success h6 {
    color: #166534;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.schedule-demo-success p {
    color: #15803d;
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.5;
}

@keyframes scheduleDemoSlideInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Field error (injected by schedule-demo.js) */
.field-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.schedule-form-control.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.schedule-demo-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1rem;
    text-align: center;
    animation: scheduleDemoSlideInUp 0.3s ease-out;
}

.schedule-demo-error i {
    color: #dc2626;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.schedule-demo-error h6 {
    color: #b91c1c;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.schedule-demo-error p {
    color: #991b1b;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Responsive: single column, hide left panel */
@media (max-width: 768px) {
    .demo-overlay {
        align-items: flex-start;
        padding: 0.75rem;
        overflow-y: auto;
    }

    .demo-box {
        grid-template-columns: 1fr;
        max-height: none;
        width: 100%;
    }

    .demo-side {
        display: none;
    }

    .demo-form-wrapper {
        padding: 36px 24px 28px;
        max-height: none;
    }

    .demo-close {
        right: 16px;
        top: 16px;
    }

    .demo-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .schedule-demo-submit-btn {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .demo-form-wrapper {
        padding: 32px 20px 24px;
    }

    .demo-form-inner .demo-title {
        font-size: 1.125rem;
    }
}
