/* Currency Selector Styles */
.currency-selector {
    display: inline-flex;
    align-items: center;
    margin-right: 20px;
    position: relative;
    flex-direction: column;
}

#currency-select {
    padding: 5px 30px 5px 10px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23272727' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    transition: all 0.3s ease;
    min-width: 120px;
}

#currency-select:hover,
#currency-select:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(214, 174, 60, 0.15);
}

/* Currency loading indicator */
.currency-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    color: var(--gold);
}

.currency-loading i {
    font-size: 0.8rem;
    margin-right: 5px;
}

.currency-loading span {
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Detected country info */
.detected-country {
    font-size: 0.7rem;
    opacity: 0.7;
    text-align: center;
    margin-top: 2px;
    animation: fadeIn 0.5s ease-in;
}

/* Currency change notification */
.currency-change-flash {
    animation: fadeIn 0.3s ease-in;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Make flag emojis appear at the correct size */
#currency-select option {
    font-size: 1em;
}

/* Animation for notifications */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Price transition animation */
.item-price {
    transition: all 0.3s ease;
}

/* Currency selector globe icon */
.currency-selector .fas.fa-globe-americas {
    margin-right: 5px;
    font-size: 0.9em;
    color: var(--gold);
    transition: transform 0.3s ease;
}

.currency-selector:hover .fas.fa-globe-americas {
    transform: rotate(15deg);
}

/* Currency selector tooltip */
.currency-selector::after {
    content: "Change Currency";
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.currency-selector:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Adjust positioning for mobile */
@media (max-width: 768px) {
    .currency-selector {
        position: fixed;
        top: 20px;
        right: 70px;
        z-index: 1000;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 5px 8px;
        border-radius: 4px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        flex-direction: row;
        align-items: center;
    }
    
    #currency-select {
        background-color: transparent;
        border: none;
        padding: 3px 20px 3px 5px;
        min-width: 80px;
        font-size: 0.75rem;
    }
    
    .detected-country {
        display: none; /* Hide on mobile to save space */
    }
    
    .currency-loading {
        position: absolute;
        top: 80px;
        right: 150px;
        z-index: 1000;
        background-color: rgba(255, 255, 255, 0.9);
        padding: 5px 8px;
        border-radius: 3px;
    }
}
