/* ============================================================
   WAVE Dashboard -- Custom styles
   Companion to materialize.min.css.

   Typography scale (2 custom sizes):
     Inherited (~1rem) -- table content matches body and collection lists
     Note (0.74rem)    -- footnote lists below tables
   ============================================================ */


/* ----------------------------------------------------------
   Rate table wrapper and scroll container
   ---------------------------------------------------------- */

.wave-rate-table-wrap {
    margin: 1.5rem 0 1rem;
}

/* Horizontal scroll on narrow viewports. Table never word-wraps. */
.wave-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* ----------------------------------------------------------
   Rate table -- base structure
   ---------------------------------------------------------- */

.wave-rate-table {
    border-collapse: collapse;
    /* font-size intentionally unset -- inherits body font to match collection list */
    line-height: 1.4;
    margin-bottom: 0.5rem;
    width: 100%;
}

/* Table heading sits outside the scroll wrapper so it doesn't scroll */
.wave-table-heading {
    color: #9e9e9e;
    margin: 0 0 0.25rem;
}

/* Remove Materialize's default box border around collection lists */
.collection {
    border: none;
}

.wave-rate-table thead th {
    font-weight: 400;
    letter-spacing: 0.03em;
    text-align: center;
    padding: 0.15rem 0.25rem;
    border-bottom: 1px solid #888;
    white-space: normal;       /* allow header text to wrap */
    word-break: break-word;
    max-width: 7rem;
}

.wave-rate-table tbody td {
    padding: 0.05rem 0.25rem;
    text-align: center;
    border: none;
}

/* Month / row header: left-aligned, muted weight */
.wave-rate-table .wave-row-header {
    font-weight: 400;
    color: #666;
    text-align: left;
    padding-right: 0.4rem;
    white-space: nowrap;
    border-bottom: none;
}

/* Alternating tint on data cells only, not the month row header */
.wave-rate-table tbody tr:nth-child(even) td {
    background-color: #f7f7f7;
}

/* Current month: green text matching the active collection-item colour */
.wave-rate-table tr.wave-current-month td,
.wave-rate-table tr.wave-current-month .wave-row-header {
    color: #26a69a;
    font-weight: 600;
}


/* ----------------------------------------------------------
   Active column emphasis -- bold only, no fill
   ---------------------------------------------------------- */

.wave-rate-table th.wave-active-col,
.wave-rate-table td.wave-active-col {
    font-weight: 700;
}


/* ----------------------------------------------------------
   Footnote list below the table (range tables only)
   ---------------------------------------------------------- */

.wave-tag-footnotes {
    margin: 0.4rem 0 0;
    padding-left: 1.4rem;
    font-size: 0.74rem;
    color: #666;
    line-height: 1.7;
}

/* code inherits 0.74rem -- no override */
.wave-tag-footnotes code {
    background: none;
    color: inherit;
    padding: 0;
}

.wave-tag-footnotes .wave-fn-label {
    font-weight: 600;
}


/* ----------------------------------------------------------
   Notes block below the rate table
   ---------------------------------------------------------- */

.wave-notes-block {
    margin: 0.75rem 0 0;
    padding-left: 1rem;
    border-left: 4px solid #26a69a !important;
    font-size: 0.82rem;
    color: #444;
    line-height: 1.6;
}

.wave-notes-block h5 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #555;
    margin: 0 0 0.4rem;
}

.wave-notes-block ol {
    margin: 0;
    padding-left: 1.4rem;
}

.wave-notes-block li {
    margin-bottom: 0.35rem;
}

.wave-notes-block pre {
    background: #f5f5f5;
    border-radius: 2px;
    font-size: 0.82rem;
    overflow-x: auto;
}


/* ----------------------------------------------------------
   Mobile: scale footnote size proportionally
   ---------------------------------------------------------- */

@media (max-width: 480px) {
    .wave-tag-footnotes {
        font-size: 0.68rem;
    }
}
