/* ==========================================================================
   Samanvaya Book a Demo Section Styles (Clean, Premium, Light Solar Theme)
   ========================================================================== */

.samanvaya-demo-section {
    position: relative;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
    color: var(--secondary, #0f172a);
    padding: 6rem 1.5rem;
    overflow: hidden;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

/* Subtle background ambient mesh */
.samanvaya-demo-section::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.samanvaya-demo-section::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -120px;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.samanvaya-demo-wrap {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 4.5rem;
    align-items: flex-start;
}

/* ── Left Column: Value Proposition & Trust ── */
.samanvaya-demo-stick {
    position: sticky;
    top: 100px;
}

.samanvaya-demo-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

.samanvaya-demo-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.18;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.samanvaya-demo-lead {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #475569;
    margin-bottom: 2rem;
}

/* Feature Highlights */
.samanvaya-demo-perks {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.25rem;
}

.samanvaya-perk-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.samanvaya-perk-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.12);
}

.samanvaya-perk-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.samanvaya-perk-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.45;
}

/* Action & Contact */
.samanvaya-demo-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    padding-top: 0;
    border-top: none;
}

.samanvaya-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1.5rem;
    background: #25D366;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.9375rem;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
    transition: all 0.25s ease;
}

.samanvaya-btn-whatsapp:hover {
    background: #1eb857;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
    text-decoration: none;
}

.samanvaya-contact-mute {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.samanvaya-contact-mute a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.samanvaya-contact-mute a:hover {
    text-decoration: underline;
}

/* ── Right Column: The Form Card ── */
.samanvaya-demo-formbox {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 2.75rem 2.5rem;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

/* Top decorative gradient stripe */
.samanvaya-demo-formbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent, #f59e0b) 100%);
}

.samanvaya-demo-form-header {
    margin-bottom: 1.75rem;
}

.samanvaya-form-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.65rem;
}

.samanvaya-demo-form-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.samanvaya-demo-form-sub {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Form Alerts */
.samanvaya-demo-alert {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0.85rem 1.15rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.samanvaya-demo-alert.show {
    display: flex;
    animation: demoAlertSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.samanvaya-demo-alert.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
}

.samanvaya-alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.samanvaya-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.samanvaya-alert-text {
    flex: 1;
    word-break: break-word;
}

.samanvaya-alert-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    opacity: 0.7;
    flex-shrink: 0;
}

.samanvaya-alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.samanvaya-demo-alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.08);
}

.samanvaya-demo-alert-success .samanvaya-alert-close {
    color: #065f46;
}

.samanvaya-demo-alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.08);
}

.samanvaya-demo-alert-error .samanvaya-alert-close {
    color: #991b1b;
}

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

/* Form Grid */
.samanvaya-demo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1rem;
}

.samanvaya-form-field {
    display: flex;
    flex-direction: column;
}

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

.samanvaya-form-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.form-req {
    color: #ef4444;
    font-weight: 700;
    margin-left: 2px;
}

/* Inputs, Selects & Textarea */
.samanvaya-form-input,
.samanvaya-form-select,
.samanvaya-form-textarea {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.80rem 0.95rem;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    outline: none;
}

.samanvaya-form-input,
.samanvaya-form-select {
    height: 48px;
}

.samanvaya-form-input::placeholder,
.samanvaya-form-textarea::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.samanvaya-form-input:hover,
.samanvaya-form-select:hover,
.samanvaya-form-textarea:hover {
    background: #ffffff;
    border-color: #cbd5e1;
}

.samanvaya-form-input:focus,
.samanvaya-form-select:focus,
.samanvaya-form-textarea:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(var(--primary-rgb), 0.14);
}

/* Custom Dropdown Arrow */
.samanvaya-form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px;
    padding-right: 2.2rem;
}

.samanvaya-form-select option {
    background: #ffffff;
    color: #0f172a;
}

.samanvaya-form-textarea {
    resize: vertical;
    min-height: 95px;
    line-height: 1.5;
}

/* Checkbox */
.samanvaya-check-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.35rem 0;
}

.samanvaya-check-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin: 2px 0 0 0;
    background-color: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 6px !important;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-grid;
    place-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    outline: none;
}

.samanvaya-check-input:hover {
    border-color: var(--primary, #f97316) !important;
    background-color: #ffffff !important;
}

.samanvaya-check-input:focus {
    outline: none;
    border-color: var(--primary, #f97316) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18) !important;
}

.samanvaya-check-input:checked {
    background-color: var(--primary, #f97316) !important;
    border-color: var(--primary, #f97316) !important;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25) !important;
}

.samanvaya-check-input::before {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2.2px solid #ffffff !important;
    border-bottom: 2.2px solid #ffffff !important;
    transform: rotate(-45deg) scale(0);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: -2px;
}

.samanvaya-check-input:checked::before {
    transform: rotate(-45deg) scale(1);
}

.samanvaya-check-label {
    font-size: 0.84rem;
    color: #475569;
    font-weight: 500;
    line-height: 1.45;
    cursor: pointer;
}

/* Honeypot field (hidden from real users) */
.honeypot-wrap {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Submit Button */
.samanvaya-btn-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.95rem 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.32);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.01em;
}

.samanvaya-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.44);
}

.samanvaya-btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.samanvaya-btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

/* Button Loading Spinner */
.demo-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: demoSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes demoSpin {
    to { transform: rotate(360deg); }
}

.samanvaya-form-trust {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .samanvaya-demo-wrap {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .samanvaya-demo-stick {
        position: static;
    }

    .samanvaya-demo-title {
        font-size: 2.2rem;
    }

    .samanvaya-demo-formbox {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .samanvaya-demo-section {
        padding: 4rem 1rem;
    }

    .samanvaya-demo-title {
        font-size: 1.85rem;
    }

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

    .samanvaya-demo-formbox {
        padding: 1.5rem 1.25rem;
        border-radius: 18px;
    }

    .samanvaya-btn-whatsapp {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .samanvaya-btn-submit {
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .samanvaya-demo-section {
        padding: 3rem 0.85rem;
    }

    .samanvaya-demo-title {
        font-size: 1.6rem;
    }

    .samanvaya-demo-formbox {
        padding: 1.25rem 0.95rem;
        border-radius: 16px;
    }

    .samanvaya-demo-eyebrow {
        font-size: 0.75rem;
        padding: 5px 12px;
    }

    .samanvaya-btn-submit {
        padding: 0.8rem 1rem;
        font-size: 0.92rem;
        gap: 6px;
    }

    .samanvaya-demo-lead {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 360px) {
    .samanvaya-demo-section {
        padding: 2.5rem 0.65rem;
    }

    .samanvaya-demo-title {
        font-size: 1.45rem;
    }

    .samanvaya-demo-formbox {
        padding: 1.15rem 0.75rem;
    }

    .samanvaya-btn-submit {
        padding: 0.75rem 0.85rem;
        font-size: 0.88rem;
    }
}

/* ── Select2 Custom Theme for Demo Form ── */
#demo .select2-container {
    width: 100% !important;
}

#demo .select2-container--default .select2-selection--single {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    height: 48px !important;
    display: flex;
    align-items: center;
    padding: 0 0.95rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

#demo .select2-container--default .select2-selection--single:hover {
    background: #ffffff;
    border-color: #cbd5e1;
}

#demo .select2-container--default.select2-container--open .select2-selection--single,
#demo .select2-container--default.select2-container--focus .select2-selection--single {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(var(--primary-rgb), 0.14);
    outline: none;
}

#demo .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 500;
    padding-left: 0;
    line-height: 45px !important;
    height: 100%;
    display: flex;
    align-items: center;
}

#demo .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 0.85rem;
    display: flex;
    align-items: center;
}

#demo .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent;
    border-width: 5px 4px 0 4px;
}

#demo .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #64748b transparent;
    border-width: 0 4px 5px 4px;
}

/* Select2 Dropdown Popup */
.select2-dropdown {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
    z-index: 99999;
}

.select2-search--dropdown {
    padding: 8px 10px;
}

.select2-search--dropdown .select2-search__field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.85rem;
    color: #0f172a;
    outline: none;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary);
    background: #ffffff;
}

.select2-results__option {
    padding: 0.65rem 1rem !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #334155 !important;
    transition: background 0.15s ease;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: rgba(var(--primary-rgb), 0.08) !important;
    color: var(--primary) !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(var(--primary-rgb), 0.14) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}
