/**
 * TopLine Rates Tables - Frontend Styles (shortcodes / embedded tables)
 * Align with header nav: 1400px max, 35px gutters.
 */

.topline-rates-tables {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    width: 100%;
    max-width: var(--topline-rates-max-width, 1400px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--topline-rates-gutter, 35px);
    padding-right: var(--topline-rates-gutter, 35px);
    box-sizing: border-box;
}

.topline-rates-tables .rates-table-section {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.topline-rates-tables .rates-table-section {
    margin-bottom: 40px;
}

.topline-rates-tables .rates-table-section:last-child {
    margin-bottom: 0;
}

.topline-rates-tables h3 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #0C2333;
    margin: 0 0 16px;
}

.topline-rates-tables .rates-highlight {
    font-size: 16px;
    font-weight: 600;
    color: #D52330;
    margin: -8px 0 16px;
}

/* Rate Table Base Styles */
.topline-rate-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #E5E7EB;
}

.topline-rate-table thead {
    background: #f8f9fa;
}

.topline-rate-table th,
.topline-rate-table td {
    border-top: none !important;
    border-left: none !important;
    border-right: 1px solid #e5e7eb !important;
    border-bottom: 1px solid #e5e7eb !important;
    vertical-align: middle !important;
    line-height: 1.5 !important;
}

.topline-rate-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #0c2333;
    background: #f8f9fa !important;
    text-transform: none;
    letter-spacing: normal;
}

.topline-rate-table th:last-child,
.topline-rate-table td:last-child {
    border-right: none !important;
}

.topline-rate-table tbody tr:last-child td {
    border-bottom: none !important;
}

.topline-rate-table tbody tr:nth-child(odd) > td,
.topline-rate-table tbody tr:nth-child(even) > td {
    background-color: #fff !important;
}

.topline-rate-table thead th[rowspan] {
    vertical-align: middle;
}

.topline-rate-table thead tr:nth-child(2) th {
    padding: 10px 16px;
    background: rgba(255,255,255,0.1);
    font-size: 12px;
}

.topline-rate-table tbody tr {
    transition: background 0.15s;
}

.topline-rate-table tbody tr:hover > td {
    background: #f9fafb !important;
}

.topline-rate-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: #374151;
    background: #fff !important;
    vertical-align: middle;
}

.topline-rate-table tbody td:first-child {
    font-weight: 500;
    color: #0C2333;
}

/* Certificate tiers table adjustments */
.topline-rate-table.cert-tiers thead th {
    text-align: center;
}

.topline-rate-table.cert-tiers thead th:first-child {
    text-align: left;
}

.topline-rate-table.cert-tiers tbody td {
    text-align: center;
}

.topline-rate-table.cert-tiers tbody td:first-child {
    text-align: left;
    font-weight: 500;
}

/* Inline Rate Shortcode */
.topline-inline-rate {
    font-weight: 600;
    color: #D52330;
}

/* Disclaimer Text */
.topline-rates-tables .rates-disclaimer {
    margin-top: 24px;
    padding: 16px;
    background: #F3F4F6;
    border-radius: 8px;
    font-size: 12px;
    color: #6B7280;
    line-height: 1.6;
}

.topline-rates-tables .rates-disclaimer p {
    margin: 0 0 8px;
}

.topline-rates-tables .rates-disclaimer p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .topline-rates-tables {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 768px) {
    .topline-rates-tables {
        padding-left: 16px;
        padding-right: 16px;
    }

    .topline-rates-tables h3 {
        font-size: 18px;
    }
    
    .topline-rates-tables .rates-table-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .topline-rate-table {
        display: table;
        width: max-content;
        min-width: 100%;
        overflow-x: visible;
    }
    
    .topline-rate-table thead th,
    .topline-rate-table tbody td {
        padding: 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .topline-rate-table.cert-tiers {
        min-width: 600px;
        width: max-content;
    }
}

@media (max-width: 480px) {
    .topline-rates-tables .rates-table-section {
        margin-bottom: 32px;
    }
    
    .topline-rate-table thead th,
    .topline-rate-table tbody td {
        padding: 10px 8px;
        font-size: 12px;
    }
}
