/* Currency Switcher Styles */
.currency-switcher-menu {
    position: relative;
}

.currency-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.currency-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 120px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    z-index: 1000;
    margin: 0;
    padding: 0;
    list-style: none;
}

.currency-switcher-menu.open .currency-dropdown {
    display: block;
}

.currency-option {
    margin: 0;
}

.currency-change-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.currency-change-link:hover {
    background-color: #f5f5f5;
}

.currency-flag {
    display: inline-block;
    width: 20px;
    height: 15px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
}

.currency-flag-idr {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 2"><rect width="3" height="2" fill="#ce1126"/><rect width="3" height="1" y="1" fill="#fff"/></svg>');
}

.currency-flag-usd {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 2"><rect width="3" height="2" fill="#3c3b6e"/><path fill="#fff" d="M0,0h3v0.5H0z"/><path fill="#bf0a30" d="M0,0.5h3v0.25H0z"/><path fill="#fff" d="M0,0.75h3v0.25H0z"/><path fill="#bf0a30" d="M0,1h3v0.25H0z"/><path fill="#fff" d="M0,1.25h3v0.25H0z"/><path fill="#bf0a30" d="M0,1.5h3v0.5H0z"/></svg>');
}

.currency-flag-eur {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 2"><rect width="3" height="2" fill="#003399"/><path fill="#ffcc00" d="M1,0h1v2H1z"/></svg>');
}

.currency-flag-gbp {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 2"><rect width="3" height="2" fill="#012169"/><path fill="#fff" d="M0,0h3v2H0z"/><path fill="#C8102E" d="M0,0h1v2H0zM2,0h1v2H2z"/><path fill="#fff" d="M1,0h1v2H1z"/><path fill="#C8102E" d="M0,0h3v1H0zM0,1h3v1H0z"/></svg>');
}

/* Shortcode Styles */
.cca-currency-switcher-shortcode {
    margin: 10px 0;
}

.cca-currency-select-wrapper {
    position: relative;
}

.cca-currency-select {
    width: 100%;
    padding: 8px 30px 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    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='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.cca-currency-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.cca-currency-button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.cca-currency-button:hover {
    border-color: #999;
}

.cca-currency-button.active {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* Price Element Styles */
.cca-price-element {
    transition: all 0.3s ease;
}

.cca-price-element.updating {
    opacity: 0.7;
}

/* Loading Animation */
.cca-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: cca-spin 1s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .currency-dropdown {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .cca-currency-buttons {
        justify-content: center;
    }
}