/* Vietcombank Currency Converter Styles */

.vcb-currency-converter {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vcb-converter-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.vcb-converter-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    color: #b72126;
    font-weight: 700;
}

.vcb-update-time {
    margin: 0;
    font-size: 0.875rem;
    color: #666;
}

/* Form Styles */
.vcb-converter-form {
    margin-bottom: 2rem;
}

.vcb-converter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vcb-converter-input-group {
    display: flex;
    flex-direction: column;
}

.vcb-converter-input-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.875rem;
}

.vcb-input,
.vcb-select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.vcb-input:focus,
.vcb-select:focus {
    outline: none;
    border-color: #b72126;
    box-shadow: 0 0 0 3px rgba(183, 33, 38, 0.1);
}

.vcb-input[readonly] {
    background: #f8f8f8;
    cursor: not-allowed;
}

.vcb-result {
    font-weight: 700;
    font-size: 1.125rem;
    color: #b72126;
}

.vcb-result-updated {
    animation: resultPulse 0.6s ease;
}

@keyframes resultPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Swap Button */
.vcb-converter-swap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.vcb-swap-btn {
    background: #b72126;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vcb-swap-btn:hover {
    background: #9a1c20;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.vcb-swap-btn:active {
    transform: scale(0.95);
}

.vcb-swap-rotating {
    animation: rotate180 0.3s ease;
}

@keyframes rotate180 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

/* Rate Type Radio Buttons */
.vcb-converter-rate-type {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 8px;
}

.vcb-converter-rate-type > label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #333;
}

.vcb-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.vcb-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.vcb-radio-label:hover {
    border-color: #b72126;
}

.vcb-radio-label input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.vcb-radio-label input[type="radio"]:checked + span {
    color: #b72126;
    font-weight: 600;
}

/* Convert Button */
.vcb-convert-btn {
    width: 100%;
    padding: 1rem;
    background: #b72126;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(183, 33, 38, 0.2);
}

.vcb-convert-btn:hover {
    background: #9a1c20;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(183, 33, 38, 0.3);
}

.vcb-convert-btn:active {
    transform: translateY(0);
}

.vcb-convert-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Message Box */
.vcb-converter-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.vcb-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vcb-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.vcb-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Exchange Rates Table */
.vcb-exchange-rates-table {
    margin-top: 3rem;
}

.vcb-exchange-rates-table h4 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: #333;
}

.vcb-table-responsive {
    overflow-x: auto;
}

.vcb-rates-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.vcb-rates-table thead {
    background: #b72126;
    color: white;
}

.vcb-rates-table th,
.vcb-rates-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.vcb-rates-table th {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.vcb-rates-table tbody tr:hover {
    background: #f8f8f8;
}

.vcb-rates-table td:nth-child(3),
.vcb-rates-table td:nth-child(4),
.vcb-rates-table td:nth-child(5),
.vcb-rates-table th:nth-child(3),
.vcb-rates-table th:nth-child(4),
.vcb-rates-table th:nth-child(5) {
    text-align: right;
}

/* Footer */
.vcb-converter-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.vcb-source {
    margin: 0;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vcb-currency-converter {
        padding: 1rem;
    }

    .vcb-converter-row {
        grid-template-columns: 1fr;
    }

    .vcb-converter-header h3 {
        font-size: 1.5rem;
    }

    .vcb-radio-group {
        flex-direction: column;
    }

    .vcb-radio-label {
        width: 100%;
    }

    .vcb-rates-table {
        font-size: 0.875rem;
    }

    .vcb-rates-table th,
    .vcb-rates-table td {
        padding: 0.5rem;
    }
}

/* Currency Dropdown Animations */
.vcb-loading {
    opacity: 0.6;
    pointer-events: none;
}

.vcb-price-loading {
    opacity: 0.5;
    position: relative;
}

.vcb-price-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #b72126;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.vcb-price-updated {
    animation: priceUpdate 0.6s ease;
}

@keyframes priceUpdate {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        color: #b72126;
    }
}

.vcb-rate-updated {
    animation: rateUpdate 0.6s ease;
}

@keyframes rateUpdate {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

