/**
 * Location Detector CSS
 */

/* Location Display */
.wgl-location-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 14px;
}

.wgl-current-location {
    font-weight: 600;
    color: #495057;
}

.wgl-delivery-status {
    margin-top: 5px;
    font-size: 12px;
}

.wgl-delivery-available {
    color: #28a745;
}

.wgl-delivery-unavailable {
    color: #dc3545;
}

/* Location Popup */
.wgl-location-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wgl-location-popup.wgl-popup-show {
    opacity: 1;
    visibility: visible;
}

.wgl-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.wgl-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.wgl-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.wgl-popup-header h3 {
    margin: 0;
    font-size: 18px;
    color: #495057;
}

.wgl-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wgl-popup-close:hover {
    color: #495057;
}

.wgl-popup-body {
    padding: 20px;
}

.wgl-popup-body p {
    margin: 0 0 20px 0;
    color: #6c757d;
    line-height: 1.5;
}

.wgl-popup-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wgl-popup-actions button {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.wgl-detect-location {
    background: #007cba !important;
    color: #fff !important;
    border-color: #007cba !important;
}

.wgl-detect-location:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
}

.wgl-popup-actions button:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* Location Selector */
.wgl-location-selector {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wgl-popup-content {
        width: 95%;
        margin: 20px;
    }
    
    .wgl-popup-actions {
        flex-direction: column;
    }
    
    .wgl-popup-actions button {
        flex: none;
        width: 100%;
    }
}

/* Loading States */
.wgl-location-loading {
    opacity: 0.7;
    pointer-events: none;
}

.wgl-location-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: wgl-spin 1s linear infinite;
}

@keyframes wgl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}