@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-main: #02090C;
    --bg-panel: transparent;
    --primary-cyan: #00E3D3;
    --border-panel: #0A4D54; 
    --border-input: #103c42; 
    --text-white: #ffffff;
    --text-muted: #8a9eac;
    --font-main: 'Montserrat', 'Cairo', sans-serif;
}

body {
    background: #01141A;
    color: var(--text-white);
    font-family: 'Inter', 'Montserrat', sans-serif;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(213.4deg, #01141A 59.23%, #056280 276.19%) !important;
    z-index: -9999;
}

.text-cyan {
    color: var(--primary-cyan) !important;
}

.fs-7 {
    font-size: 0.85rem;
}

/* Header */
.btn-return {
    border: 1px solid var(--primary-cyan);
    color: var(--text-white);
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s ease;
    background-color: #01161C;
    border-radius: 6px;
}
.btn-return:hover {
    box-shadow: 0 0 15px rgba(0, 227, 211, 0.4);
    color: var(--primary-cyan);
}

/* Panels */
.sidebar-panel, .form-panel {
    border: 1px solid transparent;
    border-radius: 20px;
}

.sidebar-panel {
    background: linear-gradient(213.4deg, #01141A 59.23%, #056280 276.19%) padding-box,
                linear-gradient(180deg, #00D4E5 0%, #00D4E5 100%) border-box;
    padding: 2.5rem 1.5rem;
}

.form-panel {
    background: 
        linear-gradient(213.4deg, #01141A 59.23%, #056280 276.19%) padding-box,
        linear-gradient(180deg, #9BFC2D 0%, #2C522A 15%, #2C522A 100%) border-box;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

/* Sidebar Specifics */
.sidebar-main-title {
    line-height: 1.4;
}

.text-gradient-green-wrapper {
    display: inline-block;
}

.text-gradient-green-text {
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 900;
    background: linear-gradient(180deg, #AFFF1F 0%, #3BA100 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    line-height: 1.2;
    padding-bottom: 5px;
}

.title-white {
    color: #ffffff;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    display: inline-block;
}

.sidebar-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: #ffffff;
}

/* Feature Cards */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center; /* Center cards in the sidebar */
}
.feature-card {
    width: 100%;
    max-width: 360px; /* EXACT Figma width */
    min-height: 80px; 
    border: 1px solid rgba(0, 212, 229, 0.5); /* 50% opacity to reduce glare */
    border-radius: 10px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    background-color: rgba(0, 25, 32, 0.4);
    backdrop-filter: blur(12.6px);
    -webkit-backdrop-filter: blur(12.6px);
    box-shadow: 2px 2px 4px 0px rgba(125, 253, 255, 0.1); /* softer shadow */
    margin: 0 auto;
}
.feature-icon {
    margin-left: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.feature-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
}
.feature-text h6 {
    font-size: 1.25rem;
    font-weight: bold !important;
    color: var(--primary-cyan) !important;
    margin-bottom: 0.2rem !important;
}
.feature-text p {
    font-size: 0.95rem;
    font-weight: bold !important;
    color: #ffffff !important;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Dashed Box */
.dashed-box {
    width: 100%;
    max-width: 354px;
    min-height: 160px;
    border: none;
    border-radius: 10px;
    background-color: #01161C;
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='10' ry='10' stroke='%2390D111' stroke-width='2' stroke-dasharray='8%2c 8' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
}
.dashed-box-item {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 21px !important;
    font-weight: 400 !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    text-align: center !important;
    padding: 0 1rem;
}
.dashed-divider {
    width: 122px;
    height: 1px;
    background: linear-gradient(90deg, rgba(65, 82, 71, 0.33) 0%, rgba(255, 255, 255, 0.33) 40.47%, rgba(1, 20, 26, 0.33) 97.87%);
    margin: 0 auto;
    backdrop-filter: blur(1px);
    border: none;
}
.shield-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Form Styles */
.form-header {
    padding-bottom: 1.5rem;
}
.form-title-icon {
    font-size: 2.8rem;
}
.title-white-stroke-wrapper {
    display: inline-block;
}

.title-white-stroke-text {
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 900;
    background: linear-gradient(180deg, #A1ABB5 0%, #D2E1E8 50%, #9AA4AD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    line-height: 1;
    padding-bottom: 5px;
}
.form-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

/* Inputs */
.input-wrapper {
    position: relative;
}
.input-wrapper .form-control, 
.input-wrapper .form-select {
    background-color: #01141A;
    border: 1px solid rgba(74, 242, 226, 0.5); /* #4AF2E2 50% */
    color: #ffffff;
    padding: 0 1.5rem;
    padding-right: 3rem; /* Space for icon on right */
    border-radius: 10px;
    height: 50px;
    font-size: 16px;
    font-weight: 400 !important;
    transition: all 0.3s ease;
    text-align: right !important;
}
.input-wrapper .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400 !important;
}
.input-wrapper .form-control:focus,
.input-wrapper .form-select:focus {
    background-color: #01141A;
    border-color: #4AF2E2;
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(74, 242, 226, 0.25);
}
.input-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4AF2E2;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 5;
}

.input-wrapper.icon-left .form-control {
    padding-left: 3rem;
    padding-right: 1.5rem;
}

.input-wrapper.icon-left .input-icon {
    right: auto;
    left: 1.2rem;
}

/* Custom Dropdown Styling */
.custom-dropdown-btn {
    background-color: #01141A;
    border: 1px solid rgba(74, 242, 226, 0.5);
    color: rgba(255, 255, 255, 0.5);
    padding: 0 1.5rem;
    padding-right: 3rem; /* Space for icon */
    border-radius: 10px;
    height: 50px;
    font-size: 16px;
    font-weight: 400 !important;
    width: 100%;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.custom-dropdown-btn.has-value {
    color: #ffffff;
}
.custom-dropdown-btn:focus, .custom-dropdown-btn[aria-expanded="true"] {
    border-color: #4AF2E2;
    box-shadow: 0 0 0 0.25rem rgba(74, 242, 226, 0.25);
    outline: none;
}
.custom-dropdown-btn::after {
    display: none; /* Hide default bootstrap dropdown arrow */
}

.custom-dropdown-menu {
    background-color: #041E26; /* Dark teal background to match screenshot */
    border: 1px solid rgba(74, 242, 226, 0.3);
    border-radius: 15px;
    padding: 0;
    margin-top: 5px;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.custom-dropdown-menu li {
    border-bottom: 1px solid #1A6B70; /* Cyan separator line */
}
.custom-dropdown-menu li:last-child {
    border-bottom: none;
}
.custom-dropdown-menu .dropdown-item {
    color: #ffffff;
    padding: 14px 20px;
    text-align: right;
    font-size: 16px;
    font-weight: 400 !important;
    font-family: 'Inter', 'Montserrat', sans-serif; /* Clean font for numbers */
    transition: all 0.2s ease;
}
.custom-dropdown-menu .dropdown-item:hover,
.custom-dropdown-menu .dropdown-item:focus {
    background-color: rgba(74, 242, 226, 0.15);
    color: #4AF2E2;
}

.input-wrapper textarea.form-control {
    height: auto;
    min-height: 100px;
    padding-top: 1rem;
}
.align-textarea-icon {
    top: 1.1rem;
    transform: none;
}

/* Source Buttons */
.source-btn {
    width: 100%;
    background-color: #01141A;
    border: 1px solid rgba(74, 242, 226, 0.5);
    border-radius: 8px;
    padding: 0.6rem 0.5rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.3s ease;
}
.source-btn i {
    color: #4AF2E2;
    font-size: 1.1rem;
}
.source-btn:hover {
    background-color: rgba(74, 242, 226, 0.1);
    color: #ffffff;
    border-color: #4AF2E2;
}

/* Time Options */
.time-option-card {
    background-color: #01141A;
    border: 1px solid #258480;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 120px;
    box-sizing: border-box;
}
.time-option-card:hover, .time-option-card:has(input:checked) {
    border-color: #4AF2E2;
    box-shadow: 0 0 10px rgba(74, 242, 226, 0.3);
}
.custom-empty-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    flex-shrink: 0;
    border: 1px solid #258480;
    border-radius: 5px;
    background-color: #01141A;
    transition: all 0.3s ease;
    margin: 0 auto;
}
.time-option-card:has(input:checked) .custom-empty-checkbox {
    background-color: #4AF2E2;
    border-color: #4AF2E2;
}
.time-option-card:has(input:checked) .custom-empty-checkbox::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 7px;
    width: 7px;
    height: 14px;
    border: 2px solid #01141A;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* Buttons */
.btn-send {
    width: 183px;
    height: 45px;
    background: linear-gradient(90deg, #102C29, #27A28B);
    border: 1px solid #00ADA6;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s ease;
}
.btn-send:hover {
    color: #ffffff;
    opacity: 0.9;
}
.btn-back {
    width: 183px;
    height: 45px;
    background-color: #01181F;
    border: 1px solid #00ADA6;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s ease;
}
.btn-back:hover {
    color: #ffffff;
    opacity: 0.9;
}

/* Social Icons */
.social-link {
    color: var(--text-white);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}
.social-link:hover {
    color: var(--primary-cyan);
    transform: translateY(-2px);
}

@media (min-width: 992px) {
    .sidebar-panel, .form-panel {
        padding: 3rem 2.5rem;
    }
    main.container-fluid {
        margin-top: 80px !important;
    }
}

/* ========================================= */
/* MOBILE RESPONSIVE FIXES (Max-width 991px) */
/* ========================================= */
@media (max-width: 767px) {
    /* 1. Header & Back Button */
    header.fixed-top {
        position: absolute !important;
        background: transparent !important;
        border: none !important;
        padding: 1rem !important;
    }
    header .order-1 {
        position: absolute;
        top: 175px; /* Reduced to match the smaller margin of main container */
        left: 45px; /* Moved right to be fully inside the card */
        z-index: 1040;
    }
    header .order-2 {
        width: 100%;
        justify-content: space-between !important;
        flex-direction: row-reverse !important;
    }
    .btn-return {
        border-radius: 50% !important;
        width: 32px;
        height: 32px;
        padding: 0 !important;
        background: transparent !important;
        border: 1.5px solid #90D111 !important;
        color: #90D111 !important;
        font-size: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .btn-return i {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }
    
    /* Hide bottom back button */
    #backBtn {
        display: none !important;
    }

    /* Larger Title */
    .sidebar-main-title .fs-1 {
        font-size: 2.2rem !important;
    }

    /* 2. Panels Padding */
    .sidebar-panel {
        padding: 2rem 1rem 0 !important; /* Adjusted to align with the back button */
    }
    .form-panel {
        padding: 0.5rem 1rem 2rem !important;
    }

    /* 2. Merge Cards on Mobile (Main acts as the card) */
    main.container-fluid {
        margin: 80px 0.5rem 2rem !important;
        width: calc(100% - 1rem);
        border: 1px solid #00D4E5 !important;
        border-radius: 20px;
        background: transparent !important; /* Let body gradient show through like index */
        overflow: hidden;
    }
    .layout-row {
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
        border-radius: 0 !important;
    }
    .sidebar-panel, .form-panel {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
    }

    /* Removed Time Options Mobile Styles (Now handled by Bootstrap grid) */

    /* 4. Footer Layout */
    .form-footer { 
        flex-direction: column !important; 
        gap: 1.5rem; 
        padding: 20px 0 0 0 !important; 
        position: relative;
        z-index: 1;
        margin-top: 10px !important;
        background: transparent !important;
    }
    .form-footer::before {
        display: none !important;
    }
    .form-footer .bottom-logos { 
        order: 1 !important; 
        margin-bottom: 0 !important;
        flex-direction: column-reverse !important; /* AE on top */
        align-items: center;
        gap: 1.5rem !important;
        width: 100%;
    }
    .form-footer .social-icons { order: 2 !important; margin-bottom: 0 !important; }
    .form-footer > div:first-child { order: 3 !important; }
    .bottom-logos img { height: 65px !important; width: auto; object-fit: contain; }
    
    /* Smaller feature icons on mobile */
    .feature-icon img {
        width: 32px !important;
        height: 32px !important;
    }
}

/* ============================================= */
/* TABLET RESPONSIVE (768px - 991px)             */
/* Same layout as desktop, adapted for tablet    */
/* ============================================= */
@media (min-width: 768px) and (max-width: 991px) {

    header.fixed-top {
        position: fixed !important;
        background-color: var(--bg-main) !important;
        border-bottom: 1px solid rgba(0, 227, 211, 0.1) !important;
        padding: 0.75rem 1.5rem !important;
    }
    header .order-1 {
        position: static !important;
        top: auto !important;
        left: auto !important;
    }
    header .order-2 {
        width: auto !important;
        flex-direction: row !important;
    }
    .btn-return {
        border-radius: 6px !important;
        width: auto !important;
        height: auto !important;
        padding: 0.4rem 1rem !important;
        background-color: #01161C !important;
        border: 1px solid var(--primary-cyan) !important;
        color: var(--text-white) !important;
        font-size: 0.85rem !important;
    }
    .btn-return i { font-size: 1rem !important; margin: 0 0 0 0.4rem !important; }

    #backBtn { display: flex !important; }

    main.container-fluid {
        margin: 80px 1rem 2rem !important;
        width: calc(100% - 2rem) !important;
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        overflow: visible !important;
    }

    .layout-row {
        --bs-gutter-x: 1.5rem !important;
        --bs-gutter-y: 1.5rem !important;
        margin: 0 !important;
    }

    .sidebar-panel {
        background: linear-gradient(213.4deg, #01141A 59.23%, #056280 276.19%) padding-box,
                    linear-gradient(180deg, #00D4E5 0%, #00D4E5 100%) border-box !important;
        border: 1px solid transparent !important;
        border-radius: 20px !important;
        backdrop-filter: blur(10px) !important;
        padding: 2rem 1.2rem !important;
    }
    .form-panel {
        background:
            linear-gradient(213.4deg, #01141A 59.23%, #056280 276.19%) padding-box,
            linear-gradient(180deg, #9BFC2D 0%, #2C522A 15%, #2C522A 100%) border-box !important;
        border: 1px solid transparent !important;
        border-radius: 20px !important;
        backdrop-filter: blur(10px) !important;
        padding: 2rem 1.2rem !important;
    }

    .col-lg-4 { flex: 0 0 auto; width: 38% !important; }
    .col-lg-8 { flex: 0 0 auto; width: 62% !important; }
    .order-lg-1 { order: 1 !important; }
    .order-lg-2 { order: 2 !important; }

    .sidebar-main-title .fs-1 { font-size: 2rem !important; }
    .text-gradient-green-text { font-size: 2rem !important; }
    .title-white-stroke-text { font-size: 1.6rem !important; }
    .form-label { font-size: 15px !important; }
    .sidebar-subtitle { font-size: 0.85rem !important; }
    .feature-text h6 { font-size: 1rem !important; }
    .feature-text p { font-size: 0.8rem !important; }
    .dashed-box-item { font-size: 18px !important; }


}

/* Footer Background Lines Opacity */
.form-footer::before {
    opacity: 0.15 !important;
}

@media (min-width: 768px) {
    .desktop-time-container {
        border: 1px solid #258480;
        border-radius: 12px;
        background-color: #01141A;
    }
    .desktop-time-container .time-option-card {
        height: auto !important;
        min-height: 50px;
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        padding: 12px 20px !important;
        box-shadow: none !important;
    }
    .desktop-time-container .time-option-card:hover,
    .desktop-time-container .time-option-card:has(input:checked) {
        background-color: rgba(74, 242, 226, 0.1) !important;
    }
}

/* Tablet Fixes */
@media (min-width: 768px) and (max-width: 1199px) {
    /* Make sidebar green icons smaller and move up */
    .feature-icon img {
        width: 32px !important;
        height: 32px !important;
        transform: translateY(-5px);
    }
    
    /* Align Email and Phone inputs by ensuring labels have same height */
    .col-md-6 .form-label {
        min-height: 42px;
        display: flex;
        align-items: flex-end;
    }
    
    /* Ensure the wrapper doesn't jump */
    .input-wrapper {
        margin-top: 5px;
    }
    
    /* Reduce gap below form header */
    .form-header.mb-5 {
        margin-bottom: 1rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* Put buttons next to each other and reduce width */
    .form-panel .d-flex.flex-wrap {
        flex-wrap: nowrap !important;
    }
    .btn-send, .btn-back {
        width: 140px !important;
    }
}
