/* Currency Switcher Styles */
.currency-switcher {
    position: relative;
    display: inline-block;
}

.currency-switcher .current-currency {
    cursor: pointer;
    padding: 5px 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-weight: bold;
    color: #495057;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.currency-switcher .current-currency:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.currency-switcher .currency-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.currency-switcher:hover .currency-arrow {
    transform: rotate(180deg);
}

.currency-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 120px;
    display: none;
    margin-top: 2px;
}

.currency-switcher:hover .currency-dropdown {
    display: block;
}

.currency-dropdown a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #495057;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.currency-dropdown a:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.currency-dropdown a.active {
    background-color: #007bff;
    color: white;
}

/* Price visibility transitions */
.price-bgn, .price-eur {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.price-bgn[style*="display: none"], .price-eur[style*="display: none"] {
    opacity: 0;
    visibility: hidden;
}

.price-bgn:not([style*="display: none"]), .price-eur:not([style*="display: none"]) {
    opacity: 1;
    visibility: visible;
}

/* Ensure proper spacing when prices are hidden */
.price-bgn, .price-eur {
    display: inline;
}

/* Loading overlay styles */
#currency-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#currency-loading-overlay .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .currency-switcher {
        margin-left: 10px;
    }
    
    .currency-switcher .current-currency {
        padding: 4px 8px;
        font-size: 14px;
    }
    
    .currency-dropdown {
        min-width: 100px;
    }
}

/* Ensure price elements don't break layout */
.price-bgn, .price-eur {
    white-space: nowrap;
}

/* Hide price elements properly when not displayed */
.price-bgn[style*="display: none"], .price-eur[style*="display: none"] {
    display: none !important;
}

/* Integration with existing navbar styles */
.navbar .currency-switcher {
    margin: 0 5px;
}

.navbar .currency-switcher .current-currency {
    background: transparent;
    border: none;
    color: inherit;
    padding: 5px 8px;
}

.navbar .currency-switcher .current-currency:hover {
    background: rgba(255, 255, 255, 0.1);
    border: none;
}

.navbar .currency-dropdown {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .navbar .currency-switcher {
        margin: 5px 0;
    }
    
    .navbar .currency-switcher .current-currency {
        font-size: 12px;
        padding: 3px 6px;
    }
}

/* Price display updates */
.price-converted {
    font-weight: bold;
    color: #007cba;
}

.currency-symbol {
    font-weight: normal;
    margin-left: 2px;
}

/* Animation for smooth transitions */
.currency-switcher {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Currency Switcher Styles */
.currency-switcher {
  position: absolute;
  top: 88px;
  right: -5px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  font-size: 12px;
  font-family: Arial, sans-serif;
}

.currency-switcher .currency-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.currency-switcher .currency-option {
    display: inline-block;
    padding: 5px 5px;
    margin: 2px;
    text-decoration: none;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #f9f9f9;
    transition: all 0.3s ease;
    width:97%;
}

.currency-switcher .currency-option:hover {
    background: #e9e9e9;
    color: #333;
    text-decoration: none;
}

.currency-switcher .currency-option.active {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .currency-switcher {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px;
        text-align: center;
    }
    
    .currency-switcher .currency-option {
        display: block;
        margin: 5px 0;
    }
}

/* Integration with existing cart styles */
.cor .currency-switcher {
    position: static;
    margin: 10px 0;
    box-shadow: none;
    border: none;
    background: transparent;
}

/* Currency Switcher Dropdown Styles */
.currency-switcher-dropdown {
    display: inline-block !important;
    margin: 0 10px;
    font-family: Arial, sans-serif;
}

.currency-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.currency-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

#currency-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    min-width: 80px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#currency-select:hover {
    border-color: #007cba;
}

#currency-select:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

#currency-select option {
    padding: 8px;
    background-color: #fff;
    color: #333;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .currency-switcher-dropdown {
        margin: 5px 0;
    }
    
    .currency-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
    
    .currency-label {
        font-size: 12px;
    }
    
    #currency-select {
        font-size: 13px;
        padding: 5px 8px;
        min-width: 70px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .currency-label {
        color: #e0e0e0;
    }
    
    #currency-select {
        background-color: #2d2d2d;
        color: #e0e0e0;
        border-color: #555;
    }
    
    #currency-select:hover {
        border-color: #007cba;
    }
    
    #currency-select option {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
}

/* Mobile menu compatibility */
@media (max-width: 767px) {
    .currency-switcher {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .currency-switcher .current-currency {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Ensure currency switcher doesn't interfere with mobile menu */
    #off-canvas-menu .currency-switcher {
        display: none;
    }
    
    /* Ensure mobile menu works properly */
    .responsive #off-canvas-menu {
        z-index: 10001;
    }
    
    .responsive #off-canvas-menu .expander-list {
        margin: 0;
        padding: 0;
        list-style-type: none;
    }
    
    .responsive #off-canvas-menu .expander-list li {
        margin: 0;
    }
    
    .responsive #off-canvas-menu .expander-list .expander {
        float: right;
        cursor: pointer;
        padding: 0 8px;
        font-family: 'Montserrat', sans-serif;
        font-size: 16px;
        margin-top: 5px;
    }
    
    .responsive #off-canvas-menu .expander-list .name {
        display: block;
        border-bottom: 1px solid #eee;
        padding: 10px 10px 10px 25px;
    }
    
    .responsive #off-canvas-menu ul li span.icon {
        padding: 0 10px 0 0;
        font-size: 18px;
        line-height: 22px;
    }
    
    .responsive #off-canvas-menu ul li li li {
        padding-left: 35px;
    }
    
    .responsive #off-canvas-menu ul li a {
        font-size: 14px;
        line-height: 26px;
        color: #2b2b2b;
        text-transform: uppercase;
        text-decoration: none;
    }
    
    .responsive #off-canvas-menu-title {
        display: block;
        background: #f5f5f5;
        border-bottom: 1px solid #e7e7e7;
        font-size: 16px;
        line-height: 46px;
        padding-left: 25px;
        font-family: 'Montserrat', sans-serif;
    }
    
    .responsive #off-canvas-menu-close {
        font-size: 20px;
        cursor: pointer;
        float: right;
        color: #707070;
        padding: 12px 12px 0 0;
    }
    
    body.off-canvas-menu-open.responsive #off-canvas-menu {
        display: block !important;
        left: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    body.off-canvas-menu-open.responsive #outer-overlay {
        display: block;
        background: #000;
        height: 100%;
        left: 0;
        min-height: 100% !important;
        position: absolute !important;
        top: 0;
        width: 100% !important;
        opacity: 0.5;
        z-index: 1000;
    }
}

/* Loading indicator */
.currency-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 10000;
    display: none;
}

.currency-loading.show {
    display: block;
}

/* Mobile Menu Styles */
#off-canvas-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

#off-canvas-menu.active {
    left: 0;
}

#off-canvas-menu-title {
    background: #333;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
}

#off-canvas-menu-close {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

#off-canvas-menu-close:hover {
    color: #ccc;
}

.expander-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.expander-list .expander {
    border-bottom: 1px solid #eee;
}

.expander-list .expander .name {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    position: relative;
}

.expander-list .expander .name:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: #333;
}

.expander-list .expander .name .icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Ensure expander elements are visible */
.expander-list .expander .expander {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    float: none;
    cursor: pointer;
    padding: 0 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    background: none;
    border: none;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.expander-list .expander > ul {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
}

.expander-list .expander.expanded > ul {
    display: block;
}

.expander-list .expander > ul > li > a {
    display: block;
    padding: 10px 20px 10px 50px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.expander-list .expander > ul > li > a:hover {
    background-color: #e9ecef;
    text-decoration: none;
    color: #333;
}

/* Mobile menu overlay */
#outer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#outer-overlay.active {
    display: block;
    opacity: 1;
}

/* Body class for mobile menu */
body.off-canvas-active {
    overflow: hidden;
}

/* Mobile menu compatibility */
@media (max-width: 480px) {
    .currency-switcher {
        position: relative;
        z-index: 1001;
    }
    
    .currency-dropdown {
        right: auto;
        left: 0;
        min-width: 100px;
    }
} 