/* Currency Converter Styles */

.converter-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.converter-container h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 600;
}

.converter-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0.7;
    font-size: 1rem;
}

.bars-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.converter-bar {
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 0.6rem;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dark .converter-bar {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.light .converter-bar {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.converter-bar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark .converter-bar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.bar-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.bar-amount {
    flex: 0 1 120px;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 0.4rem;
    font-size: 1rem;
    background: inherit;
    color: inherit;
}

.dark .bar-amount {
    border-color: #444;
    background: #1a1a1a;
    color: #fff;
}

.light .bar-amount {
    border-color: #ddd;
    background: #f9f9f9;
    color: #000;
}

.bar-amount:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.bar-currency {
    flex: 0 1 80px;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 0.4rem;
    font-size: 1rem;
    background: inherit;
    color: inherit;
    cursor: pointer;
}

.dark .bar-currency {
    border-color: #444;
    background: #1a1a1a;
    color: #fff;
}

.light .bar-currency {
    border-color: #ddd;
    background: #f9f9f9;
    color: #000;
}

.bar-currency:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.bar-arrow {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4a90e2;
    flex: 0 0 auto;
    margin: 0 0.5rem;
}

.bar-result {
    flex: 1;
    min-width: 120px;
    background: var(--bg-result, #e8f0ff);
    padding: 0.7rem 1rem;
    border-radius: 0.4rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 40px;
}

.dark .bar-result {
    background: #1e3a5f;
    color: #64b5f6;
}

.light .bar-result {
    background: #e3f2fd;
    color: #1976d2;
}

.result-value {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.loading-animation {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.loading-animation .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-animation .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-animation .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.bar-remove-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #ff4444;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.bar-remove-btn:hover:not(:disabled) {
    background-color: #cc0000;
    transform: scale(1.1);
}

.bar-remove-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.converter-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.converter-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.converter-btn-primary {
    background-color: #4a90e2;
    color: white;
}

.converter-btn-primary:hover {
    background-color: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.converter-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.2);
}

.converter-btn-secondary {
    background-color: #666;
    color: white;
}

.dark .converter-btn-secondary {
    background-color: #555;
}

.light .converter-btn-secondary {
    background-color: #888;
}

.converter-btn-secondary:hover {
    background-color: #444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.converter-btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .converter-container {
        padding: 0 0.5rem;
    }

    .converter-container h1 {
        font-size: 1.5rem;
    }

    .bar-controls {
        gap: 0.5rem;
    }

    .bar-amount,
    .bar-currency {
        flex: 0 1 70px;
        padding: 0.6rem 0.4rem;
        font-size: 0.9rem;
    }

    .bar-result {
        flex: 1;
        min-width: 80px;
        padding: 0.6rem;
        font-size: 1rem;
    }

    .bar-arrow {
        margin: 0 0.3rem;
        font-size: 1.1rem;
    }

    .bar-remove-btn {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    .converter-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .bar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .bar-amount,
    .bar-currency,
    .bar-result,
    .bar-arrow {
        flex: 1;
        width: 100%;
    }

    .bar-arrow {
        text-align: center;
        margin: 0;
    }

    .bar-result {
        min-width: unset;
    }

    .bar-remove-btn {
        align-self: center;
    }

    .converter-controls {
        flex-direction: column;
    }

    .converter-btn {
        width: 100%;
    }
}
