/* ==============================
   AGE VERIFICATION POPUP STYLE
    ============================== */


.age-popup {
    width: min(520px, 95%);
}

/* Red Box */
.age-popup {
    position: relative;

    background: linear-gradient(180deg, #c40000 0%, #7a0000 100%);
    border-radius: 25px;
    padding: 100px 40px 40px 40px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* 18+ Circle */
.age-icon {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 140px;
    background: linear-gradient(180deg, #d50000 0%, #900000 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 42px;
    font-weight: bold;
    color: #ffffff;
    border: 12px solid #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Text paragraph */
.age-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: white;
}

/* Question */
.age-question {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

/* Button container */
.age-btn-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 20px;
}

/* Common button style */
.btn {
    width: 80%;
    max-width: 420px;
    padding: 18px 20px;
    border-radius: 50px;
    border: none;
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

/* NO button (Dark red) */
.btn-no {
    background: #a63a3a;
    color: #ffffff;
}

.btn-no:hover {
    background: #922f2f;
    transform: translateY(-3px);
}

/* YES button (Bright red gradient) */
.btn-yes {
    background: linear-gradient(180deg, #e00000 0%, #b30000 100%);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.btn-yes:hover {
    background: linear-gradient(180deg, #ff1a1a 0%, #c00000 100%);
    transform: translateY(-3px);
}

/* Mobile */
@media (max-width: 480px) {
    .age-popup {
        padding: 70px 20px 30px 20px;
    }

    .age-icon {
        width: 100px;
        height: 100px;
        font-size: 32px;
        top: -50px;
    }

    .age-text {
        font-size: 14px;
    }
}

#ageModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 20px;
}

body.modal-open {
    overflow: hidden;
    height: 100vh;
}

.age-popup {
    width: min(520px, 95%);
    max-height: 95vh;
    overflow: auto;
}

/* Desktop: force popup inside screen */
@media (min-width: 769px) {

    #ageModal {
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .age-popup {
        max-height: 95vh;
        /* Never exceed screen height */
        overflow: hidden;
        /* No inner scroll */
    }
}


.alertpopup {
    z-index: 9999;
    margin-top: -10px !important;
}

.location-search-container {
    /* New styles for centering the input within its container */
    display: flex;
    /* Enable Flexbox */
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically (if needed) */
}

/* Ensure the input itself doesn't stretch beyond a readable width,
   or allow it to take the full width if that's desired for mobile UX */
.location-search-container input {
    max-width: 80%;
    /* Limit width to 80% of the container for a centered look */
}

/* .select2-container {
        width: 374.604px !important;
    } */

/* =========================
   MOBILE RESPONSIVE FIXES
   ========================= */
@media (max-width: 768px) {

    /* Container padding */
    .request_container,
    .main_form-con {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Center all form sections */
    .row>.col-md-4,
    .row>.col-md-5,
    .row>.col-md-8,
    .row>.col-md-2 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* Labels spacing */
    .form-label {
        margin-top: 10px;
        font-size: 14px;
    }

    /* Inputs full width */
    .custom-input,
    .form-control {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 14px;
    }

    /* Select2 full width */
    .select2-container {
        width: 100% !important;
    }

    .select2-selection {
        min-height: 42px;
        display: flex;
        align-items: center;
    }

    /* Price section stack */
    .price-section .col-md-2 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    /* Price symbol spacing */
    .PriceSymbol {
        padding: 0 12px;
    }

    /* Location icon row */
    .location-section img {
        height: 18px;
        width: 18px;
    }

    .current-location h6 {
        font-size: 13px;
    }

    /* Availability radio buttons */
    .d-flex.gap-4 {
        flex-direction: column;
        gap: 8px !important;
        align-items: flex-start !important;
    }

    /* Submit button */
    .submit-btn {
        font-size: 16px;
        padding: 12px;
        border-radius: 8px;
    }

    /* Modal full screen */
    #mapModal .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    #map {
        height: 300px !important;
    }

    /* Age modal */
    .age-popup {
        width: 90%;
        padding: 20px;
    }

    .age-title {
        font-size: 20px;
    }

    .age-text {
        font-size: 14px;
    }
}

/* Title Container */
.form-title {
    display: block;
    /* Remove -webkit-box to stop the "..." */
    line-height: 1.2;
    font-size: 26px;
    /* Desktop size */
    color: #000000;
    margin: 0 auto;
}

/* Brand Red (FLICKER) */
.brand-red {
    color: #d50000;
}

/* Subtitle Row - Forces the text to the 2nd line */
.sub-title {
    display: block;
    color: #000000;
    font-weight: normal;
    margin-top: 4px;
}

/* Red part of subtitle */
.text-red {
    color: #d50000;
}

/* MOBILE VIEW - FIX FOR THE "..." ISSUE */
@media (max-width: 480px) {
    .form-title {
        /* Decrease font size so the whole sentence fits on one line */
        font-size: 17px !important;
        overflow: visible !important;
        /* Ensures no text is hidden */
        display: block !important;
        -webkit-line-clamp: unset !important;
        /* Removes the limit */
    }

    .sub-title {
        font-size: 17px !important;
        white-space: nowrap;
        /* Forces "Immediate Solutions for all your needs" to stay on its own line */
    }
}

/* EXTRA SMALL PHONES (iPhone SE, etc) */
@media (max-width: 360px) {
    .form-title {
        font-size: 17px !important;
    }
}

/* =========================
   EXTRA SMALL DEVICES
   ========================= */
@media (max-width: 480px) {



    .input-group-text {
        padding: 0 10px;
        line-height: 1.7 !important;
    }

    .map-button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }
}

/* =========================
   PRICE INPUT FIX (ISOLATED)
   ========================= */
.price-section .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
        height: 43px;
}

.price-section .input-group-text.PriceSymbol {
    min-width: 42px;
    justify-content: center;
    white-space: nowrap;
}

.price-section .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

/* MOBILE ONLY */
@media (max-width: 768px) {
    .price-section .input-group {
        width: 100%;
    }
}

/* =========================
   LOCATION ICON – FINAL FIX
   ========================= */

/* Input-group icon (inside input) */
.location-section .input-group {
    display: flex;
    align-items: center;
}

.location-section .input-group-text {
    min-width: 42px;
    justify-content: center;
}

/* "Use current location" row */
.location-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.current-location {
    display: flex;
    align-items: center;
}

.current-location h6 {
    margin: 0;
    font-size: 13px;
}

/* Mobile spacing */
@media (max-width: 768px) {
    .location-section .input-group {
        width: 100%;
    }
}

/* =========================
   MOBILE INLINE FIXES
   ========================= */
@media (max-width: 768px) {

    /* 🔹 TYPE OF RATE – SAME LINE */
    .price-section .d-flex.gap-4 {
        flex-direction: row !important;
        justify-content: space-between;
        gap: 12px !important;
        flex-wrap: nowrap;
    }

    .price-section .d-flex.gap-4 label {
        font-size: 13px;
        white-space: nowrap;
    }

    /* 🔹 PRICE MIN / MAX – SAME LINE */
    .price-section .col-md-2 {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }

    .price-section .input-group {
        width: 100%;
    }

    /* 🔹 SERVICE AVAILABILITY – SAME LINE */
    .row.mb-3 .d-flex.gap-4 {
        flex-direction: row !important;
        justify-content: space-between;
        gap: 10px !important;
        flex-wrap: nowrap;
    }

    .row.mb-3 .d-flex.gap-4 label {
        font-size: 13px;
        white-space: nowrap;
    }
}

/* === COUNTRY SELECT STYLE === */

.country-section .select2-container {
    width: 100% !important;
}

.country-section .select2-container .select2-selection--single {
    height: 48px !important;
    border-radius: 10px !important;
    border: 1px solid #ddd !important;
    background: #f3f3f3 !important;
    padding-left: 10px !important;
}

/* Container for Country */
.icon-box-country {
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dcdcdc;
    background: #ffffff;
    /* White background makes flag colors look sharper */
}

/* Sharp Circular Flag Styling */
.icon-box-country img {
    width: 32px !important;
    height: 32px !important;
    object-fit: cover;
    /* Ensures the flag fills the circle without stretching */
    border-radius: 50% !important;
    /* Keeps your circle shape */

    /* --- FIX FOR BLURRINESS --- */
    image-rendering: -webkit-optimize-contrast;
    /* For Chrome/Safari */
    image-rendering: crisp-edges;
    /* For Firefox */
    image-rendering: pixelated;
    /* Forces sharp pixels */

    /* Subtitle border to define the circle edges clearly */
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: block;
}

/* Ensure the text in the select box is centered */
.country-section .select2-selection__rendered {
    text-align: center !important;
    width: 100%;
    padding-left: 0 !important;
}

/* 4. Hide flag inside the dropdown selection text */
.country-section .select2-selection__rendered img {
    display: none !important;
}

/* Container for Service icon */
.icon-box-service {
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dcdcdc;
    background: #f8f8f8;
}

/* Original Shape Style for Service */
.icon-box-service img {
    max-width: 32px !important;
    /* Limits width */
    max-height: 32px !important;
    /* Limits height */
    width: auto !important;
    /* Maintains original width ratio */
    height: auto !important;
    /* Maintains original height ratio */
    object-fit: contain !important;
    /* Shows full image, no cropping */
    border-radius: 0 !important;
    /* Removes circle/rounded shape */
    border: none !important;
    box-shadow: none !important;
}

/* Center the Select2 text for Service only */
#service_input+.select2-container .select2-selection__rendered {
    text-align: center !important;
    width: 100%;
}

.country-section .select2-selection__rendered {
    line-height: 46px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.country-flag {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 3px;
}

/* dropdown option */
.country-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* arrow fix */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 35px !important;
    right: 10px !important;
}

/* ===============================
   SERVICE NEED & AVAILABILITY
   =============================== */

.service-need-group,
.service-availability-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    /* 🔥 important */
}

/* Common Card Style */
.radio-card,
.radio-card-availability {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    background: #f1f1f1;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: 0.2s ease;
    height: 43px;
}

/* Hide default radio */
.radio-card input,
.radio-card-availability input {
    display: none;
}

/* Custom circle */
.custom-radio,
.custom-radio-availability {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #999;
    margin-right: 8px;
    position: relative;
}

/* Checked state */
.radio-card input:checked+.custom-radio,
.radio-card-availability input:checked+.custom-radio-availability {
    border-color: #a81c34;
}

.radio-card input:checked+.custom-radio::after,
.radio-card-availability input:checked+.custom-radio-availability::after {
    content: "";
    width: 8px;
    height: 8px;
    background: #a81c34;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Active card background */
.radio-card input:checked~.radio-text,
.radio-card-availability input:checked~.radio-text-availability {
    font-weight: 200;
}

/* ===============================
   MOBILE RESPONSIVE FIX
   =============================== */

@media (max-width: 768px) {

    /* Make radio buttons full width on mobile */
    .service-need-group {
        flex-direction: row;
        gap: 8px;
    }

    /* 2 items per row */
    .radio-card {
        flex: 0 0 48%;
        font-size: 13px;
        padding: 10px 12px;
    }



}

@media (max-width: 768px) {

    /* 🔹 SERVICE AVAILABILITY – FORCE SAME LINE */
    .service-availability-group {
        display: flex !important;
        flex-direction: row !important;
        /* Force horizontal */
        flex-wrap: nowrap !important;
        /* Prevent jumping to next line */
        gap: 5px !important;
        /* Reduce gap between items */
        width: 100%;
    }

    /* Adjust the individual cards to fit 3 in a row */
    .service-availability-group .radio-card-availability {
        flex: 1 1 0 !important;
        /* Distribute width equally */
        min-width: 0 !important;
        /* Allow them to shrink below content size */
        padding: 8px 4px !important;
        /* Tighten internal padding */
        justify-content: center;
        /* Center content */
    }

    /* Shrink text and icon to save space */
    .radio-text-availability {
        font-size: 11px !important;
        /* Slightly smaller font for mobile */
        white-space: nowrap;
        /* Keep text on one line */
    }

    .custom-radio-availability {
        width: 14px !important;
        height: 14px !important;
        margin-right: 4px !important;
    }
    
}

/* ===============================
   MODERN SELECT WITH ICON
   =============================== */

.modern-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    height: 43px;
}

.icon-box {
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dcdcdc;
    color: #333;
}

/* Force columns to maintain a consistent width on desktop */
@media (min-width: 768px) {

    .row.country-section .col-md-4,
    .row.location-section .col-md-4,
    .row.language-section .col-md-4,
    .row.price-section .col-md-4 {
        width: 33.33% !important;
        /* Fixed 4-column width */
        min-width: 350px;
        /* Prevents shrinking */
    }
}

/* Ensure Select2 always fills its parent modern-input-wrapper */
.modern-input-wrapper .select2-container {
    flex: 1 !important;
    width: 100% !important;
}

/* 1. Center the text in Select2 */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    text-align: center !important;
    width: 100%;
    padding-right: 30px;
    /* Leave space for the arrow */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 2. Position and Style the Arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 35px !important;
    right: 15px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. Replace the default small arrow with a custom icon */
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-style: none !important;
    /* Remove the default CSS triangle */
}

.select2-container--default .select2-selection--single .select2-selection__arrow::after {
    content: '\f107';
    /* FontAwesome Chevron Down icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 16px;
    color: #333;
}

/* 4. Fix for Country Select2 specifically (if it has flags) */
.country-section .select2-selection__rendered {
    justify-content: center !important;
    gap: 10px;
}

/* Fix for Select2 internal alignment */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: none !important;
    background: transparent !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
}

.icon-box i {
    font-size: 16px;
}

.modern-select {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 15px;
    outline: none;
    font-size: 14px;
    appearance: none;
}

/* Remove default arrow */
.modern-select::-ms-expand {
    display: none;
}

.service-wrapper .select2-container {
    width: 100% !important;
}

.service-wrapper .select2-selection--single {
    height: 48px !important;
    border: none !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
}

input:disabled,
select:disabled {
    background: #f3f3f3 !important;
    cursor: not-allowed;
    opacity: 0.7;
}