/* ==========================================================================
   Library homepage (www.law.uh.edu/libraries/) overrides, draft 2026-09-30.
   Brings the homepage in line with the LibApps restyle: compact header, static
   footer, A2 cards, dark mode, a visible focus ring. The homepage runs
   Bootstrap 5.3.3, so dark mode is Bootstrap's own [data-bs-theme="dark"] on
   <html>, set by theme.js (see index-changes.md).

   Load AFTER css/style.css and 2019homepage.css, e.g. as css/uhll-home.css:
     <link rel="stylesheet" href="css/uhll-home.css">
   Nothing here changes the homepage until someone who runs law.uh.edu adds it.
   Tested by DOM injection on the live page, light and dark (2026-09-30).
   ========================================================================== */

:root {
    --uhll-font: 'Source Sans 3', sans-serif;
    --uhll-bg: #ffffff;
    --uhll-surface: #ffffff;
    --uhll-band: #f3f3f3;
    --uhll-border: #c9c9c9;
    --uhll-input-border: #767676;
    --uhll-text: #212529;
    --uhll-muted: #54585a;
    --uhll-link: #000000;
    --uhll-link-hover: #c8102e;
    --uhll-rule: #c8102e;
    --uhll-focus: #000000;
    --uhll-focus-halo: #ffffff;
    --uhll-radius: .5rem;
}
:root[data-bs-theme="dark"] {
    color-scheme: dark;
    --uhll-bg: #141619;
    --uhll-surface: #1c1f24;
    --uhll-band: #262a30;
    --uhll-border: #3b4048;
    --uhll-text: #e8e8e8;
    --uhll-muted: #b4b8bc;
    --uhll-link: #f2f2f2;
    --uhll-link-hover: #ff8597;
    --uhll-rule: #e0314d;
    --uhll-focus: #ffffff;
    --uhll-focus-halo: #000000;
}

body {
    background-color: var(--uhll-bg);
    color: var(--uhll-text);
}

/* ---------- Header: same as LibGuides/LibAnswers (40px UH bar + ~92px red bar) ---------- */

/* UH bar is UH's; only keep the search icon's padding in line with the other
   items so the bar stays 40px if its icon font ever loads. */
.w3-container.w3-black .w3-padding-large {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}
nav.navbar.bg-primary-red {
    padding-top: .75rem;
    padding-bottom: .75rem;
}
.navbar-brand {
    padding: 0;
}
.navbar-brand img {
    max-height: 68px;   /* was 88px; same as the LibApps sites */
    width: auto;
}
.navbar .navbar-nav .nav-link {
    font-size: 1rem;
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}
.navbar .dropdown-menu {
    --bs-dropdown-bg: var(--uhll-surface);
    --bs-dropdown-border-color: var(--uhll-border);
}
.navbar .dropdown-item {
    color: var(--uhll-text);
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    color: var(--uhll-link-hover);
    background-color: var(--uhll-band);
}
/* light/dark toggle (last item in the red menu; see index-changes.md) */
.navbar .uhll-theme-toggle {
    background: none;
    border: 0;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    line-height: 1.5;
}
.navbar .uhll-theme-toggle .bi {
    font-size: 1.125rem;   /* as on LibGuides (bs5-style.css) */
}
@media (min-width: 992px) {
    .navbar .uhll-theme-toggle .uhll-theme-text { display: none; }
}
@media (max-width: 991.98px) {
    .navbar-brand img { max-height: 52px; }
    .img-responsive { width: auto; }   /* style.css shrinks the logo to 40% of its box */
}

/* ---------- Footer: scrolls with the page, sits at the bottom of short pages ---------- */

footer.fixed-bottom {
    position: static;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body > footer {
    margin-top: auto;
}
main {
    margin-bottom: 2rem;   /* style.css reserves 7rem for the old fixed footer */
}

/* ---------- Hero and search band ---------- */

/* 400px -> 300px so the search and the cards show on a laptop without scrolling */
main > .d-flex:first-of-type {
    max-height: 300px !important;
}
/* search tabs: keep white/red, drop the 1.1 scale that overlapped its neighbors */
.nav-tabs .nav-link.active {
    transform: none;
}
.nav-tabs .nav-link {
    font-weight: 600;
}
/* the search field: a real field edge and text size */
#primoQueryTemp {
    font-size: 1rem;
    padding: .5rem .75rem;
    border: 1px solid var(--uhll-input-border);
    border-radius: .375rem 0 0 .375rem;
    background: #fff;
    color: #212529;
}
#go {
    border-radius: 0 .375rem .375rem 0;
    font-weight: 600;
}
/* links on the black band: no underline (Rob, 2026-10-01); red-pink and
   underlined on hover */
.tab-pane a:not(.btn):hover {
    color: #ff8597;   /* style.css's #c8102e is 3.7:1 on black */
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Cards -> A2 (as LibGuides boxes) ---------- */

.card {
    background: var(--uhll-surface);
    color: var(--uhll-text);
    border: 1px solid var(--uhll-border);
    border-radius: var(--uhll-radius);
    overflow: hidden;
    text-align: left !important;   /* centered link lists are hard to scan */
}
.card.text-center,
.card .text-center {
    text-align: left !important;
}
.card-body {
    padding: 0;
}
.card-title {
    background: var(--uhll-band);
    color: var(--uhll-text);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    padding: .75rem 1.25rem .6rem;
    border-bottom: 3px solid var(--uhll-rule);
}
.card-title a {
    color: inherit;
    text-decoration: none;
}
.card-title a:hover {
    text-decoration: underline;
}
/* !important: the Today card's markup carries p-1 (4px, itself !important) */
.card-text,
.card-body > .d-flex,
.card-body > p {
    padding: 1rem 1.25rem 1.25rem !important;
    margin: 0;
    line-height: 1.6;
}
.card a {
    color: var(--uhll-link);
    text-decoration: none;   /* no underline at rest (Rob, 2026-10-01) */
}
.card a:hover {
    color: var(--uhll-link-hover);
    text-decoration: underline;
}
.card .card-text a {
    display: inline-block;
    padding: .2rem 0;   /* 24px+ targets */
}

/* hours table: style.css paints every cell lightgray */
.table > :not(caption) > * > * {
    background-color: transparent;
    color: var(--uhll-text);
}
.hours-today-row {
    border-bottom-color: var(--uhll-border);
}

/* LibCal events: the date chips (white box, pink month badge) are colors set
   in LibCal on purpose. Leave them alone, in both themes; they carry their
   own background, so they read on a dark card too. Only the row cells change:
   style.css paints every table cell lightgray, which would sit as gray bars
   inside the white card. */
.s-lc-w-dtr,
.s-lc-w-dtr > td,
.s-lc-w-table {
    background-color: transparent !important;
}
/* Dark only: LibCal's #333 title and #555 location text are 1.06:1 on the dark
   card. */
:root[data-bs-theme="dark"] .s-lc-w-title,
:root[data-bs-theme="dark"] .s-lc-w-title a {
    color: var(--uhll-text) !important;
}
:root[data-bs-theme="dark"] .s-lc-w-loc {
    color: var(--uhll-muted) !important;
}

/* ---------- Keyboard focus: same ring as LibApps ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--uhll-focus) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--uhll-focus-halo) !important;
}
/* on the red and black bars: white ring */
.navbar a:focus-visible,
.navbar button:focus-visible,
.w3-black a:focus-visible,
footer a:focus-visible,
.bg-tertiary-black a:focus-visible,
.bg-tertiary-black input:focus-visible,
.bg-tertiary-black .btn:focus-visible {
    outline-color: #fff !important;
    box-shadow: none !important;
}
/* ...but header dropdowns are the page surface again */
.navbar .dropdown-menu a:focus-visible {
    outline-color: var(--uhll-focus) !important;
    box-shadow: 0 0 0 5px var(--uhll-focus-halo) !important;
}
/* search tabs sit on the photo; the white ring is invisible on the white tabs */
.nav-tabs .nav-link:focus-visible {
    outline: 3px solid #000 !important;
    box-shadow: 0 0 0 5px #fff !important;
}
