/* ============================================================
   Sho-Bud Music — catalog stylesheet (dark theme)
   Black page, white search card, #d2042d accent, Jost display font.
   No graphics except the logos. Drop-in replacement for search.css.
   ============================================================ */

:root {
  --sb-black:      #000000;
  --sb-red:        #d2042d;   /* brand accent */
  --sb-red-dark:   #a80325;   /* hover/active */
  --sb-text:       #e8e8e8;   /* light text on the black page */
  --sb-muted:      #8c8c8c;   /* muted text on black */
  --sb-card:       #ffffff;   /* white search card */
  --sb-ink:        #18181b;   /* dark text inside the white card */
  --sb-card-muted: #74747a;   /* labels inside the card */
  --sb-line:       #e1e1e3;   /* field borders */
  --sb-line-soft:  #ededed;   /* table row dividers */
  --sb-field:      #f6f6f5;   /* input fill */
  --sb-zebra:      #faf9f8;   /* alternating result row */
  --sb-display:    'Jost', Arial, Helvetica, sans-serif;
}

/* ---------- Global frame ---------- */
body {
  background-color: var(--sb-black);
  margin: 0 0 20px;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--sb-text);
  font-size: 14px;
}

img { border: none; }

a, a:link, a:visited, a:active { color: var(--sb-red); text-decoration: none; }
a:hover { color: var(--sb-red); text-decoration: underline; }

#content {
  background: var(--sb-black);
  max-width: 1024px;
  margin: 0 auto;
  padding: 38px 20px 44px;
}

/* Search landing keeps its logo + card grouped and centered so the two
   columns don't drift to the edges on the full-width page. */
.search-layout { max-width: 860px; margin: 0 auto; }

#gradient-bar { background: #333333; height: 1px; }   /* thin grey footer divider (was red) */

#footer {
  background: var(--sb-black);
  color: var(--sb-muted);
  text-align: center;
  padding: 16px 0;
  height: auto;
  font-size: 12px;
}

/* ---------- Header / nav bar ---------- */
#topbar { padding: 22px 0 18px; }   /* no red line */
#header-inner { max-width: 1024px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; min-height: 96px; }
#nav { margin-left: auto; }   /* tabs always pushed to the right */
.header-logo { display: inline-flex; }
.header-logo img { display: block; height: 96px; width: auto; }
.nav-tab {
  display: inline-block;
  margin-left: 24px;
  font-family: var(--sb-display);
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 4px;
}
/* Keep tabs white (beats the global a:link red rule) */
a.nav-tab, a.nav-tab:link, a.nav-tab:visited,
a.nav-tab:hover, a.nav-tab:active { color: #ffffff; text-decoration: none; }

/* Red underline follows the active page.
   Search/Results show it on SEARCH by default; the Contact page adds
   a <span class="tab-contact-active"> marker to move it to CONTACT. */
body:not(:has(.tab-contact-active)) .nav-search { border-bottom: 2px solid var(--sb-red); }
body:has(.tab-contact-active) .nav-contact { border-bottom: 2px solid var(--sb-red); }

/* ============================================================
   SEARCH PAGE
   ============================================================ */

/* Logo column (left), on the black page */
.logo-col { text-align: center; }
.site-logo { display: block; width: 260px; height: auto; max-width: 100%; margin: 0 auto 16px; }
.tagline {
  font-family: var(--sb-display);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--sb-text);
  font-size: 15px;
  line-height: 1.9;
  margin: 0 0 22px;
}
.script-logo { display: inline-block; width: 150px; height: auto; max-width: 100%; margin: 0 0 8px; }
.logo-col .link { font-size: 11px; color: var(--sb-red); text-decoration: underline; }

/* White search card (was the silver search-box.gif) */
.search-box {
  background: var(--sb-card);
  border-radius: 14px;
  width: auto;
  height: auto;
  text-align: left;
  padding: 0 0 18px;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.08);
}
.search-title {
  font-family: var(--sb-display);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--sb-red);
  font-weight: 500;
  text-transform: uppercase;
  padding: 18px 20px 0;
}

.search-table { width: 100%; color: var(--sb-card-muted); font-weight: 400; }
.search-table td {
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--sb-card-muted);
}
.search-table select,
.search-table input[type="text"],
.search-table textarea {
  width: 100%;
  border: 1px solid var(--sb-line);
  background: var(--sb-field);
  border-radius: 8px;
  padding: 0 10px;
  margin: 0 0 4px;
  font-size: 13px;
  color: #3f3f44;
  box-sizing: border-box;
}
.search-table select,
.search-table input[type="text"] { height: 36px; }
.search-table textarea { padding: 8px 10px; line-height: 1.5; resize: vertical; font-family: Arial, Helvetica, sans-serif; }
.search-table select:focus,
.search-table input[type="text"]:focus,
.search-table textarea:focus {
  outline: none;
  border-color: var(--sb-red);
  box-shadow: 0 0 0 2px rgba(210, 4, 45, 0.15);
}

/* ---------- Buttons (matched casing) ---------- */
.btn-search,
.btn-reset,
.btn-again {
  display: inline-block;
  font-family: var(--sb-display);
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-search { background: var(--sb-red); color: #ffffff; border: none; }
.btn-search:hover { background: var(--sb-red-dark); color: #fff; text-decoration: none; }

.btn-reset,
.btn-again {
  background: #ffffff;
  color: #3f3f44;
  border: 1px solid #d9d9dc;
}
.btn-reset:hover,
.btn-again:hover { background: #f3f3f2; color: #3f3f44; text-decoration: none; }

/* Anchor-based buttons need explicit colors to beat the global a:link rule */
a.btn-listen, a.btn-listen:link, a.btn-listen:visited,
a.btn-listen:hover, a.btn-listen:active { color: #ffffff; }
a.btn-reset, a.btn-reset:link, a.btn-reset:visited, a.btn-reset:hover, a.btn-reset:active,
a.btn-again, a.btn-again:link, a.btn-again:visited, a.btn-again:hover, a.btn-again:active { color: #3f3f44; }

/* ============================================================
   RESULTS PAGE
   White table-card so the data stays readable on the black page.
   ============================================================ */
table.results {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
}
.search-header th {
  background: var(--sb-black);
  color: #ffffff;
  text-align: left;
  font-family: var(--sb-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.6px;
  padding: 11px 12px;
  border: none;
}
.search-line td {
  font-family: var(--sb-display);
  font-size: 13px;
  color: #3f3f44;
  text-align: left;
  padding: 11px 12px;
  border: none;
  border-bottom: 1px solid var(--sb-line-soft);
}
table.results tr.search-line:nth-child(even) td { background: var(--sb-zebra); }
.search-line td:first-child { color: var(--sb-ink); font-weight: bold; }

.btn-listen {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sb-display);
  background: var(--sb-red);
  color: #ffffff;
  border-radius: 6px;
  padding: 6px 13px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
}
.btn-listen:hover { background: var(--sb-red-dark); color: #fff; text-decoration: none; }

.no-results {
  color: var(--sb-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: bold;
  padding: 16px 0;
}

/* ============================================================
   CONTACT PAGE — left column info text
   ============================================================ */
.contact-info { color: var(--sb-text); line-height: 1.6; font-size: 15px; font-family: var(--sb-display); }
.contact-info strong {
  display: block;
  font-family: var(--sb-display);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--sb-red);
  font-size: 13px;
  margin: 16px 0 6px;
}
.contact-info small { font-size: 15px; color: var(--sb-text); }
.contact-info a { color: var(--sb-red); display: inline-block; padding: 4px 0; }

/* Page header (e.g. CONTACT) — larger, all caps, space below */
.page-title {
  font-family: var(--sb-display);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 28px;
}

/* Search/Reset button row spacing */
.btn-row { padding-top: 14px; }
.btn-row .btn-search { margin: 0 10px 8px 0; }
.btn-row .btn-reset { margin: 0 0 8px 0; }

/* "Sho-Bud" script + link, centered below the search box */
.below-search { text-align: center; margin-top: 32px; }
.below-search .script-logo { margin-bottom: 6px; }

/* Sho-Bud credit sits in the left column on desktop, below the form on mobile.
   Two copies in the markup; we show whichever suits the layout. */
.credit-mobile { display: none; }

/* Results page heading ("SEARCH RESULTS" / "Song Matches") */
.results-heading {
  font-family: var(--sb-display);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  font-size: 15px;
  color: #ffffff;
}

/* ============================================================
   MOBILE / RESPONSIVE  (stacks the layout below ~860px)
   ============================================================ */
@media (max-width: 860px) {

  /* Header: smaller logo, tighter tabs */
  #header-inner { min-height: 76px; }
  .header-logo img { height: 72px; }
  #topbar { padding: 16px 0; }
  .nav-tab { margin-left: 16px; font-size: 12px; letter-spacing: 1px; }

  /* Stack the two-column page layouts (logo/info over the form) */
  .layout-table { width: 100% !important; }
  .layout-table > tbody > tr > td {
    display: block;
    width: 100% !important;
    padding-right: 0 !important;
    text-align: left !important;
  }
  .logo-col, .contact-info, .form-col { width: auto !important; max-width: 100%; }
  .logo-col { margin: 0 auto 12px; }
  .site-logo { width: 150px; margin: -6px auto 2px; }
  #content { padding-top: 8px; }
  .credit-desktop { display: none; }   /* left-column copy: desktop only */
  .credit-mobile { display: block; }   /* below-form copy: mobile only */
  .contact-info, .contact-info small { font-size: 16px; }
  .contact-info a { padding: 8px 0; }

  /* ---- Results table -> stacked cards (keeps Listen visible) ---- */
  table.results { width: 100% !important; background: transparent; }
  tr.search-header { display: none; }                 /* hide the column header row */
  table.results tr.search-line {
    display: block;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 12px;
  }
  table.results tr.search-line td,
  table.results tr.search-line:nth-child(even) td {
    display: block;
    background: #ffffff;
    border: none;
    border-bottom: 1px solid var(--sb-line-soft);
    padding: 9px 16px;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  table.results tr.search-line td:last-child { border-bottom: none; }

  /* Field labels per row, since the grid cells have no header on a card */
  .search-line td:before {
    display: block;
    font-family: var(--sb-display);
    font-size: 10px;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--sb-card-muted);
    margin-bottom: 3px;
  }
  .search-line td:nth-of-type(1):before { content: "Song title"; }
  .search-line td:nth-of-type(2):before { content: "Genre"; }
  .search-line td:nth-of-type(3):before { content: "Style(s)"; }
  .search-line td:nth-of-type(4):before { content: "Tempo"; }
  .search-line td:nth-of-type(5):before { content: "Vocals"; }
  .search-line td:nth-of-type(6):before { content: "À la"; }
  .search-line td:nth-of-type(7):before { content: ""; display: none; }

  /* Listen: full-width button at the bottom of each card */
  .search-line td:nth-of-type(7) { padding-top: 12px; }
  .search-line .btn-listen { display: block; text-align: center; padding: 11px; }
}
