﻿/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f6fa;
    color: #2c3e50;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 25px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    margin-bottom: 25px;
}

    .site-header h1 {
        margin: 0;
        font-size: 26px;
        font-weight: 600;
    }

    .site-header p {
        margin: 8px 0 0 0;
        font-size: 14px;
        opacity: 0.95;
    }

/* ============================================
   MAIN CONTAINER
   ============================================ */
.main-container {
    padding-bottom: 40px;
}

/* ============================================
   CARD COMPONENT
   ============================================ */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

    .card:hover {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }

.card-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;
    border-bottom: none;
}

    .card-header .glyphicon {
        margin-right: 8px;
    }

.card-body {
    padding: 25px;
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 8px;
        font-size: 14px;
    }

        .form-group label .required {
            color: #e74c3c;
            margin-left: 3px;
        }

.form-control {
    height: 44px;
    border: 2px solid #dfe3e8;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.3s;
    width: 100%;
}

    .form-control:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
        outline: none;
    }

.bootstrap-select .btn {
    height: 44px;
    border: 2px solid #dfe3e8;
    background: white;
    border-radius: 6px;
    padding: 10px 15px;
    text-align: left;
    font-size: 14px;
    transition: all 0.3s;
}

    .bootstrap-select .btn:focus {
        outline: none !important;
        border-color: #3498db;
        box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
    }

/* ============================================
   BUTTONS
   ============================================ */
.btn-search {
    width: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    color: white;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    margin-top: 10px;
}

    .btn-search:hover {
        background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    }

    .btn-search:active {
        transform: translateY(0);
    }

    .btn-search .glyphicon {
        margin-right: 8px;
    }

.btn-register {
    width: 100%;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border: none;
    color: white;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    margin-top: 10px;
}

    .btn-register:hover {
        background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
    }

    .btn-register:active {
        transform: translateY(0);
    }

    .btn-register .glyphicon {
        margin-right: 8px;
    }

/* ============================================
   RESULT CARD
   ============================================ */
.result-card {
    display: none;
}

    .result-card.active {
        display: block;
    }

.registration-card {
    display: none;
}

    .registration-card.active {
        display: block;
    }

/* ============================================
   STATUS BADGE
   ============================================ */
.status-badge {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .status-badge.success {
        background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
        color: white;
    }

    .status-badge.warning {
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
        color: white;
    }

    .status-badge.error {
        background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
        color: white;
    }

    .status-badge .glyphicon {
        margin-right: 6px;
    }

/* ============================================
   RESULT SECTION
   ============================================ */
.result-section {
    margin-bottom: 25px;
}

.section-title {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

    .info-table tr {
        border-bottom: 1px solid #ecf0f1;
    }

        .info-table tr:last-child {
            border-bottom: none;
        }

    .info-table td {
        padding: 12px 8px;
        font-size: 14px;
    }

.label-col {
    font-weight: 600;
    color: #7f8c8d;
    width: 40%;
}

.value-col {
    color: #2c3e50;
}

/* ============================================
   ALERT BOX
   ============================================ */
.alert-info-box {
    background: #e8f6f3;
    border-left: 4px solid #27ae60;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.6;
}

    .alert-info-box .glyphicon {
        margin-right: 6px;
    }

/* ============================================
   REGISTRATION FORM
   ============================================ */
.registration-notice {
    background: #fff3cd;
    border-left: 4px solid #f39c12;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

    .registration-notice p {
        margin: 0;
        font-size: 14px;
        color: #856404;
    }

.form-label-bold {
    display: block;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 15px;
}

/* ============================================
   CUSTOM RADIO BUTTONS
   ============================================ */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: block;
    position: relative;
    padding: 16px 20px 16px 50px;
    background: #f8f9fa;
    border: 2px solid #dfe3e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
    font-weight: normal;
}

    .radio-option:hover {
        background: #e9ecef;
        border-color: #3498db;
    }

    .radio-option input[type="radio"] {
        position: absolute;
        left: 18px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        margin: 0;
        cursor: pointer;
    }

        .radio-option input[type="radio"]:checked + .radio-label {
            color: #3498db;
            font-weight: 600;
        }

    .radio-option:has(input[type="radio"]:checked) {
        background: #e3f2fd;
        border-color: #3498db;
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
    }

.radio-label {
    display: block;
    font-size: 15px;
    color: #2c3e50;
    transition: all 0.3s;
}

    .radio-label .glyphicon {
        margin-right: 8px;
        color: #3498db;
    }

/* ============================================
   MODAL STYLES
   ============================================ */
.modal-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-radius: 6px 6px 0 0;
}

    .modal-header .modal-title {
        font-weight: 600;
    }

    .modal-header .close {
        color: white;
        opacity: 0.8;
    }

        .modal-header .close:hover {
            opacity: 1;
        }

.modal-body {
    padding: 25px;
    font-size: 15px;
    line-height: 1.6;
}

.modal-footer {
    border-top: none;
    padding: 15px 25px 25px 25px;
}

    .modal-footer .btn {
        padding: 10px 30px;
        font-weight: 600;
    }

/* ============================================
   RESPONSIVE - MOBILE FIRST
   ============================================ */

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .site-header h1 {
        font-size: 20px;
    }

    .site-header p {
        font-size: 12px;
    }

    .card-body {
        padding: 20px 15px;
    }

    .btn-search,
    .btn-register {
        font-size: 14px;
        padding: 12px 20px;
    }

    .status-badge {
        font-size: 12px;
        padding: 10px 20px;
    }

    .label-col {
        width: 45%;
    }

    .radio-option {
        padding: 14px 18px 14px 45px;
    }

        .radio-option input[type="radio"] {
            left: 15px;
        }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .site-header h1 {
        font-size: 24px;
    }

    .label-col {
        width: 42%;
    }
}

/* Desktop (>= 992px) */
@media (min-width: 992px) {
    .main-container {
        padding-top: 10px;
    }

    /* Ensure equal height cards on desktop */
    .row {
        display: flex;
        flex-wrap: wrap;
    }

        .row > [class*='col-'] {
            display: flex;
            flex-direction: column;
        }
}

/* Large Desktop (>= 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Mobile/Small screen: 2 card nằm ngang 1 row */
@media (max-width: 767px) {
    .result-card {
        display: block;
        /*width: 100%;*/
        vertical-align: top;
        margin-bottom: 15px;
    }

        .result-card:first-child {
            margin-right: 1%;
        }
}

/* Tablet/Medium screen: giữ nguyên full width */
@media (min-width: 768px) and (max-width: 991px) {
    .result-card {
        width: 100%;
        display: block;
    }
}

/* ajaxLoadingOverlay */
#ajaxLoadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ajax-spinner {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spinner-border {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ajax-spinner p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

/* END ajaxLoadingOverlay */

/* menu wrapper */
.bootstrap-select .dropdown-menu {
    overflow: hidden !important; /* wrapper không cuộn */
}

/* phần list thật sự (UL) */
.bootstrap-select ul.dropdown-menu.inner {
    overflow-y: auto !important; /* cuộn dọc */
    overflow-x: hidden !important; /* chặn cuộn ngang */
    max-height: 280px !important; /* giới hạn để cuộn */
}

/* (tuỳ chọn) nếu vẫn có ngang do text dài */
.bootstrap-select ul.dropdown-menu.inner li a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    .bootstrap-select ul.dropdown-menu.inner {
        max-height: 50vh !important;
        -webkit-overflow-scrolling: touch;
    }
}


ul.dropdown-menu.inner {
    display: contents;
}




