/* ===============================
   ORIGINAL CUSTOM-SELECT (DISABLED)
   =============================== */

/* Keep size so header layout doesn’t break */
#ddlCountry {
    /* margin-top: 74%; */
    width: 200px;
    color: #ee403c;
    border-radius: 6px !important;
    font-weight: bold;
}

/* Hide dropdown arrow & old options */
.custom-select .options {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Make selected-option look clickable */
.custom-select .selected-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.custom-select .flag {
    width: 20px;
    height: 15px;
}

/* Responsive old styling kept */
@media (max-width: 600px) {
    .custom-select {
        width: 130px;
    }

    .custom-select .selected-option {
        padding: 6px 8px;
        font-size: 13px;
    }
}

@media only screen and (max-width: 1280px) and (max-height: 720px) {
    .custom-select {
        width: 100px !important;
    }
}

@media (max-width:767px) {
    #ddlCountry {
        width: 100px !important;
        color: #ee403c;
        margin-top: 0%;
        margin-left: 23%;
        background-color: #191919;
    }
}

/* ======================================================
   COUNTRY MODAL — NEW UI (THIS IS THE PART YOU REQUESTED)
   ====================================================== */
/* ======================================================
   COUNTRY MODAL — RESPONSIVE UPGRADE
   ====================================================== */

/* Modal wrapper */
.country-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 20px;
    /* avoid edges on mobile */
}

/* Modal content */
.country-modal-content {
    width: 90%;
    max-width: 1400px;
    min-height: auto;
    height: auto;
    max-height: 95vh;
    background: white;
    border-radius: 12px;
    overflow-y: auto;
    padding-bottom: 30px;
    position: relative;
}


.country-modal-close {
    position: absolute;
    top: 15px;
    right: 18px;
    font-size: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
}

.country-modal-close:hover {
    color: #e74c3c;
}

/* Title */
.section-title {
    text-align: center;
    margin: 20px 0 10px;
}

/* Layout */
.country-selector {
    display: flex;
    gap: 20px;
    padding: 10px 20px;
}

/* Map area */
.map-container {
    flex: 1;
    min-width: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.country-map {
    width: 100%;
    max-width: 600px;
    height: auto;
}

/* Country list side */
.country-list-container {
    flex: 1;
    min-width: 280px;
    padding: 10px 20px;
}

.country-list-title {
    font-size: 22px;
    margin-bottom: 10px;
}

/* FIX: remove HUGE padding */
.country-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 0;
    /* fixed */
}

/* Country option */
.country-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    transition: all .3s ease;
    cursor: pointer;
}

.country-option:hover {
    background: #f0f7ff;
    border-color: #3498db;
}

.country-option.active {
    background: #e1f0fa;
    border-color: #3498db;
}

/* Flag */
.country-flag {
    width: 26px;
    height: 18px;
    margin-right: 10px;
}

/* ------------------------------------------------------
   TABLET RESPONSIVE
   ------------------------------------------------------ */
@media (max-width: 992px) {
    .country-selector {
        flex-direction: column;
        padding: 0 15px;
    }

    .country-list-container {
        padding: 10px 5px;
    }
}

/* ------------------------------------------------------
   MOBILE RESPONSIVE
   ------------------------------------------------------ */
@media (max-width: 600px) {

    .country-modal-content {
        width: 100%;
        padding-bottom: 20px;
        border-radius: 10px;
    }

    .country-selector {
        padding: 10px;
    }

    .map-container {
        padding: 5px;
    }

    .country-map {
        max-width: 100%;
        height: auto;
    }

    .country-list {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .country-option {
        padding: 10px;
        font-size: 14px;
    }

    .country-flag {
        width: 22px;
        height: 16px;
    }
}

/* ------------------------------------------------------
   VERY SMALL SCREENS
   ------------------------------------------------------ */
@media (max-width: 400px) {
    .country-list {
        grid-template-columns: 1fr;
    }
}