/* Location Selector Styles - Wine & Bourbon Barn */
/* Enhanced dropdown with store hours, phone, and address */

/* Force consistent font family for all location selector elements */
.location-selector,
.location-selector *,
.location-dropdown,
.location-dropdown *,
.location-option,
.location-option * {
    font-family: 'Montserrat', sans-serif !important;
}

#location-selector-container {
    grid-column: 2;
    justify-self: start;
}

.location-selector {
    position: relative;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.location-selector-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    white-space: nowrap;
}

.location-address {
    font-size: 10px;
    color: #888;
    font-weight: 400;
    margin-top: 2px;
    white-space: normal;
    max-width: 250px;
    line-height: 1.3;
}

/* Location Button */
.location-dropdown-btn {
    background: #fff !important;
    border: 2px solid #d4a574 !important;
    padding: 8px 14px !important;
    border-radius: 25px !important;
    cursor: pointer;
    font-weight: 500 !important;
    color: #2c2c2c !important;
    font-size: 13px !important;
    font-family: 'Montserrat', sans-serif !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    white-space: nowrap;
}

.location-dropdown-btn:hover {
    background: #d4a574;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.location-dropdown-btn:focus {
    outline: 2px solid #d4a574;
    outline-offset: 2px;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.location-dropdown-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Container */
.location-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 380px;
    max-width: 420px;
    background: white !important;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 1001;
    display: none;
    animation: dropdown-fade-in 0.2s ease-out;
    font-size: 14px !important; /* Override any parent font sizes */
    font-family: 'Montserrat', sans-serif !important;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown Header */
.location-dropdown-header {
    padding: 16px 20px;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e1e1e1;
    border-radius: 12px 12px 0 0;
    font-weight: 600 !important;
    color: #2c2c2c !important;
    font-size: 12px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Location Options Container */
.location-options {
    overflow: hidden;
}

/* Individual Location Option */
.location-option {
    padding: 10px 20px !important;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    transition: all 0.2s ease;
    position: relative;
    background: white !important;
    font-family: 'Montserrat', sans-serif !important;
}

.location-option:last-child {
    border-bottom: none;
}

.location-option:hover {
    background: #e9ecef;
}

.location-option:hover .location-name,
.location-option:hover .location-address,
.location-option:hover .location-hours,
.location-option:hover .location-opening {
    color: #1a1a1a;
}

.location-option.current {
    background: linear-gradient(135deg, #d4a574 0%, #c19660 100%);
    color: white;
}

.location-option.current:hover {
    background: linear-gradient(135deg, #c19660 0%, #b08850 100%);
}

.location-option[data-coming-soon="true"] {
    cursor: default;
    opacity: 0.8;
}

.location-option[data-coming-soon="true"]:hover {
    background: #e9ecef;
}

/* Location Header (Name + Status) */
.location-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.location-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-name {
    font-weight: 500 !important;
    font-size: 14px !important;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #444 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: 'Montserrat', sans-serif !important;
}


/* Status Dots */
.location-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.location-status-dot.open {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.location-status-dot.opening_soon {
    background: #eab308;
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

.location-status-dot.coming_soon {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Status Text */
.location-status-text {
    font-size: 12px !important;
    font-weight: 500 !important;
    font-family: 'Montserrat', sans-serif !important;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
}

.location-status-text.open {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.location-status-text.opening-soon {
    background: rgba(234, 179, 8, 0.1);
    color: #ca8a04;
}

.location-status-text.coming-soon {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.location-option.current .location-status-text {
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
}

/* Location Details */
.location-details {
    font-size: 11px;
    line-height: 1.5;
}

.location-address {
    color: #666 !important;
    margin-bottom: 6px;
    font-size: 13px !important;
    font-family: 'Montserrat', sans-serif !important;
}

.location-option.current .location-address {
    color: rgba(255,255,255,0.9);
}

.location-option.current .location-name {
    color: white;
}

.location-contact {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}


.location-hours, .location-opening {
    color: #666 !important;
    font-size: 9px !important;
    font-weight: 400 !important;
    font-family: 'Montserrat', sans-serif !important;
}

.location-option.current .location-hours,
.location-option.current .location-opening {
    color: rgba(255,255,255,0.8);
}



/* Toast Notifications */
.location-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.location-toast.show {
    transform: translateX(0);
}

.location-toast-success {
    background: #22c55e;
    color: white;
}

.location-toast-error {
    background: #ef4444;
    color: white;
}

.location-toast-info {
    background: #3b82f6;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .location-selector {
        margin-left: 12px;
    }

    .location-dropdown-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 120px;
    }

    .location-dropdown {
        min-width: 320px;
        max-width: 90vw;
        left: auto;
        right: 0;
    }

    .location-option {
        padding: 12px 16px;
    }

    .location-header {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .location-contact {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .location-actions {
        flex-direction: column;
    }

    .notify-btn, .directions-btn {
        text-align: center;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .location-dropdown {
        left: -20px;
        right: -20px;
        min-width: unset;
    }

    .location-dropdown-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .location-name {
        font-size: 15px;
    }

    .location-address {
        font-size: 13px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .location-dropdown {
        border: 2px solid #000;
    }

    .location-option {
        border-bottom: 1px solid #666;
    }

    .location-status-dot {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .location-dropdown-btn,
    .location-option,
    .notify-btn,
    .directions-btn,
    .dropdown-arrow,
    .location-toast {
        transition: none;
    }

    .location-dropdown {
        animation: none;
    }
}

/* Focus visible for better accessibility */
.location-option:focus-visible {
    outline: 2px solid #d4a574;
    outline-offset: -2px;
}

.notify-btn:focus-visible,
.directions-btn:focus-visible {
    outline: 2px solid #d4a574;
    outline-offset: 2px;
}