/**
 * Currency Converter Styles
 * Styles for real-time currency conversion display
 */

.currency-converted {
    position: relative;
}

.currency-converted .text-muted {
    font-size: 0.8em;
    opacity: 0.7;
}

/* Real-time conversion indicator */
.currency-rate-indicator {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.7em;
    color: #6c757d;
    cursor: help;
}

.currency-rate-indicator:hover {
    color: #495057;
}

/* Loading state for currency conversion */
.currency-loading {
    opacity: 0.6;
    position: relative;
}

.currency-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: currency-spin 1s linear infinite;
    transform: translateY(-50%);
}

@keyframes currency-spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* RTL support for Arabic */
html[dir="rtl"] .currency-converted .text-muted {
    margin-right: 4px;
    margin-left: 0;
}

html[dir="rtl"] .currency-rate-indicator {
    margin-right: 8px;
    margin-left: 0;
}

/* Package price styling */
.package-price .display-4 {
    margin-bottom: 0;
}

.package-price .text-muted {
    font-size: 0.9em;
    margin-top: -5px;
}

/* Price comparison styling */
.price-comparison {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.price-comparison .main-price {
    font-weight: bold;
    font-size: 1.2em;
}

.price-comparison .converted-price {
    font-size: 0.9em;
    color: #6c757d;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .currency-converted .text-muted {
        font-size: 0.75em;
    }
    
    .package-price .text-muted {
        font-size: 0.8em;
    }
    
    .price-comparison {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Animation for price updates */
.price-updated {
    animation: price-update-flash 0.5s ease-in-out;
}

@keyframes price-update-flash {
    0% { background-color: transparent; }
    50% { background-color: rgba(0, 123, 255, 0.1); }
    100% { background-color: transparent; }
}

/* Tooltip for exchange rate info */
.currency-tooltip {
    position: relative;
    display: inline-block;
}

.currency-tooltip .tooltip-content {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8em;
}

.currency-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

.currency-tooltip .tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}
