/* ============================================
   CURRENCY WIDGET - PROFESSIONAL DESIGN
   ============================================ */

.currency-widget {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 0;
    width: 340px;
    z-index: 1000;
    transform: translateX(380px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(148, 163, 184, 0.1);
    overflow: hidden;
}

.currency-widget.active {
    transform: translateX(0);
}

/* Header */
.currency-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.currency-widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.currency-icon {
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Refresh Button */
.refresh-currency-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    backdrop-filter: blur(10px);
}

.refresh-currency-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.refresh-currency-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.refresh-currency-btn.refreshing {
    animation: spin-refresh 1s linear infinite;
    pointer-events: none;
}

@keyframes spin-refresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Update Time */
.currency-update-time {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.currency-update-time svg {
    opacity: 0.6;
}

/* Rates Grid */
.currency-rates-grid {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.currency-rate-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: white;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.currency-rate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #c7d2fe;
}

/* Currency Flag */
.currency-flag {
    font-size: 32px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Currency Info */
.currency-info {
    flex: 1;
}

.currency-code {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.02em;
}

.currency-name {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* Currency Value */
.currency-value {
    font-size: 18px;
    font-weight: 700;
    color: #6366f1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* Color Variations for Cards */
.currency-rate-card.usd:hover {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.currency-rate-card.eur:hover {
    border-color: #c7d2fe;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.currency-rate-card.gbp:hover {
    border-color: #a5b4fc;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.currency-rate-card.try:hover {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* Footer */
.currency-widget-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-live 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
}

@keyframes pulse-live {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .currency-widget {
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: 380px;
        margin: 0 auto;
    }
    
    .currency-rates-grid {
        padding: 16px;
        gap: 10px;
    }
    
    .currency-rate-card {
        padding: 14px;
    }
}

/* Smooth Entry Animation */
@keyframes slideInRight {
    from {
        transform: translateX(380px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.currency-widget.active {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}