/* Location Bar - Top of page */
#wc-delivery-location-bar {
    background: linear-gradient(135deg, #232f3e 0%, #37475a 100%);
    color: #fff;
    padding: 8px 20px;
    position: sticky;
    top: 0;
    z-index: 9999;
    font-size: 14px;
}

.location-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-icon {
    font-size: 16px;
}

.location-text {
    flex: 1;
}

.change-location-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.change-location-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Popup Overlay */
#wc-delivery-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#wc-delivery-popup-overlay.show {
    display: flex;
}

/* Popup Container */
#wc-delivery-popup {
    background: #fff;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* Header */
.popup-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.popup-header h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #1a1a1a;
}

.popup-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Body */
.popup-body {
    padding: 24px;
}

/* PIN Code Input */
.pincode-input-wrapper {
    display: flex;
    gap: 10px;
}

#delivery-pincode-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

#delivery-pincode-input:focus {
    outline: none;
    border-color: #007cba;
}

.check-btn {
    padding: 14px 24px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.check-btn:hover {
    background: #005a87;
}

.check-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Message */
.pincode-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.pincode-message.error {
    display: block;
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.pincode-message.success {
    display: block;
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

.pincode-message.loading {
    display: block;
    background: #f5f5f5;
    color: #666;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #999;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    padding: 0 12px;
}

/* Detect Location Button */
.detect-location-btn {
    width: 100%;
    padding: 14px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.detect-location-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.detect-location-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Delivery Info (Success State) */
.delivery-info {
    padding: 20px 24px 24px;
    border-top: 1px solid #eee;
}

.delivery-info.hidden {
    display: none;
}

.location-confirmed {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
}

.success-icon {
    width: 32px;
    height: 32px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.location-details strong {
    color: #1a1a1a;
    font-size: 15px;
}

.location-details span {
    color: #666;
    font-size: 13px;
}

.confirm-btn {
    width: 100%;
    padding: 14px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.confirm-btn:hover {
    background: #16a34a;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #wc-delivery-popup {
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .pincode-input-wrapper {
        flex-direction: column;
    }
    
    .check-btn {
        width: 100%;
    }
}
