@media only screen and (max-width: 600px) {
  .w-96-custom {
    width: 384px !important;
  }

  .flex-wrap-custom {
    flex-wrap: wrap;
    width: 100% !important;
  }
}

@media only screen and (min-width: 600px) and (max-width: 768px) {
  .custom-height {
    height: 5rem !important;
  }
}

@media only screen and (max-width: 601px) {
  .custom-height {
    height: 10rem !important;
  }
}

@media print {
  body {
    margin: 20px;
  }
}

.disabled-link {
  pointer-events: none !important;
}

/* Global muted text standardization: map all .text-muted to Tailwind gray-500 */

.text-muted {
  color: #6B7280 !important; /* Tailwind text-gray-500 */
}

/* Hearings: Card layout for each hearing item */

.hearing-card {
  border: 1px solid rgba(0,0,0,0.08);
  border-left: 6px solid #a93226; /* default: Appropriations red */
  border-radius: 10px;
  background: #fff;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem; /* consistent spacing between cards */
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Committee-specific accents removed: unify to mirs-red (#a93226) for all hearings */

/* Ensure list markers/borders from parent don't interfere with cards */

li.hearing-list-item { list-style: none;
}

/* Hearing header layout */

.hearing-header {
  display: flex;
  gap: 0.75rem; /* 12px */
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.5rem; /* small space below header */
}

/* Subtle separators between header items on wider screens */

.hearing-header > span:not(:first-child) {
  padding-left: 0.75rem;
  margin-left: 0.125rem;
  border-left: 1px solid #e5e7eb; /* Tailwind gray-200 */
}

/* Time tag styling */

.hearing-time {
  background: #e6f2ff; /* light blue */
  color: #1f4b99;      /* readable blue text */
  padding: 0.125rem 0.5rem; /* 2px 8px */
  border-radius: 9999px; /* pill */
  font-weight: 600;
  font-size: 0.85em;
}

/* Committee name emphasis */

.committee-name {
  font-weight: 600;
}

/* Room info muted */

.room {
  color: #666;
  font-size: 0.9em;
}

/* Status chip (reuse existing visual language) */

.hearing-status {
  background: #fee2e2; /* red-100 */
  color: #b91c1c;      /* red-700 */
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.85em;
}

.agenda-title {
  text-transform: uppercase;
  border-bottom: 2px solid #eee;
  font-weight: 600;
  margin: 0.25rem 0 0.5rem; /* reduced top spacing above AGENDA */
  color: #555;
}

.agenda-section { margin-top: 0.5rem;
}

.agenda-section p { margin: 0.25rem 0;
}

.agenda-section ul { margin: 0.25rem 0 0.5rem 1rem; padding-left: 1.25rem;
}

.agenda-section ul li { margin: 0.25rem 0;
}

/* Optional: simple accordion affordance if agendas include <details>/<summary> */

.agenda-section details { margin: 0.5rem 0;
}

.agenda-section summary { cursor: pointer; font-weight: 600;
}

/* Hearing actions (Step 5) */

.hearing-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem; /* 8px */
  margin-top: 0.75rem; /* 12px */
  flex-wrap: wrap;
}

.btn-watch, .btn-calendar {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.btn-watch { background: #f0f0f0; color: #111;
}

.btn-watch:hover { filter: brightness(0.98);
}

.btn-calendar { background: #eef1f4; color: #333; border: 1px solid #d9d9d9;
}

.btn-calendar:hover { background: #e6eaef; border-color: #cfd6dd;
}

.hearing-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
  margin-top: 0.75rem;
  padding: 0 0.5rem 0.25rem;
}

.tab {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px 6px 0 0;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab:hover {
  background: #f3f3f3;
}

.tab.active {
  position: relative;
  top: 1px;
  background: #fff;
  border: 1px solid #ddd;
  border-bottom: none;
  color: #a93226;
  font-weight: 600;
}

.hearing-content {
  background: #fff;
  padding: 1rem;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

/* Tabs bar background & spacing refinement */

.hearing-tabs {
  background: #fafafa;
  border-radius: 8px 8px 0 0;
  padding: 0.5rem 0.75rem;
}

/* Day separation visuals */

.day-block {
  background: #fdfdfd;
  border-top: 2px solid #eee;
  margin-bottom: 2rem;
  padding-top: 1rem;
}

.day-header h3 {
  background: #f9f9f9;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  color: #444;
}

/* Agenda readability */

.agenda-section p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #444;
}

/* Ensure headings inside agenda blocks are readable but not oversized, with consistent spacing */
.agenda-section h1,
.agenda-section h2,
.agenda-section h3,
.agenda-section h4,
.agenda-section h5,
.agenda-section h6 {
  margin: 0.5rem 0 0.25rem;
  line-height: 1.3;
  color: #333;
}

.agenda-section p strong {
  color: #333;
  font-weight: 600;
}

.agenda-section ul li {
  margin-bottom: 0.5rem;
}

/* Add to Calendar – smaller footprint */

.btn-calendar {
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
}

/* Minor typography tweaks */

h4.agenda-title {
  letter-spacing: 0.03em;
}

.hearing-header {
  font-size: 0.95rem;
}

.hearing-card p {
  font-size: 0.95rem;
  color: #444;
}

/* Soften headings within hearing cards */

.hearing-card h1,
.hearing-card h2,
.hearing-card h3,
.hearing-card h4,
.hearing-card h5,
.hearing-card h6 {
  color: #444;
}

/* Ensure Agenda title remains a touch lighter than headings for hierarchy */

.hearing-card .agenda-title { color: #555;
}

/* Emphasize bill links in agenda for scanability */

.agenda-section a,
.agenda-section p a,
.agenda-section a:link,
.agenda-section a:visited {
  font-weight: 700 !important;
}

/* --- Event Day Band: calendar day headers --- */

.event-day-section { position: relative;
}

/* Keep as utility-first via Tailwind for layout; here we only add cross‑page tweaks */

.event-day-content > li:first-child .hearing-card { margin-top: 0rem;
}

@media print {
  /* Make day bands ink-friendly in print */

  .event-day-band {
    background: transparent !important;
    box-shadow: none !important;
    border-top: 0 !important;
    border-bottom: 2px solid #e5e7eb !important; /* gray-200 */
  }

  /* Avoid hearing cards being split across pages */

  .hearing-card { -moz-column-break-inside: avoid; break-inside: avoid;
  }
}

/* Ensure buttons never wrap */

button,
a.button,
.button,
[role="button"],
a[type="button"],
a[type="submit"],
a[type="reset"],
input[type="button"],
input[type="submit"],
input[type="reset"],
a[class*="btn"],
[class*="btn-"],
.btn,
.btn-watch,
.btn-calendar,
.tab {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ensure Quote of the Day is always readable (neutralize inline colors) */

blockquote.quote-of-the-day {
  color: #111 !important;           /* base readable text */
}

blockquote.quote-of-the-day,
blockquote.quote-of-the-day * {
  color: inherit !important;        /* override inline color styles */
}

/* Keep the title line red */

blockquote.quote-of-the-day p:nth-child(1) > strong {
  color: #860711 !important;
}

/* Attribution line: fix invalid property and use a readable gray (backup if app.css not rebuilt) */

blockquote.quote-of-the-day p:nth-child(3) {
  color: #6b7280 !important;        /* Tailwind gray-500 */
  font-size: 0.7em;
  text-align: right;
  font-style: italic;
}

/* Dark mode: render quote as a white card with dark text for readability */

@media (prefers-color-scheme: dark) {
  blockquote.quote-of-the-day {
    background: #ffffff;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    color: #111 !important;      /* keep dark text on the white panel */
  }
}

/* Ensure calendar buttons render compactly and consistently across pages */

.btn-calendar {
  display: inline-flex !important;       /* override any a { display:block } rules */
  align-items: center;
  gap: 8px;                              /* space between icon and text */
  line-height: 1.25;                     /* tighten vertical rhythm */
  padding: 8px 12px !important;          /* compact, consistent */
  font-size: 0.95rem;                    /* slightly smaller for chip feel */
}

/* Normalize calendar icon sizing/alignment */

.btn-calendar svg {
  width: 18px !important;
  height: 18px !important;
  display: inline-block !important;
  flex-shrink: 0;
}

/* Stronger specificity to beat page-level anchor rules on hearings and other lists */

.hearing-actions .btn-calendar,
a.btn-calendar {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  line-height: 1.25;
  padding: 8px 12px !important;
}

/* Ultimate specificity fallback to ensure inline-flex for calendar buttons even if other rules use !important */

a.btn-calendar.btn-calendar,
.hearing-actions a.btn-calendar.btn-calendar {
  display: inline-flex !important;
}

/* Site-wide opt-out of browser auto-darkening */

:root { color-scheme: light;
}

/* Hard guard for users forcing dark via OS or extensions: keep light theme readable */

@media (prefers-color-scheme: dark) {
  html, body { background: #fff !important; color: #111 !important;
  }

  .prose, .prose * { color: inherit !important;
  }

  /* Preserve brand red for Capsule headlines and any .mirs-red text in dark mode */

  .prose h1.mirs-red,
  .prose h2.mirs-red,
  .prose h3.mirs-red,
  h1.mirs-red,
  h2.mirs-red,
  h3.mirs-red,
  .prose .text-mirs-red,
  .text-mirs-red,
  .prose .mirs-red,
  .mirs-red { color: #860711 !important;
  }
}

