/* ====================================
   Live Gold Rates - Styles
   ==================================== */

.gold-rates-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ====================================
   Container Layouts
   ==================================== */

/* Horizontal Layout (recommended for header) */
.gold-rates-widget[data-layout="horizontal"] .gold-rates-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Vertical Layout (for sidebar) */
.gold-rates-widget[data-layout="vertical"] .gold-rates-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ====================================
   Rate Item Cards
   ==================================== */

.gold-rate-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gold-rate-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* For dark/burgundy headers */
.site-header .gold-rate-item,
header .gold-rate-item {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.site-header .gold-rate-item:hover,
header .gold-rate-item:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ====================================
   Flag & Details
   ==================================== */

.rate-flag {
    font-size: 28px;
    line-height: 1;
}

.rate-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rate-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.75;
    color: #333;
}

.site-header .rate-label,
header .rate-label {
    color: rgba(255, 255, 255, 0.85);
}

/* ====================================
   Price & Change Display
   ==================================== */

.rate-price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rate-price {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}

.site-header .rate-price,
header .rate-price {
    color: #ffffff;
}

/* Loading spinner animation */
.loading-spinner {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Change indicators */
.rate-change {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.rate-change .positive {
    color: #10b981;
}

.rate-change .negative {
    color: #ef4444;
}

/* ====================================
   Update Timestamp
   ==================================== */

.rate-update-time {
    margin-top: 6px;
    text-align: center;
}

.rate-update-time small {
    font-size: 9px;
    color: #6b7280;
    opacity: 0.7;
}

.site-header .rate-update-time small,
header .rate-update-time small {
    color: rgba(255, 255, 255, 0.6);
}

/* ====================================
   Alternative Elegant Style
   ==================================== */

.gold-rates-widget.elegant .gold-rate-item {
    background: linear-gradient(135deg, #8b6914 0%, #d4af37 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(139, 105, 20, 0.3);
}

.gold-rates-widget.elegant .rate-label {
    color: rgba(255, 255, 255, 0.9);
}

.gold-rates-widget.elegant .rate-price {
    color: white;
}

/* ====================================
   Compact Style (minimal)
   ==================================== */

.gold-rates-widget.compact .gold-rate-item {
    padding: 6px 12px;
}

.gold-rates-widget.compact .rate-flag {
    font-size: 20px;
}

.gold-rates-widget.compact .rate-label {
    font-size: 9px;
}

.gold-rates-widget.compact .rate-price {
    font-size: 13px;
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 768px) {
    .gold-rates-widget[data-layout="horizontal"] .gold-rates-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .gold-rate-item {
        width: 100%;
        justify-content: space-between;
        padding: 12px 16px;
    }
    
    .rate-flag {
        font-size: 24px;
    }
    
    .rate-label {
        font-size: 9px;
    }
    
    .rate-price {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gold-rate-item {
        padding: 10px 12px;
    }
    
    .rate-flag {
        font-size: 20px;
    }
    
    .rate-details {
        gap: 2px;
    }
    
    .rate-price {
        font-size: 13px;
    }
    
    .rate-change {
        font-size: 10px;
    }
}

/* ====================================
   Top Bar Style (full width ticker)
   ==================================== */

.gold-rates-topbar {
    background: linear-gradient(90deg, rgba(139, 105, 20, 0.1) 0%, rgba(212, 175, 55, 0.1) 100%);
    padding: 8px 0;
    text-align: center;
    border-bottom: 1px solid rgba(139, 105, 20, 0.2);
}

.gold-rates-topbar .gold-rates-container {
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gold-rates-topbar .gold-rate-item {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* ====================================
   Color Variations
   ==================================== */

/* Burgundy Theme (for Miraar Jewels) */
.gold-rates-widget.theme-burgundy .gold-rate-item {
    background: rgba(125, 25, 53, 0.95);
    border-color: rgba(156, 36, 69, 0.5);
}

.gold-rates-widget.theme-burgundy .rate-label {
    color: rgba(255, 255, 255, 0.8);
}

.gold-rates-widget.theme-burgundy .rate-price {
    color: #d4af37;
}

/* Gold Theme */
.gold-rates-widget.theme-gold .gold-rate-item {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a1a;
}

/* Dark Theme */
.gold-rates-widget.theme-dark .gold-rate-item {
    background: #1f2937;
    border-color: #374151;
    color: white;
}

.gold-rates-widget.theme-dark .rate-label {
    color: rgba(255, 255, 255, 0.7);
}

.gold-rates-widget.theme-dark .rate-price {
    color: #fbbf24;
}

/* ====================================
   Print Styles
   ==================================== */

@media print {
    .gold-rates-widget {
        display: none;
    }
}

/* ====================================
   MARQUEE / TICKER STYLE
   ==================================== */

.gold-rates-marquee {
    width: 100%;
    overflow: hidden;
    background: #731120;
    padding: 6px 0;
    position: relative;
    height: 32px;
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1;
}

.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}

.marquee-content {
    display: inline-flex;
    align-items: center;
    gap: 50px;
    white-space: nowrap;
    animation: marquee-scroll 20s linear infinite;
    will-change: transform;
}

/* Pause on hover */
.gold-rates-marquee:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Marquee Items */
.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
}

.marquee-item .rate-icon {
    font-size: 16px;
}

.marquee-item .rate-text {
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #ffd700;
    font-size: 12px;
}

.marquee-item .rate-flag {
    font-size: 18px;
}

.marquee-item .rate-label {
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.marquee-item .rate-price,
.marquee-item .rate-price-duplicate {
    color: #ffd700;
    font-weight: 700;
    font-size: 14px;
}

.marquee-item .loading-spinner {
    color: #ffd700;
    font-size: 13px;
}

.marquee-item .rate-change,
.marquee-item .rate-change-duplicate {
    font-size: 11px;
    font-weight: 600;
    margin-left: 3px;
}

.marquee-item .rate-change .positive,
.marquee-item .rate-change-duplicate .positive {
    color: #4ade80;
}

.marquee-item .rate-change .negative,
.marquee-item .rate-change-duplicate .negative {
    color: #f87171;
}

.marquee-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    margin: 0 5px;
}

/* Responsive Marquee */
@media (max-width: 768px) {
    .gold-rates-marquee {
        height: 35px;
        padding: 6px 0;
    }
    
    .marquee-content {
        gap: 35px;
        animation: marquee-scroll 15s linear infinite;
    }
    
    .marquee-item {
        font-size: 11px;
        gap: 5px;
    }
    
    .marquee-item .rate-flag {
        font-size: 14px;
    }
    
    .marquee-item .rate-text {
        font-size: 10px;
    }
    
    .marquee-item .rate-label {
        font-size: 10px;
    }
    
    .marquee-item .rate-price,
    .marquee-item .rate-price-duplicate {
        font-size: 12px;
    }
    
    .marquee-separator {
        margin: 0 3px;
    }
}

/* Elementor Full Width Fix */
.elementor-element .gold-rates-marquee {
    margin: 0 !important;
}

.elementor-widget-shortcode .gold-rates-marquee {
    width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove spacing around marquee section */
.elementor-section .gold-rates-marquee {
    margin: 0 !important;
}

.elementor-widget-shortcode {
    margin: 0 !important;
}

/* Remove top spacing from body/page */
body .gold-rates-marquee:first-child,
#page-wrap > .gold-rates-marquee:first-child {
    margin-top: 0 !important;
}

/* Reduce header spacing */
#site-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

