/* Navbar Localization Component Styles */
/* This CSS is shared across all projects/themes */

.navbar-localization {
    display: flex;
    align-items: center;
}

.navbar-localization .currency-btn {
    background-color: #f8f9fa;
    color: #333 !important;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.navbar-localization .currency-btn:hover {
    background-color: #e9ecef !important;
    color: #333 !important;
}

.currency-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 600px;
    max-height: 500px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    z-index: 1050;
    padding: 0;
}

.dropdown-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
}

@media (min-width: 768px) {
    .dropdown-content-wrapper {
        flex-direction: row;
        gap: 0;
    }
    
    .dropdown-section {
        flex: 1;
        min-width: 0; /* Prevent overflow */
        border-right: 1px solid #e1e5e9;
    }
    
    .dropdown-section:last-child {
        border-right: none;
    }
}

.dropdown-section {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.dropdown-section .dropdown-header {
    padding: 10px 12px;
    border-bottom: 1px solid #e1e5e9;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
    flex-shrink: 0;
}

.dropdown-section:first-child .dropdown-header {
    border-radius: 8px 0 0 0;
}

.dropdown-section:last-child .dropdown-header {
    border-radius: 0 8px 0 0;
}

.dropdown-section:only-child .dropdown-header {
    border-radius: 8px 8px 0 0;
}

.dropdown-section .dropdown-header h6 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.currency-scroll-container,
.language-scroll-container,
.measurement-scroll-container {
    flex: 1;
    max-height: 200px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    padding: 6px;
}

/* Custom scrollbar for WebKit browsers */
.currency-scroll-container::-webkit-scrollbar,
.language-scroll-container::-webkit-scrollbar,
.measurement-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.currency-scroll-container::-webkit-scrollbar-track,
.language-scroll-container::-webkit-scrollbar-track,
.measurement-scroll-container::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 2px;
}

.currency-scroll-container::-webkit-scrollbar-thumb,
.language-scroll-container::-webkit-scrollbar-thumb,
.measurement-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}

.currency-scroll-container::-webkit-scrollbar-thumb:hover,
.language-scroll-container::-webkit-scrollbar-thumb:hover,
.measurement-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.currency-option,
.language-option,
.measurement-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 1px;
    text-decoration: none;
    color: #333;
}

.currency-option:hover,
.language-option:hover,
.measurement-option:hover {
    background-color: #f8f9fa;
}

.currency-option.selected,
.language-option.active,
.measurement-option.active {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
}

.currency-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.currency-info .name {
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.currency-info .country {
    font-size: 11px;
    opacity: 0.7;
}

.currency-symbols {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.currency-symbols .code {
    font-weight: 600;
    font-size: 11px;
    opacity: 0.8;
}

.currency-symbols .symbol {
    font-weight: 600;
    font-size: 12px;
}

/* Theme-specific overrides */
/* Demo theme - make it look like towncountry */
.demo-theme .navbar-localization .currency-btn {
    background-color: #f8f9fa;
    color: #333 !important;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.demo-theme .navbar-localization .currency-btn:hover {
    background-color: #f8f9fa !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

/* Fix dropdown positioning for demo theme - same as towncountry */
.demo-theme .dropdown-menu[data-bs-popper] {
    right: 0 !important;
    left: auto !important;
    top: 100% !important;
    margin-top: 0.5rem !important;
}

.demo-theme .currency-dropdown-menu {
    border: 1px solid #e1e5e9;
    background: white;
}

.demo-theme .dropdown-section .dropdown-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.demo-theme .currency-option:hover,
.demo-theme .language-option:hover,
.demo-theme .measurement-option:hover {
    background-color: #f8f9fa;
}

.demo-theme .currency-option.selected,
.demo-theme .language-option.active,
.demo-theme .measurement-option.active {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
}