/* ====================================
   Location Module Styles
   ==================================== */

/* Location Modal */
#locationModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

#locationModal .modal-header {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    border-radius: 16px 16px 0 0;
    padding: 20px 24px;
    border: none;
}

#locationModal .modal-title {
    color: #333;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#locationModal .modal-title i {
    font-size: 1.5rem;
}

#locationModal .modal-body {
    padding: 24px;
}

#locationModal .btn-close {
    filter: none;
    opacity: 0.8;
}

#locationModal .btn-close:hover {
    opacity: 1;
}

/* Pincode Input Group */
.location-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.location-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.location-input-group input:focus {
    border-color: #FFC107;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15);
    outline: none;
}

.location-input-group input::placeholder {
    font-weight: 400;
    letter-spacing: normal;
    color: #999;
}

.location-input-group .btn-check-pincode {
    padding: 14px 28px;
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    border: none;
    border-radius: 12px;
    color: #333;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.location-input-group .btn-check-pincode:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.35);
}

.location-input-group .btn-check-pincode:disabled {
    opacity: 0.7;
    transform: none;
}

/* Detect Location Button */
.btn-detect-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.btn-detect-location:hover {
    background: #e9ecef;
    border-color: #FFC107;
    color: #333;
}

.btn-detect-location:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-detect-location i {
    font-size: 1.2rem;
}

/* Divider */
.location-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #adb5bd;
    font-size: 0.85rem;
}

.location-divider::before,
.location-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dee2e6;
}

.location-divider span {
    padding: 0 16px;
}

/* Error Message */
#location-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#location-error::before {
    content: '\f071';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* Location Result Card */
.location-result-card {
    background: linear-gradient(135deg, #f8fffe 0%, #f0fff4 100%);
    border: 1px solid #c6f6d5;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}

.location-result-card .location-info,
.location-result-card .delivery-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.location-result-card .location-info:last-child,
.location-result-card .delivery-info:last-child {
    margin-bottom: 0;
}

.location-result-card i {
    font-size: 1.5rem;
    margin-top: 2px;
}

.location-result-card .location-city {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2d3748;
}

.location-result-card .location-pincode {
    color: #718096;
    font-size: 0.9rem;
}

.location-result-card .delivery-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 2px;
}

.location-result-card .delivery-date {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 8px;
}

.location-result-card .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    margin-right: 6px;
}

.location-result-card .delivery-message {
    background: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4a5568;
    margin-top: 14px;
    border-left: 3px solid #48bb78;
}

/* Apply Button */
.btn-apply-location {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-apply-location:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
    color: #fff;
}

.btn-apply-location:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}

/* Header Location Link Enhancement */
.header-top .top-links .fa-map-marker {
    color: #FF9800;
}

.header-top .top-links a[data-bs-toggle="modal"] {
    transition: all 0.2s ease;
}

.header-top .top-links a[data-bs-toggle="modal"]:hover {
    color: #FF9800 !important;
}

.header-top .top-links #userLocation {
    color: #FF9800;
    font-weight: 700;
}

/* Product Details - Delivery Check Enhancement */
.delivery-options .pincode-check-enhanced {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.delivery-options .pincode-check-enhanced input {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 1rem;
    transition: all 0.3s;
}

.delivery-options .pincode-check-enhanced input:focus {
    border-color: #FFC107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.15);
    outline: none;
}

.delivery-options .pincode-check-enhanced button {
    padding: 12px 24px;
    border-radius: 10px;
}

.delivery-result {
    margin-top: 12px;
    padding: 14px;
    background: #f0fff4;
    border-radius: 10px;
    border-left: 4px solid #48bb78;
}

.delivery-result.error {
    background: #fff5f5;
    border-left-color: #e53e3e;
}

.delivery-result .delivery-date-range {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.delivery-result .delivery-message {
    color: #718096;
    font-size: 0.9rem;
}

.delivery-result .delivery-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Cart Page - Delivery Estimate Card Enhancement */
.delivery-card .delivery-estimate-enhanced {
    padding: 4px 0;
}

.delivery-card .delivery-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #718096;
}

.delivery-card .delivery-location strong {
    color: #333;
}

.delivery-card .change-location-link {
    color: #FFC107;
    font-weight: 600;
    cursor: pointer;
    margin-left: 8px;
}

.delivery-card .change-location-link:hover {
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .location-input-group {
        flex-direction: column;
    }

    .location-input-group .btn-check-pincode {
        width: 100%;
    }

    #locationModal .modal-body {
        padding: 16px;
    }

    .location-result-card {
        padding: 16px;
    }
}

/* Animation for location updates */
@keyframes locationPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.location-updated {
    animation: locationPulse 0.5s ease;
}

/* Spinner inside buttons */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Fix for Sticky Header Overlap */
.modal-backdrop {
    z-index: 9999 !important;
}

#locationModal {
    z-index: 10000 !important;
}