/* Currency Rates CSS */

/* Add gradient line to white box containers */
.major-rates-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Gradient line */
.major-rates-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #dc3545, #fd7e14, #ffc107, #90be6d, #28a745);
    z-index: 1;
}

/* Rates table enhancements */
.rates-table {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    width: 100%;
    border-collapse: collapse;
}

.rates-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
}

.rates-table td {
    vertical-align: middle;
    padding: 12px 15px;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.rates-table tr:last-child td {
    border-bottom: none;
}

.rates-table tr:hover td {
    background-color: var(--hover-color);
}

.rates-table a {
    font-weight: 500;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.rates-table a:hover {
    text-decoration: none;
    color: var(--accent-color);
}

/* Table controls */
.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
}

/* Change indicators */
.change-up {
    color: var(--success-color) !important;
    font-weight: 500;
}

.change-down {
    color: var(--danger-color) !important;
    font-weight: 500;
}

.text-right {
    text-align: right;
}

.rates-table i.fa-caret-up,
.rates-table i.fa-caret-down {
    margin-left: 4px;
    font-size: 1.1rem;
}

/* Responsive card view for mobile */
.rates-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
}

.rate-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

/* Gradient line for rate cards */
.rate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #dc3545, #fd7e14, #ffc107, #90be6d, #28a745);
    z-index: 1;
}

.rate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.rate-card-header {
    padding: 15px;
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rate-card-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.rate-card-header .rate {
    font-size: 1.2rem;
    font-weight: 600;
}

.rate-card-body {
    padding: 15px;
}

.rate-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.rate-detail:last-child {
    margin-bottom: 0;
}

.rate-detail .label {
    color: #666;
    font-weight: 500;
}

.rate-detail .value {
    font-weight: 500;
}

/* Refresh controls */
.rates-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.auto-refresh {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.auto-refresh-timer {
    background-color: var(--light-bg);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 5px;
    font-weight: 600;
}

.refresh-btn {
    background-color: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.refresh-btn:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

.refresh-btn i {
    margin-right: 6px;
}

/* View all link */
.view-all-link {
    margin-top: 15px;
    text-align: right;
}

.view-all-link a {
    font-weight: 500;
}

.view-all-link i {
    margin-left: 5px;
}

/* Disclaimer styling */
.disclaimer {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #777;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 10px;
    border-radius: 4px;
}

/* Hide desktop table on small screens and show cards instead */
@media (max-width: 767px) {
    .table-responsive {
        display: none;
    }
    
    .rates-cards {
        display: grid;
    }
}

@media (min-width: 768px) {
    .d-block.d-md-none {
        display: none !important;
    }
}

/* Enhance mobile experience */
@media (max-width: 480px) {
    .major-rates-section {
        padding: 15px;
    }
    
    .rate-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rate-card-header .rate {
        margin-top: 5px;
    }
}

/* Animation for highlighting changes */
@keyframes highlight {
    0% { background-color: rgba(144, 238, 144, 0.8); }
    100% { background-color: transparent; }
}

.highlight-change {
    animation: highlight 2s ease-out;
}