/* ============================================================
   FreshDhara — Location Picker Modal
   Fullscreen map modal for manual location selection
   ============================================================ */

/* ─── MODAL OVERLAY ─── */
.fd-loc-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fd-loc-picker-modal.fd-loc-picker-visible {
    opacity: 1;
    visibility: visible;
}

/* ─── MODAL CONTENT ─── */
.fd-loc-picker-content {
    width: 95%;
    max-width: 700px;
    max-height: 92vh;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}

.fd-loc-picker-visible .fd-loc-picker-content {
    transform: translateY(0) scale(1);
}

/* ─── HEADER ─── */
.fd-loc-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #ff6f61 0%, #ff9a76 100%);
    color: #fff;
}

.fd-loc-picker-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fd-loc-picker-header-left > i {
    font-size: 1.4rem;
}

.fd-loc-picker-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.fd-loc-picker-hint {
    margin: 2px 0 0;
    font-size: 0.78rem;
    opacity: 0.9;
    font-family: 'Poppins', sans-serif;
}

.fd-loc-picker-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.fd-loc-picker-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ─── STATUS BAR ─── */
.fd-loc-picker-status {
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.fd-loc-picker-status.fd-loc-status-inside {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.12), rgba(39, 174, 96, 0.08));
    color: #27ae60;
}

.fd-loc-picker-status.fd-loc-status-outside {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.12), rgba(243, 156, 18, 0.08));
    color: #d4a017;
}

/* ─── MAP CONTAINER ─── */
.fd-loc-picker-map-container {
    position: relative;
    flex: 1;
    min-height: 350px;
}

#fd-loc-picker-map {
    width: 100%;
    height: 100%;
    min-height: 350px;
}

.fd-loc-picker-crosshair {
    display: none; /* Using marker instead */
}

/* ─── CUSTOM MARKER ─── */
.fd-loc-picker-marker-icon {
    background: none !important;
    border: none !important;
}

.fd-loc-picker-pin {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6f61;
    filter: drop-shadow(0 3px 6px rgba(255, 111, 97, 0.4));
}

.fd-loc-picker-pin i {
    font-size: 2.2rem;
}

/* ─── ZONE TOOLTIP ─── */
.fd-zone-tooltip {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ─── ACTIONS ─── */
.fd-loc-picker-actions {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.fd-loc-picker-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.fd-loc-picker-btn-cancel {
    background: #f1f1f1;
    color: #666;
}

.fd-loc-picker-btn-cancel:hover {
    background: #e5e5e5;
}

.fd-loc-picker-btn-confirm {
    background: linear-gradient(135deg, #ff6f61, #ff9a76);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.3);
}

.fd-loc-picker-btn-confirm:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 111, 97, 0.4);
}

.fd-loc-picker-btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
    color: #999;
    box-shadow: none;
}

/* ─── MOBILE RESPONSIVE ─── */
@media (max-width: 600px) {
    .fd-loc-picker-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100%;
    }

    .fd-loc-picker-map-container {
        min-height: 300px;
    }

    #fd-loc-picker-map {
        min-height: 300px;
    }

    .fd-loc-picker-header h3 {
        font-size: 0.95rem;
    }

    .fd-loc-picker-btn {
        padding: 12px 12px;
        font-size: 0.85rem;
    }
}

/* ─── DARK MODE ─── */
[data-theme="dark"] .fd-loc-picker-content {
    background: #1a1a2e;
}

[data-theme="dark"] .fd-loc-picker-header {
    border-bottom-color: #2d2d44;
}

[data-theme="dark"] .fd-loc-picker-actions {
    background: #16162b;
    border-top-color: #2d2d44;
}

[data-theme="dark"] .fd-loc-picker-btn-cancel {
    background: #2d2d44;
    color: #aaa;
}

[data-theme="dark"] .fd-loc-picker-status.fd-loc-status-inside {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(39, 174, 96, 0.1));
}

[data-theme="dark"] .fd-loc-picker-status.fd-loc-status-outside {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.15), rgba(243, 156, 18, 0.1));
}
