/* ==========================================================================
   Hallman Sound and Lighting — Brand Theme
   Palette: https://coolors.co/palette/fffcf2-ccc5b9-403d39-252422-eb5e28
   -  #fffcf2  brand-cream   (background / light)
   -  #ccc5b9  brand-tan     (borders / muted)
   -  #403d39  brand-slate   (secondary text / panels)
   -  #252422  brand-dark    (headers / footer / body text)
   -  #eb5e28  brand-orange  (accent / calls to action)
   ========================================================================== */

:root {
  --brand-cream: #fffcf2;
  --brand-tan: #ccc5b9;
  --brand-slate: #403d39;
  --brand-dark: #252422;
  --brand-orange: #eb5e28;

  /* Re-map core Bootstrap theme variables to the brand palette */
  --bs-primary: var(--brand-orange);
  --bs-primary-rgb: 235, 94, 40;
  --bs-secondary: var(--brand-slate);
  --bs-secondary-rgb: 64, 61, 57;
  --bs-dark: var(--brand-dark);
  --bs-dark-rgb: 37, 36, 34;
  --bs-light: var(--brand-cream);
  --bs-light-rgb: 255, 252, 242;
  --bs-body-bg: var(--brand-cream);
  --bs-body-color: var(--brand-dark);
  --bs-border-color: var(--brand-tan);
  --bs-link-color: var(--brand-orange);
  --bs-link-hover-color: var(--brand-dark);
}

body {
  background-color: var(--brand-cream);
  color: var(--brand-dark);
}

/* Brand background / text utility classes (supplement Bootstrap's own) */
.bg-brand-dark   { background-color: var(--brand-dark) !important; }
.bg-brand-slate  { background-color: var(--brand-slate) !important; }
.bg-brand-cream  { background-color: var(--brand-cream) !important; }
.bg-brand-tan    { background-color: var(--brand-tan) !important; }
.bg-brand-orange { background-color: var(--brand-orange) !important; }

.text-brand-dark   { color: var(--brand-dark) !important; }
.text-brand-cream  { color: var(--brand-cream) !important; }
.text-brand-tan    { color: var(--brand-tan) !important; }
.text-brand-orange { color: var(--brand-orange) !important; }

.border-brand-orange { border-color: var(--brand-orange) !important; }

/* Buttons using the brand accent color */
.btn-brand {
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
  color: var(--brand-cream);
}
.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--brand-cream);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar-brand img {
  height: 56px;
  width: auto;
}

/* The source logo artwork is dark (#231f20); this filter renders it in the
   brand cream tone so it reads clearly against the dark navbar/footer. */
.logo-on-dark {
  filter: brightness(0) saturate(100%) invert(97%) sepia(5%) saturate(700%) hue-rotate(1deg) brightness(103%);
}

.navbar .nav-link {
  color: var(--brand-cream);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  color: var(--brand-orange);
}

.navbar-toggler {
  border-color: var(--brand-tan);
}

/* ==========================================================================
   Gallery / Carousel
   ========================================================================== */
.hero-carousel .carousel-item img {
  width: 100%;
  object-fit: cover;
}

/* Square indicators instead of Bootstrap's default thin bars */
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background-color: var(--brand-cream);
  opacity: 0.6;
  border: none;
  margin: 0 6px;
}
.hero-carousel .carousel-indicators .active {
  background-color: var(--brand-orange);
  opacity: 1;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 8%;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  background-color: rgba(37, 36, 34, 0.55);
  border-radius: 50%;
  padding: 1.5rem;
  background-size: 50%, 50%;
}

/* bg-dark + bg-opacity-50 (Bootstrap 5.3 utilities) handle the
   semi-transparent tint behind the caption text, using the brand-dark
   color mapped to --bs-dark-rgb above. This just layers on a slight
   blur for extra legibility over busy/bright photo backgrounds. */
.hero-carousel .backdrop-blur {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.hero-carousel .carousel-caption {
  bottom: 2rem;
}

/* ==========================================================================
   Sortable / filterable data tables (see assets/js/data-table.js)
   ========================================================================== */
.data-table thead th.sortable-col {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.data-table thead th.sortable-col .sort-icon {
  margin-left: 0.4em;
  opacity: 0.5;
  font-weight: normal;
}
.data-table thead th.sortable-col.sorted-asc .sort-icon,
.data-table thead th.sortable-col.sorted-desc .sort-icon {
  opacity: 1;
  color: var(--brand-orange);
}
.data-table thead tr.data-table-filter-row th {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
.data-table tbody tr.totals-row {
  font-weight: 700;
  border-top: 2px solid var(--brand-orange);
}
.data-table tbody tr.totals-row td {
  background-color: rgba(235, 94, 40, 0.08);
}

/* ==========================================================================
   Peach Festival crew documents listing
   ========================================================================== */
.doc-icon-col {
  width: 3rem;
  flex-shrink: 0;
}
.doc-ext-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-top: 0.15rem;
}

/* Document viewer (/peachfestival/view.php). Rather than relying on a
   flex-grow chain through several ancestors (main -> section ->
   container -> panel) to implicitly produce a height for this panel --
   which large images kept overflowing, since flex items don't reliably
   shrink below their content's intrinsic size across that many levels
   -- the panel gets an explicit height via calc(), leaving room for
   the navbar, breadcrumb, title/button row, and footer around it.
   Percentage heights on the embedded content then resolve against a
   real, definite number instead of an implicit flex-computed one. */
.doc-viewer {
  background-color: #ffffff;
  border: 1px solid var(--brand-tan);
  height: calc(100vh - 430px);
  min-height: 400px;
}
.doc-viewer .doc-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.doc-viewer .doc-embed-media {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Image zoom (peachfestival-view.twig + assets/js/image-zoom.js) */
.doc-image-toolbar {
  flex-shrink: 0;
}
.doc-image-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Flex align-items/justify-content centering clips part of the
   scrollable range once content overflows (a well-known flexbox
   behavior) -- so once actually zoomed in, drop back to plain block
   layout, which scrolls its full range with no such limit.
   text-align:center still centers the image on dimensions where it's
   narrower than the panel, without that limitation. */
.doc-image-scroll.is-zoomed {
  display: block;
  text-align: center;
}
.doc-zoomable-img {
  cursor: zoom-in;
  user-select: none;
}
.doc-zoomable-img.zoomed {
  max-width: none;
  max-height: none;
  cursor: grab;
}
.doc-zoomable-img.zoomed.dragging {
  cursor: grabbing;
}

/* ==========================================================================
   Footer / Masthead
   ========================================================================== */
.site-footer {
  background-color: var(--brand-dark);
  color: var(--brand-cream);
}
.site-footer a {
  color: var(--brand-cream);
  text-decoration: none;
}
.site-footer a:hover,
.site-footer a:focus {
  color: var(--brand-orange);
}
.site-footer .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--brand-tan);
  margin-left: 0.5rem;
  font-size: 1.1rem;
}
.site-footer .social-icons a:hover {
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
  color: var(--brand-dark);
}
