/**
 * Currency Converter Styles
 */

/* Currency selector in bottom navigation */
.currency-selector-wrapper {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    margin-top:17px;
    text-decoration: none;
  /*  gap: 2px;*/
}

.currency-selector-wrapper .currency-flag-display {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid #666;
    border-radius: 4px;
    background: #fff;
    order: 1;
}

.currency-selector-wrapper .currency-code-display {
    font-size: 10px;
    font-weight: 550;
    color: #666;
    display: block;
    text-transform: uppercase;
    order: 3;
    /*margin-top: 2px;*/
}

.currency-selector-wrapper::after {
    content: '▼';
    font-size: 8px;
    color: #666;
    display: block;
    order: 2;
 /*   margin-top: 2px;
    margin-bottom: 2px;*/
}

.currency-select {
    font-size: 10px;
    font-weight: 500;
    color: transparent;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    font-family: inherit;
    position: absolute;
    opacity: 0;
    z-index: 10;
}

.currency-select:focus {
    outline: none;
}

.currency-select option {
    background: white;
    color: #333;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.currency-select option:hover {
    background: #f8f8f8;
}

/* Flag display on selector */
.currency-flag-display {
    font-size: 20px;
    margin-right: 6px;
}

/* Current location display */
.current-location-info {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    color: #666;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

.current-location-info .location-flag {
    font-size: 12px;
}

/* Active state for currency selector */
.currency-selector-wrapper.active i,
.currency-selector-wrapper.active .currency-select {
    color: #999;
}

/* Loading state during conversion */
body.converting-currency {
    position: relative;
}

body.converting-currency::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #999;
    background-size: 200% 100%;
    animation: loading-bar 1s linear infinite;
    z-index: 99999;
}

@keyframes loading-bar {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* Desktop currency selector (optional - can be added to top nav later) */
.desktop-currency-selector {
    position: relative;
    display: inline-block;
}

.desktop-currency-selector select {
    padding: 8px 30px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.desktop-currency-selector::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999;
}

/* Price animation during conversion */
.current-price,
.original-price,
.product-price {
    transition: all 0.3s ease;
}

body.converting-currency .current-price,
body.converting-currency .original-price,
body.converting-currency .product-price {
    opacity: 0.6;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .currency-selector-wrapper {
        flex: 1;
        position: relative;
        padding-bottom: 20px;
    }
    
    .currency-selector-wrapper .currency-flag-display {
        width: 28px;
        height: 28px;
        font-size: 18px;
        order: 1;
    }
    
    .currency-selector-wrapper .currency-code-display {
        font-size: 9px;
        order: 3;
    }
    
    .currency-selector-wrapper::after {
        font-size: 7px;
        order: 2;
    }
    
    .currency-select {
        max-width: 70px;
        font-size: 9px;
    }
    
    .current-location-info {
        font-size: 8px;
        bottom: -20px;
    }
    
    .current-location-info .location-flag {
        font-size: 10px;
    }
}

/* Currency flag support */
.currency-flag {
    font-size: 16px;
    margin-right: 4px;
}

/* Tooltip for currency info (optional) */
.currency-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    z-index: 1000;
}

.currency-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.currency-selector-wrapper:hover .currency-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Price format consistency */
.price-wrapper {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.price-currency {
    font-weight: 600;
}

.price-amount {
    font-size: inherit;
}
