/* ==========================================================
   🌍 City–Locality Selector Frontend Styles (v3.6 CLEAN)
   ========================================================== */

/* ===============================
   Core Form Layout
=============================== */

.ct-custom-location-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
    background: #fff9e9;
    border: 1px solid #f7c9c9;
    border-radius: 10px;
    padding: 18px 20px;
    margin: 15px 0 25px;
    box-sizing: border-box;
}

/* Full width blocks */
#cls-current-box,
#cls-current-map,
#ct-distance-label,
#ct-delivery-preview,
.ct-delivery-datetime,
.ct-delivery-summary {
    grid-column: 1 / -1;
}

/* ===============================
   Labels
=============================== */

.ct-custom-location-fields label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: #222;
    font-size: 15px;
}

label span {
    color: red;
}

/* ===============================
   Inputs & Selects
=============================== */

.ct-custom-location-fields input[type="text"],
.ct-custom-location-fields select,
.ct-custom-location-fields
.select2-container
.select2-selection--single {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

.ct-custom-location-fields input:focus,
.ct-custom-location-fields select:focus {
    border-color: #ff7b00;
    box-shadow: 0 0 0 2px rgba(255,140,0,.2);
    outline: none;
}

/* ===============================
   Address Row
=============================== */

.cls-address-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.cls-address-text {
    flex: 1;
}

.cls-icon-btn {
    width: 34px;
    height: 34px;
}

/* ===============================
   Map
=============================== */

.cls-map-toggle-btn {
    margin-top: 10px;
    padding: 8px 14px;
    background: #6c5ce7;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.cls-map-toggle-btn:hover {
    background: #5a4bdc;
}

.cls-map-inline {
    width: 100%;
    height: 220px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

/* ===============================
   Distance & Delivery Charge
=============================== */

.ct-distance-label {
    background: #e8f1ff;
    color: #003366;
    border-left: 4px solid #337ab7;
    font-weight: 600;
    border-radius: 6px;
    padding: 10px 12px;
}

.ct-delivery-preview {
    background: #eafbea;
    color: #056b2c;
    border-left: 4px solid #38a169;
    font-weight: 700;
    border-radius: 6px;
    padding: 10px 12px;
}

/* ===============================
   Delivery Date & Slot
=============================== */

.ct-delivery-datetime h4,
.ct-delivery-summary h4 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* SAME FEEL AS CITY / LOCALITY */
.ct-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ct-col {
    width: 100%;
}

/* ===============================
   Delivery Summary
=============================== */

.ct-delivery-summary {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f9fff6;
    border: 2px solid #4caf50;
    border-radius: 10px;
}

.ct-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.ct-summary-total {
    border-top: 1px dashed #b5e7b5;
    margin-top: 8px;
    padding-top: 10px;
    font-size: 15px;
}

.ct-summary-total strong {
    color: #2e7d32;
}

/* ===============================
   Disabled Button
=============================== */

button.cls-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===============================
   Route Map Modal
=============================== */

#cls-map-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999999;
    display: none;
}

#cls-map-modal[aria-hidden="true"] {
    display: none;
}

.cls-map-box {
    position: relative;
    width: 92%;
    max-width: 900px;
    margin: 6vh auto;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
}

#cls-map-route {
    width: 100%;
    height: 420px;
}

.cls-map-close {
    position: absolute;
    right: 10px;
    top: 6px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* ===============================
   Responsive
=============================== */

@media (max-width: 768px) {

    .ct-custom-location-fields {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 15px;
    }

    .ct-row {
        grid-template-columns: 1fr;
    }

    .cls-map-inline {
        height: 180px;
    }
}



/* ===============================
   Delivery Date Dropdown Styling
   =============================== */
/* 🔥 FORCE EMOJI SUPPORT (VERY IMPORTANT) */
/* ================================
   DELIVERY DATE DROPDOWN – UX FIX
================================ */

/* Disabled option (holiday / maintenance) */
#cls_delivery_date option:disabled {
    color: #9aa0a6 !important;        /* soft grey */
    background-color: #f5f5f5;         /* light bg */
    font-style: italic;
}

/* Disabled option with reason text */
#cls_delivery_date option:disabled::before {
    content: "🚫 ";
}

/* Whole select cursor feedback */
#cls_delivery_date:has(option:disabled) {
    cursor: pointer;
}

/* When select itself is disabled */
#cls_delivery_date:disabled {
    cursor: not-allowed;
    background-color: #f2f2f2;
}

/* Improve group separators */
#cls_delivery_date option.week-separator {
    font-weight: 600;
    color: #666;
    background: #fafafa;
}

/* Prevent selection highlight confusion */
#cls_delivery_date option:disabled:checked {
    background: #f5f5f5;
    color: #9aa0a6;
}
