/* ==========================================================================
   UI Benefits Calculator: shared styles

   Used by:  index-2026.html, index-2026-2027.html, index-2027.html
   Loads after the site stylesheet /assets/labor.css, so rules here win over
   the site defaults (for example heading sizes and spacing).

   Sections
     1. Color settings
     2. Notices ("This is only an estimate" box)
     3. Calculator box (the wage entry form container)
     4. Wage entry (quarter header, quarter rows, wage boxes, $ sign)
     5. Results box ("Estimated Benefit Amounts" container)
     6. Results table, horizontal (2026 page)
     7. Results table, vertical (2026-2027 and 2027 pages)
     8. "Ready to file your claim?" box
     9. Small screens (must stay last so it overrides the rules above)

   Rule order matters in CSS: when two rules set the same thing, the later
   one wins. Keep overrides below the rules they override.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Color settings
   Named colors used by sections 5 and 7. Values match the blue and gray used
   elsewhere in this file.
   -------------------------------------------------------------------------- */

:root {
  --navy: #005a8e;
  --border: #bbb;
}


/* --------------------------------------------------------------------------
   2. Notices
   Blue callout box. Used for the "This is only an estimate" note above the
   results on all three pages.
   -------------------------------------------------------------------------- */

.advisory-box {
  font-size: 0.9167em;
  line-height: 1.5;
  padding: 0.75em 1em;
  margin: 0 0 1.25em 0;
  border-left: 4px solid #005a8e;
  background: #eaf4fb;
  border-radius: 0 3px 3px 0;
}

.advisory-box strong {
  display: block;
  margin-bottom: 0.25em;
  color: #005a8e;
}


/* --------------------------------------------------------------------------
   3. Calculator box
   The gray box around the wage entry form, its heading and instructions.
   -------------------------------------------------------------------------- */

.calculator-box {
  border: 1px solid #bbb;
  border-radius: 3px;
  padding: 1em 1.25em 1.25em;
  margin: 1em 0;
  background: #fafafa;
}

.calculator-box h2 {
  margin-top: 0;
  font-size: 1.1em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.4em;
  margin-bottom: 0.75em;
}

.calculator-box .instructions {
  font-size: 0.9167em;
  margin-bottom: 1em;
  color: #333;
}


/* --------------------------------------------------------------------------
   4. Wage entry
   The "Wage Details" bar, the "Base Period Quarters / Base Period Wages"
   header row, the five quarter rows, the wage boxes and the $ sign inside
   them.
   -------------------------------------------------------------------------- */

/* Green "Wage Details for Quarter/Year" bar */
.wageDetails {
  text-align: center;
  color: black;
  background-color: #00bf7d;
  padding: 0.25rem;
}

/* Header row above the quarters (2026 and 2027 pages) */
.table-h {
  background-color: #d6d2c4;
}

.table-h-l,
.table-h-r {
  color: #1d4289;
}

.table-h-r {
  float: right;
  text-align: center;
  padding-right: 2rem;
}

/* Each quarter row: outlined, with the label on the left */
.quarter-row {
  border-top: thin solid black;
  border-right: thin solid black;
  border-left: thin solid black;
}

label {
  display: inline-block;
  width: 25rem;
  padding: 0.5rem;
}

/* Quarter labels and the header's left cell share a width and a divider.
   (Merged from two earlier rules; the 30rem width replaces 25rem above.) */
.quarter-row label,
.table-h-l {
  display: inline-block;
  width: 30rem;
  text-align: center;
}

#labelOne,
#labelTwo,
#labelThree,
#labelFour,
#labelFive,
.table-h-l {
  border-right: thin solid black;
  margin-right: 1rem;
}

/* "The current quarter runs ..." line under the quarter rows */
#currentQuarter {
  border-top: thin solid black;
}

.labelCurrent {
  font-size: 0.9167em;
  color: #555;
  margin: 0.5em 0 1em 0;
}

/* Wage boxes */
input#quarter1,
input#quarter2,
input#quarter3,
input#quarter4,
input#quarter5 {
  border: thin solid gray;
  border-radius: 0.2rem;
  text-align: right;
}

/* Background colors: green = standard base period (quarters 1-4),
   pink = alternate base period (quarter 5). Used on the wage boxes and on
   the color key above them. */
.sbp,
input[type="text"].sbp {
  background-color: #eeffe8;
}

.altPeriod,
input[type="text"].altPeriod {
  background-color: #ffe8e7;
}

/* "$" shown inside the right edge of each wage box */
.input-dollar-wrap {
  display: inline-block;
  position: relative;
}

.input-dollar-wrap::after {
  content: "$";
  position: absolute;
  right: 0.5em;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  pointer-events: none;
}

.input-dollar-wrap input {
  padding-right: 1.5em; /* keep typed numbers clear of the $ */
}


/* --------------------------------------------------------------------------
   5. Results box
   The container the scripts fill with "Estimated Benefit Amounts" after
   Calculate is pressed. #horz is the divider line above it.
   -------------------------------------------------------------------------- */

#horz {
  margin: 1em 0 0;
}

.results-box {
  border: 1px solid #bbb;
  border-radius: 3px;
  padding: 1em 1.25em 1.25em;
  margin: 1em 0;
  background: #fafafa;
}

.results-box h2 {
  margin-top: 0;
  font-size: 1.1em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.4em;
  margin-bottom: 0.75em;
}

/* Added with the 2026-2027 page styles. Overrides the border, corners and
   top margin above, and clips content to the rounded corners. */
.results-box {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}


/* --------------------------------------------------------------------------
   6. Results table, horizontal (2026 page)
   One row of results with a heading per column. Built by benefits-2026.js.
   -------------------------------------------------------------------------- */

table.results-table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.75em 0 1em;
  font-size: 0.9167em;
}

table.results-table th {
  background: #005a8e;
  color: #fff;
  padding: 0.5em 0.75em;
  text-align: left;
  font-weight: normal;
}

table.results-table td {
  padding: 0.5em 0.75em;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

table.results-table td.amount {
  font-weight: bold;
  font-size: 1.1em;
}

/* Step-by-step calculation lines (A, B, C, earnings ratio). Kept for
   benefits-2026.js, which builds them, but the lines that display them are
   currently commented out, so nothing shows on the page today. */
.calc-detail {
  font-size: 0.9167em;
  color: #444;
  margin: 0.2em 0;
}


/* --------------------------------------------------------------------------
   7. Results table, vertical (2026-2027 and 2027 pages)
   One labeled row per value, with one column per benefit year. Built by
   benefits-2026-2027.js and ui-benefits2027.js. Also the 2026-2027 page's
   date note and its "In effect" / "Upcoming" badges.
   -------------------------------------------------------------------------- */

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.compare th,
table.compare td {
  padding: 10px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.compare th {
  background: #fafbfc;
  font-weight: 600;
  color: var(--navy);
}

table.compare td.metric {
  font-weight: 600;
  color: #333;
  width: 34%;
}

table.compare .amount {
  font-variant-numeric: tabular-nums;
}

/* Highlights the column for the benefit year in effect today */
table.compare .active-col {
  background: #f2fbf3;
}

/* "For a claim filed on ... the BY2026 table applies" note (2026-2027 page) */
.cutover-note {
  padding: 12px 18px;
  background: #eef6fb;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.cutover-note strong {
  color: var(--navy);
}

/* "In effect" / "Upcoming" labels in the column headings (2026-2027 page) */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.badge.active {
  background: #1e8e3e;
  color: #fff;
}

.badge.pending {
  background: #ddd;
  color: #444;
}


/* --------------------------------------------------------------------------
   8. "Ready to file your claim?" box
   Green box below the results on all three pages.
   -------------------------------------------------------------------------- */

.file-claim-box {
  border: 1px solid #bbb;
  border-radius: 3px;
  padding: 1em 1.25em;
  margin: 1em 0;
  background: #f4fff0;
}

.file-claim-box h2 {
  margin-top: 0;
  font-size: 1.1em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.4em;
  margin-bottom: 0.75em;
}


/* --------------------------------------------------------------------------
   9. Small screens (880px wide and below)
   Stacks the quarter rows: removes the label divider and fixed widths, and
   centers each row. Keep this section last so it overrides section 4.
   -------------------------------------------------------------------------- */

@media (max-width: 880px) {

  #labelOne,
  #labelTwo,
  #labelThree,
  #labelFour,
  #labelFive,
  .table-h-l {
    border-right: none;
    margin-right: 0;
    width: auto;
    text-align: center;
  }

  input#quarter1,
  input#quarter2,
  input#quarter3,
  input#quarter4,
  input#quarter5 {
    margin-right: 2rem;
  }

  .quarter-row {
    text-align: center;
  }
}
