/* Custom styles for Currency Calculator */
.card {
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.display-6 {
    font-size: 2.5rem;
    font-weight: 700;
}

.btn-group .btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.table th {
    font-weight: 600;
    color: #495057;
    border-top: none;
    font-size: 0.875rem;
}

.table td {
    font-size: 0.875rem;
    padding: 0.75rem 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.alert {
    border-radius: 8px;
    border: none;
}

/* Custom chart styling */
#rateChart {
    max-height: 200px;
}

/* Popular currencies list styling */
.list-group-item {
    border: none;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
    cursor: pointer;
}

.list-group-item.active {
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 4px solid #0d6efd;
    color: #0d6efd;
    font-weight: 600;
}

/* Flag icons styling */
.flag-icon {
    width: 24px;
    height: 16px;
    margin-right: 8px;
    border-radius: 2px;
    display: inline-block;
    background-size: cover;
    background-position: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem !important;
    }
    
    .display-6 {
        font-size: 2rem;
    }
    
    .btn-group {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .btn-group .btn {
        flex: 1;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
}

/* Animation for conversion */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#convertedAmount {
    animation: fadeIn 0.5s ease-out;
}

/* Hover effects for buttons */
.btn-primary {
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
}

/* Swap button styling */
#swapCurrencies {
    transition: all 0.3s ease;
}

#swapCurrencies:hover {
    transform: rotate(180deg);
    background-color: #0d6efd;
    color: white;
}

/* Currency table specific styling */
.currency-change-positive {
    color: #198754;
    font-weight: 500;
}

.currency-change-negative {
    color: #dc3545;
    font-weight: 500;
}

/* Form switch customization */
.form-switch .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Table row striping */
.table tbody tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Highlight for selected currencies */
.currency-selected {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

/* Loading animation */
.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* Currency code badges */
.currency-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
}

/* Input focus effect */
#amount:focus, #convertedAmount:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Modal styling */
.modal-content {
    border-radius: 12px;
    border: none;
}

/* Small screen adjustments */
@media (max-width: 576px) {
    .table-responsive {
        font-size: 0.75rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .list-group-item {
        padding: 0.5rem 0.75rem;
    }
}