﻿/* Theme Variables */
:root {
    --modal-bg: #ffffff;
    --modal-overlay-bg: rgba(0, 0, 0, 0.75);
    --form-bg: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --input-text: #2d3748;
    --input-focus: #39c6f5;
    --sidebar-bg: #f8fafc;
    --sidebar-border: #e2e8f0;
    --video-item-bg: #ffffff;
    --video-item-hover: #f1f5f9;
    --text-primary: #1a202c;
    --text-secondary: #64748b;
    --btn-primary: linear-gradient(135deg, #39c6f5 0%, #06b6d4 100%);
    --btn-hover: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
    --close-btn-bg: #ffffff;
    --close-btn-text: #64748b;
    --error-border: #ef4444;
}

[data-bs-theme="dark"] {
    --modal-bg: #1e293b;
    --modal-overlay-bg: rgba(0, 0, 0, 0.9);
    --form-bg: linear-gradient(135deg, #0e7490 0%, #164e63 100%);
    --input-bg: #0f172a;
    --input-border: #334155;
    --input-text: #e2e8f0;
    --input-focus: #22d3ee;
    --sidebar-bg: #0f172a;
    --sidebar-border: #334155;
    --video-item-bg: #1e293b;
    --video-item-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --btn-primary: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --btn-hover: linear-gradient(135deg, #67e8f9 0%, #0891b2 100%);
    --close-btn-bg: #334155;
    --close-btn-text: #cbd5e1;
    --error-border: #f87171;
}

/* Modal Styles */
#myVideoModal .modal-dialog {
    max-width: 1000px;
    margin: 2rem auto;
}

#myVideoModal .modal-content {
    background-color: var(--modal-bg);
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

#myVideoModal .modal-body {
    padding: 0;
}

/* Close Button */
#myVideoModal .close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--close-btn-bg);
    color: var(--close-btn-text);
    border: 2px solid var(--input-border);
    border-radius: 50%;
    font-size: 24px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

    #myVideoModal .close:hover {
        transform: rotate(90deg) scale(1.1);
        background: var(--error-border);
        color: #ffffff;
        border-color: var(--error-border);
    }

/* Video Wrapper */
.wrapper1 {
    position: relative;
    padding-top: 75%;
    height: 0;
    background: #000;
/*    border-radius: 12px;*/
    overflow: hidden;
}

    .wrapper1 iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

/* Form Overlay */
.video-overlap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #8080808c;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    /*    border-radius: 12px;*/
    transition: opacity 0.3s ease;
}

    .video-overlap .container {
        width: 100%;
        max-width: 500px;
        padding: 0 15px;
    }

    .video-overlap .modal-title {
        font-size: 28px;
        font-weight: 700;
        text-align: center;
        margin-bottom: 16px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .video-overlap .form-subtitle {
        color: rgba(255, 255, 255, 0.9);
        font-size: 14px;
        text-align: center;
        margin-bottom: 24px;
    }

/* Form Styles */
#formvideo {
    background: rgba(255, 255, 255);
    padding: 32px;
    padding-top: 24px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 20;
}

[data-bs-theme="dark"] #formvideo {
    background: rgba(15, 23, 42);
}

#formvideo .mb-1 {
    margin-bottom: 16px;
    position: relative;
}

#formvideo input.form-control,
#formvideo select.form-select,
#formvideo .selectize-control .selectize-input {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    color: var(--input-text);
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    #formvideo input.form-control:focus,
    #formvideo select.form-select:focus,
    #formvideo .selectize-control .selectize-input.focus {
        border-color: var(--input-focus);
        box-shadow: 0 0 0 3px rgba(57, 198, 245, 0.1);
        outline: none;
    }

#formvideo .input-validation-error {
    border-color: var(--error-border) !important;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Phone Input Group */
.phone-input {
    display: flex;
    gap: 8px;
}

    .phone-input select,
    .phone-input .selectize-control {
        flex: 0 0 140px;
    }

    .phone-input .selectize-input {
        height: 100%;
    }

    .phone-input input {
        flex: 1;
    }

/* Selectize Styling */
.selectize-control {
    position: relative;
    z-index: 25;
}

    .selectize-control .selectize-input {
        box-shadow: none;
        min-height: 48px;
        display: flex;
        align-items: center;
        overflow: visible !important;
    }

.selectize-dropdown {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 10px;
    margin-top: 4px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999 !important;
    position: absolute !important;
}

    .selectize-dropdown .option {
        padding: 10px 16px;
        color: var(--input-text);
    }

        .selectize-dropdown .option:hover,
        .selectize-dropdown .option.active {
            background: var(--video-item-hover);
        }

.selectize-dropdown-content {
    max-height: 200px;
    overflow-y: auto;
}

/* Fix for dropdown positioning */
.selectize-control.single .selectize-dropdown {
    margin-top: -1px;
}

/* Button Styles */
#btndownddemo,
#btnwaitdemo {
    background: var(--btn-primary);
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

    #btndownddemo:hover {
        background: var(--btn-hover);
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    }

#btnwaitdemo {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Video List Sidebar */
.videolist {
    background: var(--sidebar-bg);
    border-left: 1px solid var(--sidebar-border);
    padding: 24px;
    /* Remove max-height and overflow here — now handled by flex */
    /* max-height: 500px;
    overflow-y: auto; */
    position: relative;
    overflow-x: hidden;
}

    .videolist .titlehead {
        color: var(--text-primary);
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 16px;
        padding-bottom: 16px;
        border-bottom: 2px solid var(--sidebar-border);
    }

        .videolist .titlehead p {
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 400;
            margin-top: 4px;
        }

.ulvideolist {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .ulvideolist li {
        margin-bottom: 8px;
    }

    .ulvideolist a {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        background: var(--video-item-bg);
        color: var(--text-primary);
        text-decoration: none;
        border-radius: 10px;
        transition: all 0.3s ease;
        border: 1px solid var(--sidebar-border);
    }

        .ulvideolist a:hover {
            background: var(--video-item-hover);
            transform: translateX(4px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            border-color: #39c6f5;
        }

        .ulvideolist a img {
            width: 24px;
            height: 24px;
            margin-right: 12px;
            opacity: 0.7;
        }

        .ulvideolist a div:last-child {
            font-size: 14px;
            font-weight: 500;
            line-height: 1.4;
        }

/* Contact Section */
.contact-section {
    /* Remove these lines */
    /* width: 100vw;
    margin-left: calc(50% - 50vw);
    position: absolute;
    bottom: 0; */
    /* Keep or add these */
    margin-top: 24px;
    padding: 16px; /* adjusted for better look */
    background: var(--video-item-bg);
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--sidebar-border);
    width: 100%; /* full width of sidebar */
}

    .contact-section p {
        color: var(--text-secondary);
        font-size: 14px;
        margin-bottom: 8px;
    }

    .contact-section a {
        color: #39c6f5;
        font-size: 20px;
        font-weight: 700;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;
    }

[data-bs-theme="dark"] .contact-section a {
    color: #22d3ee;
}

.contact-section a:hover {
    transform: scale(1.05);
}

/* Scrollbar Styling */
.videolist::-webkit-scrollbar,
.selectize-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.videolist::-webkit-scrollbar-track,
.selectize-dropdown-content::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

.videolist::-webkit-scrollbar-thumb,
.selectize-dropdown-content::-webkit-scrollbar-thumb {
    background: var(--sidebar-border);
    border-radius: 3px;
}

    .videolist::-webkit-scrollbar-thumb:hover,
    .selectize-dropdown-content::-webkit-scrollbar-thumb:hover {
        background: var(--text-secondary);
    }

/* Responsive Design */
@media screen and (max-width: 991px) {
    .videolist {
        border-left: none;
        border-top: 1px solid var(--sidebar-border);
        max-height: 400px;
    }

    .wrapper1 {
        /*        border-radius: 12px 12px 0 0;*/
        padding-top: 105%;
    }
}

@media screen and (max-width: 991px) {
    #myVideoModal .modal-dialog {
        max-width: 450px;
    }
}


    @media screen and (max-width: 768px) {
        #myVideoModal .modal-dialog {
            margin: 1rem;
        }

        #formvideo {
            padding: 12px;
        }

        .video-overlap .modal-title {
            font-size: 24px;
        }

        .phone-input {
        }

            .phone-input select {
                flex: 1;
            }

        .contact-section {
            display: block !important;
        }
    }

    /* Loading Animation */
    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    .fa-spinner.fa-spin {
        animation: spin 1s linear infinite;
    }

    /* Ensure dropdowns appear above overlay */
    body .selectize-dropdown {
        z-index: 10000 !important;
    }

    /* Fix for modal z-index */
    .modal-backdrop {
        z-index: 1040;
    }

    #myVideoModal {
        z-index: 1050;
    }

        /* Fix Selectize dropdown z-index and positioning in modal with overlay */
        #myVideoModal .selectize-dropdown {
            position: fixed !important;
            z-index: 1060 !important; /* Above modal (1050) and backdrop (1040) */
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }