/* Currency Detector Styles */

/* Price Display Styles */
.currency-detector-price {
    display: inline-block;
    transition: all 0.3s ease;
}

.currency-detector-price.currency-loading {
    opacity: 0.6;
    position: relative;
}

.currency-detector-price.currency-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: currency-spin 0.8s linear infinite;
}

.currency-detector-price.currency-updated {
    transform: scale(1.05);
    color: #46b450;
}

/* Currency Switcher Base Styles */
.currency-detector-switcher {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.currency-detector-switcher.currency-switcher-left {
    text-align: left;
}

.currency-detector-switcher.currency-switcher-center {
    text-align: center;
}

.currency-detector-switcher.currency-switcher-right {
    text-align: right;
}

.currency-detector-switcher.currency-switcher-small {
    font-size: 0.85em;
}

.currency-detector-switcher.currency-switcher-medium {
    font-size: 1em;
}

.currency-detector-switcher.currency-switcher-large {
    font-size: 1.15em;
}

/* Dropdown Style Switcher */
.currency-switcher-dropdown .currency-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.currency-switcher-dropdown .currency-select:hover {
    border-color: #999;
}

.currency-switcher-dropdown .currency-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Button Style Switcher */
.currency-switcher-buttons .currency-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.currency-switcher-buttons .currency-button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
    font-size: inherit;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.currency-switcher-buttons .currency-button:hover {
    background: #f5f5f5;
    border-color: #999;
}

.currency-switcher-buttons .currency-button.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.currency-switcher-buttons .currency-button small {
    font-size: 0.8em;
    opacity: 0.8;
}

/* Flag Style Switcher */
.currency-switcher-flags .currency-flags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.currency-switcher-flags .currency-flag {
    display: inline-block;
    font-size: 1.5em;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 2em;
}

.currency-switcher-flags .currency-flag:hover {
    background: #f5f5f5;
    transform: scale(1.1);
}

.currency-switcher-flags .currency-flag.active {
    background: #0073aa;
    color: #fff;
    transform: scale(1.1);
}

.currency-switcher-flags .currency-flag small {
    font-size: 0.5em;
    display: block;
    margin-top: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .currency-switcher-buttons .currency-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .currency-switcher-buttons .currency-button {
        text-align: center;
        margin-bottom: 2px;
    }
    
    .currency-switcher-flags .currency-flags {
        justify-content: center;
    }
    
    .currency-detector-switcher.currency-switcher-small {
        font-size: 0.8em;
    }
}

/* Loading Animation */
@keyframes currency-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Elementor Integration */
.elementor-widget-shortcode .currency-detector-price {
    line-height: inherit;
}

.elementor-widget-shortcode .currency-detector-switcher {
    width: 100%;
}

/* Additional Utility Classes */
.currency-price-large {
    font-size: 1.2em;
    font-weight: bold;
}

.currency-price-small {
    font-size: 0.9em;
}

.currency-price-highlight {
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #ffeaa7;
}

.currency-switcher-compact .currency-buttons {
    gap: 2px;
}

.currency-switcher-compact .currency-button {
    padding: 4px 8px;
    font-size: 0.9em;
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .currency-switcher-dropdown .currency-select {
        background: #2c2c2c;
        border-color: #555;
        color: #fff;
    }
    
    .currency-switcher-buttons .currency-button {
        background: #2c2c2c;
        border-color: #555;
        color: #fff;
    }
    
    .currency-switcher-buttons .currency-button:hover {
        background: #404040;
    }
    
    .currency-switcher-flags .currency-flag:hover {
        background: #404040;
    }
}

/* Print Styles */
@media print {
    .currency-detector-switcher {
        display: none !important;
    }
    
    .currency-detector-price::after {
        display: none !important;
    }
}