/* Currency Converter - Modern & Enhanced Design */

#currency-converter-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Floating Button */
.converter-toggle button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.converter-toggle button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.converter-toggle button:hover::before {
    left: 100%;
}

.converter-toggle button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-content i {
    font-size: 18px;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 12px;
    border-left: 2px solid rgba(255,255,255,0.3);
}

.pulse {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.live-text {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Panel */
.converter-panel {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 420px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.converter-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.converter-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-content i {
    font-size: 24px;
}

.header-content h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.converter-close {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.converter-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Body */
.converter-body {
    padding: 28px;
}

/* Rate Display */
.converter-rate {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rate-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #4ade80;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.rate-display {
    margin-bottom: 8px;
}

.rate-value {
    font-size: 20px;
    color: #1e293b;
    font-weight: 600;
}

.rate-value strong {
    color: #667eea;
    font-size: 26px;
    font-weight: 800;
}

.rate-update {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* Input Group */
.converter-input-group {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.input-wrapper {
    flex: 1;
}

.input-wrapper label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
}

.input-wrapper label i {
    font-size: 14px;
    color: #667eea;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.converter-swap {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.converter-swap:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.converter-swap i {
    font-size: 18px;
}

/* Quick Amounts */
.quick-amounts {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quick-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-right: 4px;
}

.quick-btn {
    background: white;
    border: 2px solid #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.quick-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: scale(0.95);
}

/* Info */
.converter-info {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 14px;
    border-radius: 10px;
    font-size: 12px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.converter-info i {
    color: #f59e0b;
    font-size: 16px;
    flex-shrink: 0;
}

/* USD Badge on Prices */
.usd-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-left: 10px;
    vertical-align: middle;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
    animation: fadeIn 0.5s ease;
}

/* Convert Button on Prices */
.convert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.convert-btn:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.convert-btn i {
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .converter-panel {
        background: #1e293b;
        color: #e2e8f0;
    }

    .converter-rate {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
    }

    .rate-value {
        color: #e2e8f0;
    }

    .input-wrapper label {
        color: #cbd5e1;
    }

    .input-wrapper input {
        background: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }

    .input-wrapper input:focus {
        background: #475569;
        border-color: #667eea;
    }

    .quick-btn {
        background: #334155;
        border-color: #475569;
        color: #cbd5e1;
    }

    .converter-info {
        background: #422006;
        border-left-color: #f59e0b;
        color: #fef3c7;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #currency-converter-widget {
        bottom: 20px;
        right: 20px;
    }

    .converter-panel {
        width: calc(100vw - 40px);
        max-width: 420px;
    }

    .converter-toggle button {
        padding: 14px 20px;
        font-size: 14px;
    }

    .converter-label {
        display: none;
    }

    .live-indicator {
        padding-left: 10px;
    }
}

@media (max-width: 480px) {
    .converter-panel {
        bottom: 75px;
        right: -10px;
    }

    .converter-body {
        padding: 20px;
    }

    .converter-input-group {
        flex-direction: column;
        gap: 12px;
    }

    .converter-swap {
        transform: rotate(90deg);
    }

    .quick-amounts {
        justify-content: center;
    }
}
