/**
 * Fuel Price Tracker - Fuel Pricing Table Stylesheet
 */

.fpt-table-container {
    width: 100%;
    margin: 20px 0;
    font-family: inherit;
    box-sizing: border-box;
    overflow-x: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.fpt-table-container * {
    box-sizing: border-box;
}

/* Base Price Table Styles (Dark Theme Default) */
.fpt-table-theme-dark {
    background: #0d2e3d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.fpt-table-theme-dark .fpt-price-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

/* Headers */
.fpt-table-theme-dark .fpt-price-table th {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
}

/* Specific Header Colors based on mockup */
.fpt-table-theme-dark .fpt-price-table th:nth-child(1),
.fpt-table-theme-dark .fpt-price-table th:nth-child(3),
.fpt-table-theme-dark .fpt-price-table th:nth-child(4) {
    color: #00FF99;
}

.fpt-table-theme-dark .fpt-price-table th:nth-child(2) {
    color: #ffffff;
}

.fpt-table-header-date {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    display: inline-block;
    margin-top: 4px;
}

/* Table Body rows and cells */
.fpt-table-theme-dark .fpt-price-table td {
    padding: 16px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease;
}

.fpt-table-theme-dark .fpt-price-table tr:last-child td {
    border-bottom: none;
}

/* Zebra row striping */
.fpt-table-theme-dark .fpt-price-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.fpt-table-theme-dark .fpt-price-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Specific Cell Colors based on mockup */
.fpt-table-cell-fuel {
    color: #00FF99;
    font-weight: 600;
}

.fpt-table-cell-prev {
    color: rgba(255, 255, 255, 0.8);
}

.fpt-table-cell-latest {
    color: #00FF99;
    font-weight: 700;
}

.fpt-table-cell-diff {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

/* Price Difference Indicator Colors */
.fpt-table-cell-diff.fpt-diff-decrease {
    color: #00FF99 !important; /* Green for cheaper rate */
}

.fpt-table-cell-diff.fpt-diff-increase {
    color: #ef4444 !important; /* Red for price hike */
}

/* Optional Light Theme override (if specified via attribute) */
.fpt-table-theme-light {
    background: #ffffff;
    border: 1px solid var(--fpt-slate-200, #e2e8f0);
    color: var(--fpt-slate-800, #1e293b);
}

.fpt-table-theme-light .fpt-price-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.fpt-table-theme-light .fpt-price-table th {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    border-bottom: 2px solid var(--fpt-slate-100, #f1f5f9);
    background: var(--fpt-slate-50, #f8fafc);
}

.fpt-table-theme-light .fpt-price-table th:nth-child(1),
.fpt-table-theme-light .fpt-price-table th:nth-child(3),
.fpt-table-theme-light .fpt-price-table th:nth-child(4) {
    color: #059669; /* Emerald/Green focus for light mode */
}

.fpt-table-theme-light .fpt-price-table th:nth-child(2) {
    color: var(--fpt-slate-900, #0f172a);
}

.fpt-table-theme-light .fpt-table-header-date {
    color: var(--fpt-slate-600, #475569);
}

.fpt-table-theme-light .fpt-price-table td {
    padding: 16px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--fpt-slate-100, #f1f5f9);
    color: var(--fpt-slate-700, #334155);
}

.fpt-table-theme-light .fpt-price-table tr:nth-child(even) {
    background: var(--fpt-slate-50, #f8fafc);
}

.fpt-table-theme-light .fpt-price-table tr:hover {
    background: var(--fpt-slate-100, #f1f5f9);
}

.fpt-table-theme-light .fpt-table-cell-fuel {
    color: #059669;
}

.fpt-table-theme-light .fpt-table-cell-latest {
    color: #059669;
}

.fpt-table-theme-light .fpt-table-cell-diff.fpt-diff-decrease {
    color: #10b981 !important;
}

.fpt-table-theme-light .fpt-table-cell-diff.fpt-diff-increase {
    color: #dc2626 !important;
}
