/* Global accessibility overrides. Loaded on every user-facing page
   AFTER the per-client (or bca.css fallback) stylesheet, so its rules
   override matching ones on equal specificity via cascade order. The
   point of separating these from the per-client CSS is that production
   deployments may have client stylesheets we don't see here in source
   control; centralising the WCAG fixes in one always-loaded file means
   any future or unknown client CSS still picks them up. */

/* h1 wraps the page title for screen-reader heading semantics. Reset
   default h1 margin so the existing table-based layout doesn't pick up
   extra vertical spacing. .bca-title is used on WebCallMeBack and
   Thanks; .bca-page-title on the appointment pages. */
.bca-title { margin: 0; }
h1.bca-page-title
{
    margin: 0;
    font-weight: normal;
    font-size: 14pt;
    color: maroon;
    font-family: Arial;
}

/* Day-of-week grid on AppointmentRequest — 7 weekday columns × 2
   morning/afternoon rows. Boxes themselves stay near native size
   (14×14, ~Chrome default). The header row sets each column to 30px
   via inline width, so adjacent checkbox centres in a row are 30px
   apart (column-driven, not margin-driven). 5px vertical margin
   pushes the centres of Morning↔Afternoon rows to ~26px apart, both
   distances above the 24px WCAG 2.5.8 AA spacing-exception threshold. */
#tableDayOfWeek input[type="checkbox"]
{
    width: 14px;
    height: 14px;
    margin: 5px;
    cursor: pointer;
}

/* Centre the checkbox under its day-of-week column header. Header
   cells carry .bca-text-label; checkbox cells don't, so the :not()
   selector skips the labels. */
#tableDayOfWeek td:not(.bca-text-label) { text-align: center; }

/* Physician-office radios on AppointmentSetting / AppointmentRequest /
   AppointmentRequest2 sit in cells with several lines of office-name /
   address / phone / fax text. Horizontal spacing (full address block,
   ~150px) and vertical spacing (~5-6 lines per cell, ~70-80px) put
   adjacent radio centres well over 44px apart, so AAA 2.5.5 is met
   via the spacing exception with near-native 14×14 boxes. */
#radiobuttonlistPhysicianOffice input[type="radio"]
{
    width: 14px;
    height: 14px;
    margin: 3px;
    cursor: pointer;
}

/* Pure red (#FF0000) on white is ~4.0:1, below AA's 4.5:1 minimum and
   AAA's 7:1 enhanced threshold. #990000 lands at ~8.6:1 — clears AAA
   with margin while still reading as a distinct red. */
.bca-text-error { color: #990000; }
.bca-text-error-small { color: #990000; }

/* WCAG 2.5.5 / 2.5.8 target size — 28px tall keeps every .bca-selectlist
   above the 24×24 minimum even when AutoPostBack adds an onchange that
   makes axe treat the select as an explicit author target. The two
   dropdowns whose neighbours previously sat too close for AAA 2.5.5
   (Reason For Visit, "If the doctor isn't available") carry an inline
   style="margin: 10px 0" in markup so the fix lands regardless of
   which stylesheet renders. */
.bca-selectlist
{
    height: 28px;
    padding: 2px 4px;
}

/* Match single-line textboxes to the 28px total height of
   .bca-selectlist so dropdowns and inputs in the same form row align
   visually. Scoped to <input> only — TextMode="MultiLine" renders as
   <textarea>, which would otherwise be crushed to 28px and lose its
   Rows attribute. box-sizing: border-box matches Chrome's UA default
   for <select>; without it the input's 28px would be content-only,
   producing a 28 + padding + border ≈ 36px visible box (taller than
   the dropdowns). */
input.bca-textbox
{
    height: 28px;
    padding: 2px 4px;
    box-sizing: border-box;
}

/* The appointment pages render the phone fields as a 4-cell inner
   table — `(<area>)`, `<prefix>-`, `<suffix>`, and `Ext:<ext>` plus
   any visible validators — and each cell auto-sizes to its content.
   The 28px-tall input.bca-textbox above renders ~9px wider than the
   browser default for size="3", which is enough to push the closing
   paren / hyphen past the cell's natural width and wrap them onto a
   second visual line whenever a validator becomes visible in the
   adjacent cell. nowrap on the phone-segment cells keeps each
   "<text><input><text>" group on one line — cells still auto-size,
   they just refuse to break their short contents. */
#tablePrimaryPhone td,
#tableSecondaryPhone td,
#tableContactPrimaryPhoneNumber td,
#tableContactSecondaryPhoneNumber td
{
    white-space: nowrap;
}

/* #616161 lands at 6.19:1 on white — passes AA but fails AAA's 7:1
   enhanced-contrast threshold. #555555 hits ~7.7:1 (clears AAA). The
   line-height ≥ 1.5 satisfies WCAG 1.4.8 AAA Visual Presentation for
   the "information requested below..." paragraph that inherits from
   this class on the appointment pages. */
.bca-text-small
{
    color: #555555;
    line-height: 1.5;
}
