/**
 * Multi-Currency Main Styles
 */

/* Currency Selector */
.twizzle-currency-selector {
    position: relative;
    display: inline-block;
    margin: 0 10px;
}

.twizzle-currency-dropdown {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    min-width: 120px;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 30px;
}

.twizzle-currency-dropdown:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

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

/* Currency Selector in Header */
.header-actions-right .twizzle-currency-selector {
    margin: 0 5px;
}

.header-actions-right .twizzle-currency-dropdown {
    min-width: 100px;
    font-size: 13px;
    padding: 6px 10px;
    padding-right: 25px;
}

/* Currency Selector in Footer */
footer .twizzle-currency-selector {
    margin: 10px 0;
    text-align: center;
}

/* Currency Messages */
.twizzle-currency-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
}

.twizzle-currency-message.twizzle-currency-success {
    background: #4CAF50;
}

.twizzle-currency-message.twizzle-currency-error {
    background: #f44336;
}

.twizzle-currency-message.twizzle-currency-info {
    background: #2196F3;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Currency Selector Shortcode */
.twizzle-currency-selector-shortcode {
    margin: 10px 0;
}

.twizzle-currency-selector-shortcode .twizzle-currency-dropdown {
    width: 100%;
    max-width: 200px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .twizzle-currency-selector {
        margin: 5px;
    }
    
    .twizzle-currency-dropdown {
        min-width: 100px;
        font-size: 13px;
        padding: 6px 10px;
        padding-right: 25px;
    }
    
    .twizzle-currency-message {
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .twizzle-currency-dropdown {
        background: #2d2d2d;
        border-color: #555;
        color: #fff;
    }
    
    .twizzle-currency-dropdown:focus {
        border-color: #007cba;
    }
    
    .twizzle-currency-dropdown:hover {
        border-color: #777;
    }
}

/* Integration with Theme */
.techmart-theme .twizzle-currency-selector {
    margin: 0 8px;
}

.techmart-theme .twizzle-currency-dropdown {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #495057;
}

.techmart-theme .twizzle-currency-dropdown:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Loading State */
.twizzle-currency-loading .twizzle-currency-dropdown {
    opacity: 0.6;
    cursor: not-allowed;
}

.twizzle-currency-loading .twizzle-currency-dropdown::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translateY(-50%);
}

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