/* Exchange Page Styles */

:root {
    --teko-primary: #ff6600;
}

.exchange-header {
    margin-bottom: 2rem;
}

.exchange-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    border-left: 4px solid var(--teko-primary, #ff6600);
    padding-left: 1rem;
}

/* Converter Form */
.exchange-converter-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.exchange-converter-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exchange-converter-title .fa-exchange-alt {
    color: var(--teko-primary, #ff6600);
}

.exchange-converter-form {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: end;
}

@media (max-width: 768px) {
    .exchange-converter-form {
        grid-template-columns: 1fr;
    }
}

.exchange-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exchange-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exchange-input-group .form-control,
.exchange-input-group .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.exchange-input-group .form-control:focus,
.exchange-input-group .form-select:focus {
    border-color: var(--teko-primary, #ff6600);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    outline: none;
}

.exchange-equals {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8px;
}

.exchange-equals .fa-equals {
    font-size: 1.5rem;
    color: var(--teko-primary, #ff6600);
}

.exchange-convert-btn {
    width: 100%;
    padding: 14px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Result Display */
.exchange-result {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.exchange-result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.exchange-result-rate {
    font-size: 0.9rem;
    color: #666;
}

.exchange-result-rate strong {
    color: var(--teko-primary, #ff6600);
}

/* Currencies Grid */
.exchange-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--teko-primary, #ff6600);
}

.exchange-currencies-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 1200px) {
    .exchange-currencies-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .exchange-currencies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .exchange-currencies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .exchange-currencies-grid {
        grid-template-columns: 1fr;
    }
}

/* Currency Card */
.exchange-currency-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.exchange-currency-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.exchange-currency-card.active {
    border-color: var(--teko-primary, #ff6600);
    background: rgba(13, 110, 253, 0.02);
}

.exchange-currency-card.user-currency {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.02);
}

.exchange-currency-flag {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.exchange-currency-code {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.exchange-currency-name {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.exchange-currency-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--teko-primary, #ff6600);
}

.exchange-currency-change {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.exchange-currency-change.positive {
    color: #28a745;
}

.exchange-currency-change.negative {
    color: #dc3545;
}

/* User Currency Badge */
.exchange-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #28a745;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* Loading State */
.exchange-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.exchange-loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--teko-primary, #ff6600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Last Updated */
.exchange-last-updated {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    margin-top: 2rem;
}

/* Geolocation Button */
.exchange-geo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.exchange-geo-btn:hover {
    border-color: var(--teko-primary, #ff6600);
    color: var(--teko-primary, #ff6600);
}

.exchange-geo-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.exchange-geo-btn.success {
    border-color: #28a745;
    color: #28a745;
}

.exchange-geo-btn.error {
    border-color: #dc3545;
    color: #dc3545;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.exchange-converter-card,
.exchange-currency-card {
    animation: fadeIn 0.4s ease-out;
}
