/* modal content   */
.modal-dialog {
    width: 85%;
    max-width: 90vw;
}

@media (min-width: 768px) {
    .modal-dialog {
        width: 70%;
        max-width: 90vw;
    }
}

@media (min-width: 992px) {
    .modal-dialog {
        width: 60%;
        max-width: 90vw;
    }
}

@media (min-width: 1200px) {
    .modal-dialog {
        width: 50%;
        max-width: 90vw;
    }
}

/* Upcoming Classes Modal Styles */
.modal-content {
    border-radius: 20px !important;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
}

.date-item {
    cursor: pointer;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-item .form-check-input:checked+.form-check-label .fw-bold {
    color: #3d5ee1;
}

.date-item .form-check-input {
    width: 20px !important;
    height: 20px !important;
    border-color: #cbd5e1 !important;
    border-radius: 50% !important;
}

.date-item .form-check-input:checked {
    background-color: #3d5ee1 !important;
    border-color: #3d5ee1 !important;
}

.time-card {
    border-radius: 5px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.time-card:hover {
    background-color: #eef2ff;
    border-color: #3d5ee1 !important;
}

.time-card input[type="radio"] {
    cursor: pointer;
}

.select-date-btn {
    box-shadow: 0 4px 15px rgba(61, 94, 225, 0.3);
    transition: all 0.3s ease;
}

.select-date-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 94, 225, 0.4);
    background-color: #2e4bc4 !important;
}

.modal.fade {
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s linear, visibility 0.35s !important;
}

.modal.fade .modal-dialog {
    transform: translate3d(0, -50px, 0) !important;
}

.modal.show {
    visibility: visible;
}

.modal.show .modal-dialog {
    transform: translate3d(0, 50px, 0) !important;
}

.modal-header_flex-row {
    flex-direction: column;
}

@media (max-width: 576px) {
    .modal-dialog {
        width: 100vw !important;
        max-width: none !important;
        height: 100% !important;
        margin: 0 !important;
        transform: none !important;
    }

    .modal_image_container {
        height: 150px !important;
    }

    /* image  */
    .course_image_ratio {
        height: 100% !important;
    }

    /* fallback  */
    .modal-header .course-img-fallback {
        height: 100% !important;
        width: auto !important;
    }

    .modal-content {
        height: 100% !important;
        border: 0 !important;
        border-radius: 0 !important;
        max-height: 100vh !important;

    }

    .modal-header div {
        gap: 20px;
    }

    .modal-header div:nth-child(1) h5 {
        margin-bottom: 5px !important;
    }

    .date-item_time {
        grid-template-columns: 1fr !important;
    }

    #quickInquiryForm input {
        font-size: 16px;
    }
}


/* ======= Quick Inquiry Drawer Styles ======= */
.quick-inquiry-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.quick-inquiry-drawer.active {
    transform: translateX(0);
}

.quick-inquiry-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.quick-inquiry-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
}

.close-inquiry-btn {
    background: #f8f9fa;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
}

.inquiry-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

/* Country Code Dropdown */
.country-code-group {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #eee;
    border-radius: 8px;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    position: relative;
    /* needed for dropdown width reference */
}

.country-code-group .dropdown {
    position: static !important;
}

.country-code-group.focused {
    border-color: #3d5ee1;
    box-shadow: 0 0 0 4px rgba(61, 94, 225, 0.1);
}

.country-code-group .dropdown-menu {
    position: absolute !important;
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
    top: 100% !important;
}

.country-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border-radius: 8px 0 0 8px;
    border-right: 0;
    font-size: 14px;
    padding: 0 12px;
    border: none;
    background: #e9ecef;
}

.country-dropdown-btn:focus,
.country-dropdown-btn:active {
    outline: none;
    box-shadow: none;
    border: none;
}


.country-list-menu {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 220px;
    overflow-y: auto;
    font-size: 14px;
    border: 6px solid #ffffff !important;
    box-shadow: 0 0 0 1px #8e8e8eff, 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    padding: 5px !important;
    border-radius: 12px;
    background: #ffffff !important;
    margin-top: 10px !important;
}

/* Custom premium scrollbar for the dropdown */
.modal_scroll_container ::-webkit-scrollbar,
.country-list-menu::-webkit-scrollbar {
    width: 6px;
}
.modal_scroll_container ::-webkit-scrollbar-track,
.country-list-menu::-webkit-scrollbar-track {
    background: #dcddddff;
    border-radius: 10px;
    margin: 6px 0;
    transition: background 0.3s ease;
}
.modal_scroll_container ::-webkit-scrollbar-thumb,
.country-list-menu::-webkit-scrollbar-thumb {
    background: #8b9198ff !important;
    border-radius: 10px;
}
.modal_scroll_container ::-webkit-scrollbar-thumb:hover,
.country-list-menu::-webkit-scrollbar-thumb:hover {
    background: #5f6977ff !important;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px !important;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all 0.2s ease;
}

/* Override Bootstrap's default blue/white flash on click */
.country-item.dropdown-item:active,
.country-item.dropdown-item:focus {
    background-color: #eff6ff !important;
    color: #066ccb !important;
}

#selectedFlag {
    font-size: 18px;
}

.country-item:hover {
    background-color: #eff6ff !important;
    color: #066ccb !important;
}

.no-border_form {
    border: none !important;
    box-shadow: none !important;
    background: transparent;
}

.no-border_form:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Form Controls Polish */
.quick-inquiry-body .form-control {
    border: 1.5px solid #eee;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.quick-inquiry-body .form-control:focus {
    border-color: #3d5ee1;
    box-shadow: 0 0 0 4px rgba(61, 94, 225, 0.1);
}

.quick-inquiry-body .br-8 {
    border-radius: 8px;
}

#submitInquiry:hover {
    background-color: #2e4bc4;
    box-shadow: 0 8px 20px rgba(61, 94, 225, 0.3);
}

#submitInquiry:active {
    transform: translateY(0);
}

@media (max-width: 576px) {
    .quick-inquiry-drawer {
        width: 100%;
    }
}

/* ========== Schedule Selection Drawer Styles ========== */
.schedule-selection-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 100%;
    max-width: 30%;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.schedule-selection-drawer.active {
    right: 0;
}

.schedule-selection-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 16px;
}

.go-back-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.go-back-btn i {
    font-size: 20px;
    transform: scaleX(-1);
}

.schedule-selection-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.schedule-selection-body h4 {
    margin: 0;
    color: #1f2937;
    font-weight: 700;
    text-align: center;
    font-size: 20px;
}

.schedule-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.schedule-item-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    color: #1f2937;
    font-weight: 600;
}

.schedule-time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.schedule-time-card {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: #f8f9fa;
    border: 1.5px solid #e5e7eb;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.schedule-time-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3d5ee1;
}

.schedule-time-card input[type="checkbox"]:checked {
    accent-color: #3d5ee1;
}

.schedule-time-label {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    margin-left: 4px;
}

.schedule-selection-footer {
    border-top: 1px solid #e5e7eb;
    padding: 20px 24px;
    background: #f8f9fa;
    flex-shrink: 0;
}

#continueScheduleBtn {
    background-color: #3d5ee1;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

#continueScheduleBtn:hover {
    background-color: #2e4bc4;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(61, 94, 225, 0.3);
}

#continueScheduleBtn:active {
    transform: translateY(0);
}

#continueScheduleBtn:disabled {
    background-color: #d0d5dd;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .schedule-selection-drawer {
        max-width: 40%;
    }
}

@media (max-width: 768px) {
    .schedule-selection-drawer {
        max-width: 50%;
    }

    .schedule-time-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .schedule-selection-drawer {
        max-width: 100%;
    }

    .schedule-selection-header {
        padding: 16px 20px;
    }

    .schedule-selection-body {
        padding: 20px;
    }

    .schedule-selection-footer {
        padding: 16px 20px;
    }
}

/* Form Validation Feedback */
.form-control.is-invalid {
    border-color: #ea4335 !important;
    box-shadow: 0 0 0 4px rgba(234, 67, 53, 0.15) !important;
}

.country-code-group.is-invalid {
    border-color: #ea4335 !important;
    box-shadow: 0 0 0 4px rgba(234, 67, 53, 0.15) !important;
}

.invalid-feedback {
    display: none;
    color: #ea4335;
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
    padding-left: 4px;
    line-height: 1.4;
}

/* Premium Toast Styles */
#inquiryToast {
    position: fixed !important;
    top: 24px !important;
    left: 50% !important;
    z-index: 999999 !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
    min-width: 320px !important;
    max-width: 380px !important;
    pointer-events: none !important;
    /* Hidden state: invisible but not display:none so it can still animate */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) translateX(-50%) scale(0.95) !important;
    transition: opacity 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        visibility 0.35s !important;
}

#inquiryToast.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) translateX(-50%) scale(1) !important;
}

#inquiryToast.bg-success-toast .toast-icon-wrapper {
    background-color: #2ecc71 !important;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3) !important;
}

#inquiryToast.bg-danger-toast .toast-icon-wrapper {
    background-color: #e74c3c !important;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3) !important;
}

.toast-icon-wrapper {
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.flex-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}