/* Bull Ring browser shell additions on top of app-hkjc.css (legacy compiled theme).
   HKJC palette: mine-shaft-900 #022169 (navy), br-yellow-500 #FECF13 (gold). */

:root {
  --br-navy: #022169;
  --br-navy-deep: #011444;
  --br-gold: #fecf13;
  --br-gold-dark: #935f09;
  --br-ink: #354368;
  --br-focus: #fecf13;
  --br-error: #b42318;
  --br-success: #146c2e;
}

/* HKJC theme corrections from commit 1173d03 (component rules the compiled CSS predates). */
.gold {
  background: linear-gradient(90deg, #e0a800 0%, #fecf13 20%, #e0a800 39%, #fff8c2 50%, #e0a800 60%, #fecf13 80%, #e0a800 100%) 0 / 200%;
  -webkit-background-clip: text;
  background-clip: text;
}
.br-button-std, .br-button-sm { color: var(--br-navy); background-color: var(--br-gold); }
.br-button-sm {
  display: inline-flex; align-items: center; padding: .375rem .75rem; border-radius: .375rem;
  font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.br-button-sm:hover, .br-button-std:hover { background-color: #fed926; }
.text-content a { color: var(--br-navy); text-decoration: underline; text-underline-offset: 2px; }
.text-content a:hover { color: var(--br-gold-dark); }

/* Skip link and visible focus (WCAG 2.4.1, 2.4.7, 2.4.11). */
.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 50; padding: .75rem 1rem;
  background: var(--br-gold); color: var(--br-navy); font-weight: 600; border-radius: .375rem;
}
.skip-link:focus { top: .5rem; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible, iframe:focus-visible {
  outline: 3px solid var(--br-focus); outline-offset: 2px; box-shadow: 0 0 0 5px var(--br-navy);
}
main:focus { outline: none; }

/* Header / navigation. Without JS the menu is always visible and wraps. */
.site-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .75rem; padding-bottom: .75rem; }
.site-nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex: 1 1 auto; }
.site-brand { text-decoration: none; }
.site-menu { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.site-menu-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-menu-link { text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-menu-link[aria-current="page"] { border-bottom-color: var(--br-gold); font-weight: 600; }
.site-menu-form { margin: 0; }
@media (max-width: 47.99rem) {
  .js-nav .site-menu { display: none; width: 100%; flex-direction: column; align-items: flex-start; }
  .js-nav .site-menu.site-menu-open { display: flex; }
  .js-nav .site-menu-links { flex-direction: column; }
}

.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Status, receipts, notices, error summaries. */
.status-region:empty { display: none; }
.notice { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: .375rem; background: #fff; color: var(--br-ink); border-left: 4px solid var(--br-navy); }
.notice-success { border-left-color: var(--br-success); }
.notice-error { border-left-color: var(--br-error); }
.notice-info { border-left-color: var(--br-gold); }
.receipt { margin: 1rem 0; padding: .75rem 1rem; border-radius: .375rem; background: #fff; color: var(--br-ink); border-left: 4px solid var(--br-navy); }
.receipt-accepted { border-left-color: var(--br-success); }
.receipt-rejected, .receipt-denied { border-left-color: var(--br-error); }
.receipt-pending { border-left-color: var(--br-gold); }
.error-summary { margin: 0 0 1.5rem; padding: 1rem; border: 3px solid var(--br-error); background: #fff; color: var(--br-ink); border-radius: .375rem; }
.error-summary a { color: var(--br-error); text-decoration: underline; }
.form-field { margin-bottom: 1rem; }
.form-label { display: block; font-weight: 600; margin-bottom: .25rem; }
.form-hint { margin: 0 0 .25rem; font-size: .875rem; }
.form-error { margin: 0 0 .25rem; color: var(--br-error); font-weight: 600; }
.form-input { width: 100%; max-width: 32rem; padding: .5rem .75rem; border: 2px solid #5c6b90; border-radius: .375rem; color: var(--br-navy); background: #fff; }
.form-field-error .form-input { border-color: var(--br-error); }

/* Cards and panels. */
.sign-in-card { max-width: 32rem; margin: 2rem auto; display: flex; flex-direction: column; gap: 1.5rem; align-items: stretch; }
.sign-in-form { display: flex; justify-content: center; }
.panel { margin-top: 1rem; padding: 1rem; }
.panel-title { font-size: 1.25rem; font-weight: 600; margin-bottom: .5rem; }
.empty-state { max-width: 56rem; margin: 2rem auto; padding: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.empty-state-logo { width: 10rem; height: 10rem; }
.error-card { max-width: 36rem; margin: 3rem auto; padding: 2rem; display: flex; flex-direction: column; gap: 1rem; text-align: center; }
.sale-list, .howto-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 1rem; }
/* Reflow at 320px (WCAG 1.4.10): long unbroken values (emails, slugs, ids, URLs) wrap inside
   main content and page titles (the hero h1 sits outside main) and never widen the page;
   definition-list columns may shrink below max-content. */
main, h1 { overflow-wrap: anywhere; }
.details-list { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: .25rem 1rem; margin: .5rem 0; }
.details-list dt { font-weight: 600; }
.details-list dd { margin: 0; }
.lot-description { margin-top: .75rem; }
.contacts-heading { margin: 2rem 0 1rem; }
.contact-card p { margin: 0 0 .25rem; }
.lodged-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.lodged-mark { display: inline-block; width: 1.25rem; font-weight: 700; }
[data-lodged="true"] .lodged-mark { color: var(--br-success); }
.increments { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.increments th, .increments td { text-align: left; padding: .375rem .5rem; border-bottom: 1px solid #d0d7e6; }
.tags { font-size: .875rem; }

/* Lot and tab navigation: wraps/scrolls natively; arrow buttons only appear with JS. */
.lot-nav-list, .tab-nav-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.lot-nav { margin-bottom: .75rem; }
.tab-nav { position: relative; }
.tab-nav-scroll { overflow-x: auto; }
.tab-nav-list { flex-wrap: nowrap; padding: .5rem; }
.tab-nav-list .nav-item, .lot-nav-list .nav-item { white-space: nowrap; text-decoration: none; color: inherit; }
.nav-item-current, .nav-item[aria-current="page"] { background-color: var(--br-gold); color: var(--br-navy); box-shadow: 0 4px 6px -1px #0000001a; }
.tab-scroll { position: absolute; top: 0; bottom: 0; z-index: 1; padding: 0 .75rem; background: #354368; color: #fff; border: 0; cursor: pointer; }
.tab-scroll-left { left: 0; }
.tab-scroll-right { right: 0; }
@media (max-width: 47.99rem) { .tab-nav-list { flex-wrap: wrap; } .tab-scroll { display: none; } }

/* Sanitized content safety net and media. */
.text-content img { max-width: 100%; height: auto; }
.text-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.text-content th, .text-content td { border: 1px solid #d0d7e6; padding: .375rem .5rem; text-align: left; }
.media-unavailable, .content-unavailable { display: inline-block; padding: .5rem .75rem; background: #e8ecf4; color: var(--br-ink); border-radius: .25rem; font-style: italic; }
.gallery { list-style: none; padding: 0; margin: 1rem 0 0; }
.gallery-link { display: block; }
.gallery img { width: 100%; height: auto; }
.pdf-frame { display: none; width: 100%; height: 62rem; border: 0; background: #fff; }
@media (min-width: 48rem) { .pdf-frame { display: block; } .pdf-mobile-note { display: none; } }
.lightbox, .br-dialog { max-width: min(96vw, 80rem); width: 100%; padding: 1rem; border: 0; border-radius: .5rem; background: #fff; color: var(--br-ink); }
.lightbox::backdrop, .br-dialog::backdrop { background: rgb(1 20 68 / .85); }
.lightbox-image { max-width: 100%; max-height: 75vh; margin: 0 auto; display: block; }
.lightbox-controls { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .75rem; }

/* FAQs as native disclosure widgets (keyboard operable without JS). */
.faq-group + .faq-group { margin-top: 2rem; }
.faq { margin-bottom: 1rem; padding: 1rem 1.5rem; }
.faq-question { cursor: pointer; }
.faq-answer { padding-top: 1rem; }

/* Reduced motion (WCAG 2.3.3): stop the gold shimmer and smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .gold { animation: none; }
}

/* Structural hooks used by templates and shell.js. */
.nav-container { position: relative; }
.site-nav-toggle { margin-left: auto; }
.lot-sidebar { margin-top: 1rem; }
.side_bar_item ul { margin-left: 1rem; list-style: disc inside; }
.side_bar_item ol { margin-left: 1rem; list-style: decimal inside; }
.pdf-viewer { margin-top: 1rem; }
.pdf-download { margin: 0; }
.br-dialog-body { margin: 1rem 0; }
.lightbox-frame { display: flex; flex-direction: column; gap: .5rem; }
.lightbox-caption { text-align: center; margin: 0; }
@media (min-width: 48rem) { .site-nav-toggle { display: none; } }
.text-content ul.gallery { list-style: none; margin-left: 0; }
.text-content a:not([href]) { color: inherit; text-decoration: none; }
