/* Location Selection Modal - Minimalist Design */
.location-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.location-modal.show {
    display: flex;
    opacity: 1;
}

.location-modal-content {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 0;
    width: 90%;
    max-width: 700px;
    padding: 0;
    box-shadow: none;
}

.location-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(1.5rem, 2.5vw, 2rem);
    border-bottom: 1px solid #000000;
}

.location-modal-header h2 {
    font-family: 'Arial', sans-serif;
    font-size: clamp(0.875rem, 1.2vw, 1rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000000;
    margin: 0;
}

.location-modal-close {
    background: transparent;
    border: none;
    color: #000000;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.location-modal-close:hover {
    opacity: 0.7;
}

.location-modal-body {
    padding: clamp(1.5rem, 2.5vw, 2rem);
}

.location-modal-body p {
    font-family: 'Arial', sans-serif;
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
    font-weight: 400;
    color: #000000;
    line-height: 1.6;
    margin: 0;
}

.location-modal-footer {
    display: flex;
    gap: clamp(0.75rem, 1.5vw, 1rem);
    padding: clamp(1.5rem, 2.5vw, 2rem);
    border-top: 1px solid #000000;
}

.location-btn {
    flex: 1;
    padding: clamp(0.875rem, 1.5vw, 1.25rem);
    border: 1px solid #000000;
    border-radius: 0;
    font-family: 'Arial', sans-serif;
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: #000000;
}

.location-btn-primary {
    background: #000000;
    color: #ffffff;
}

.location-btn-primary:hover {
    background: #333333;
}

.location-btn-secondary:hover {
    background: #000000;
    color: #ffffff;
}

/* Location Dropdown */
.location-dropdown {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.location-dropdown.show {
    display: flex;
    opacity: 1;
}

.location-dropdown-content {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 0;
    width: 90%;
    max-width: 1050px;
    padding: 0;
    box-shadow: none;
    max-height: 80vh;
    overflow-y: auto;
}

.location-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(1.5rem, 2.5vw, 2rem);
    border-bottom: 1px solid #000000;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
}

.location-back-btn {
    background: transparent;
    border: none;
    color: #000000;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    margin-right: 1rem;
}

.location-back-btn:hover {
    opacity: 0.7;
}

.location-dropdown-content-inner {
    padding: 0;
}

.location-dropdown-header h3 {
    font-family: 'Arial', sans-serif;
    font-size: clamp(0.875rem, 1.2vw, 1rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000000;
    margin: 0;
}

.location-dropdown-close {
    background: transparent;
    border: none;
    color: #000000;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.location-dropdown-close:hover {
    opacity: 0.7;
}

.location-dropdown-list {
    padding: 0;
}

.location-option {
    width: 100%;
    padding: clamp(1rem, 1.5vw, 1.25rem) clamp(1.5rem, 2.5vw, 2rem);
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    font-family: 'Arial', sans-serif;
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000000;
}

.location-option:last-child {
    border-bottom: none;
}

.location-option:hover {
    background: #f5f5f5;
}

.location-option.active {
    background: #000000;
    color: #ffffff;
}

.location-currency {
    font-size: clamp(0.65rem, 0.85vw, 0.75rem);
    color: #666666;
    font-weight: 400;
}

.location-option.active .location-currency {
    color: #ffffff;
}

/* Countries List with Grid Layout */
.location-countries-list {
    display: grid !important;
    gap: 0;
    padding: 0;
    border-top: 1px solid #e0e0e0;
    width: 100%;
    /* grid-template-columns will be set dynamically by JavaScript */
}

.location-countries-list .location-option {
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    padding: clamp(0.75rem, 1.2vw, 1rem) clamp(1rem, 1.5vw, 1.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    text-align: left;
}

/* Remove borders using classes */
.location-countries-list .location-option.no-right-border,
.location-option-empty.no-right-border {
    border-right: none !important;
}

.location-countries-list .location-option.no-bottom-border,
.location-option-empty.no-bottom-border {
    border-bottom: none !important;
}

.location-option-empty {
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    box-sizing: border-box;
    min-height: 48px; /* Match the height of location-option buttons */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .location-modal-content,
    .location-dropdown-content {
        width: 95%;
        max-width: none;
    }
    
    .location-modal-footer {
        flex-direction: column;
    }
    
    .location-btn {
        width: 100%;
    }
    
    .location-countries-list {
        grid-template-columns: 1fr !important;
    }
    
    .location-countries-list .location-option {
        border-right: none !important;
    }
    
    .location-countries-list .location-option:last-child {
        border-bottom: none;
    }
}

