/* ── PAGE HEADER ─────────────────────────────────────────────────────────── */

.home-header-group {
    margin-bottom: 2rem;
}

.home-header-group h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
    line-height: 1.2;
}

.home-header-group p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
}

.timestamp-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-family: 'Space Mono', monospace;
    color: var(--text-tertiary);
}

/* ── ALERT BANNERS ───────────────────────────────────────────────────────── */

.alert-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.price-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    border: 1px solid;
}

.price-alert.red {
    background: var(--red-bg);
    border-color: var(--red-border);
    color: var(--red);
}

.price-alert.green {
    background: var(--green-bg);
    border-color: var(--green-border);
    color: var(--green);
}

.alert-body {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.alert-icon {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.alert-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.alert-sub {
    font-size: 0.85rem;
    opacity: 0.85;
}

.alert-cta {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.8;
    flex-shrink: 0;
}

/* ── PRICE TABLE CARD ────────────────────────────────────────────────────── */

.prices-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.prices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.prices-header h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Small notice when tomorrow's data isn't out yet — shown in header */
.pending-notice {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: 'Space Mono', monospace;
}

.source-badge {
    background: var(--blue-bg);
    border: 1px solid var(--blue-border);
    color: var(--blue);
    padding: 2px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── TABLE ───────────────────────────────────────────────────────────────── */

.home-price-table {
    width: 100%;
    border-collapse: collapse;
}

.home-price-table thead {
    background: var(--surface2);
}

.home-price-table th {
    padding: 0.625rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.col-right { text-align: right !important; }

.home-price-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

.home-price-table tbody tr:last-child { border-bottom: none; }
.home-price-table tbody tr:hover { background: var(--surface2); }

.home-price-table td {
    padding: 0.9rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.fuel-name {
    font-weight: 600;
    color: var(--text-primary) !important;
}

.fuel-price {
    text-align: right;
    font-family: 'Space Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary) !important;
}

/* Tomorrow price column — inherits mono + right-align from fuel-price,
   but colored to signal direction */
.fuel-price-tomorrow {
    text-align: right;
    font-family: 'Space Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.fuel-price-tomorrow.price-up   { color: var(--red); }
.fuel-price-tomorrow.price-down { color: var(--green); }

/* Pending state spans both tomorrow + change columns */
.fuel-price-tomorrow.muted {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Change column — right-aligned, holds the pill */
.fuel-diff { text-align: right; }

/* ── CHANGE PILLS ────────────────────────────────────────────────────────── */
/*
    Four states:
      up      — price rising tomorrow       → red pill
      down    — price dropping tomorrow     → green pill
      same    — confirmed no change         → neutral em dash
      pending — tomorrow not published yet  → dashed clock pill
*/

.change-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 5px;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    vertical-align: middle;
}

.change-pill.up {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.change-pill.down {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.change-pill.same {
    background: transparent;
    color: var(--text-tertiary);
    border: none;
    font-weight: 400;
    font-size: 1rem;
}

.change-pill.pending {
    background: transparent;
    color: var(--text-tertiary);
    border: 1px dashed var(--border-strong);
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

/* ── EMPTY STATE ─────────────────────────────────────────────────────────── */

.empty-cell {
    padding: 2.5rem !important;
    text-align: center !important;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Premium Badge */
.premium-badge {
    background: linear-gradient(135deg, #FFD700 0%, #F7B733 100%);
    color: #4A3500;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Supplemental FAQ Section */
.supplemental-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.supplemental-section h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.faq-card {
    background: var(--surface2);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.faq-card svg {
    width: 24px;
    height: 24px;
    color: var(--blue);
    margin-bottom: 1rem;
}

.faq-card h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.faq-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Container needs relative positioning for the absolute dropdown */
/* Container needs relative positioning for the absolute dropdown */
.province-trap-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-start;
    position: relative;
}

.province-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
    transition: all 0.2s ease;
    text-align: left;
}

.province-selector:hover {
    border-color: var(--blue);
    background: var(--surface);
}

.ps-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ps-left svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.ps-text {
    display: flex;
    flex-direction: column;
}

.ps-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
}

.ps-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.ps-caret {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}

/* The Floating Menu */
.province-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-width: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.2s ease;
    overflow: hidden;
}

.province-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.menu-header {
    padding: 12px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
}

.menu-list li {
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease;
}

.menu-list li:last-child {
    border-bottom: none;
}

.menu-list li:hover {
    background: var(--surface2);
    color: var(--blue);
}

.menu-other {
    font-style: italic;
    color: var(--text-secondary);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface2);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 0.9rem;
    max-width: 90vw;
    width: max-content;
}

.toast svg {
    width: 20px;
    height: 20px;
    color: var(--blue);
    flex-shrink: 0;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.outlook-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.outlook-icon svg {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
}

.outlook-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    font-weight: 700;
}

.outlook-text h2 {
    font-size: 1.2rem;
    margin: 4px 0;
    color: var(--text-primary);
}

.outlook-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* The Urgency Colors */
.alert-danger {
    background: rgba(255, 69, 58, 0.1);
    border-color: rgba(255, 69, 58, 0.3);
}
.alert-danger .outlook-icon svg, .alert-danger h2 { color: #FF453A; }

.alert-success {
    background: rgba(48, 209, 88, 0.1);
    border-color: rgba(48, 209, 88, 0.3);
}
.alert-success .outlook-icon svg, .alert-success h2 { color: #30D158; }

.fuel-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fuel-dot {
    width: 10px;
    height: 25px;
    border-radius: 5px;
    flex-shrink: 0;
}

.fuel-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fuel-name-main {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.2;
}

.fuel-name-secondary {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-family: 'Anuphan', sans-serif;
    line-height: 1.2;
}