/* ============================================================
   GIGBUILDER WEBTOOLS.CSS  –  MODERN VARIABLE-BASED REVISION
   ============================================================ */
:root {
  --gb-color: #fff2cc;
  --gb-background: #2b2525;
  --gb-header-color: #ffffff;
  --gb-header-background: #3333cc;
  --gb-element-color: #20124d;
  --gb-element-background: #fff2cc;
  --gb-button-color: #ffffff;
  --gb-button-background: #e06666;
  --gb-border-color: #f3f6f4;
  --gb-border-shadow: #bbbbbb;
  --gb-font: "Heebo", "Segoe UI", sans-serif;
  /* -----------------------------------------------------------
     CORE SYSTEM COLORS
  ----------------------------------------------------------- */
  --gb-bg: var(--gb-background);         /* main widget background */
  --gb-text: var(--gb-color);            /* primary text color */
  --gb-muted: #666666;                   /* fallback muted text */
  /* -----------------------------------------------------------
     FIELDS (input/select)
  ----------------------------------------------------------- */
  --gb-field-bg: var(--gb-element-background);
  --gb-field-text: var(--gb-element-color);
  --gb-field-border: var(--gb-border-color);
  /* -----------------------------------------------------------
     BUTTONS
  ----------------------------------------------------------- */
  --gb-btn-bg: var(--gb-button-background);
  --gb-btn-text: var(--gb-button-color);
  --gb-btn-bg-dark: var(--gb-accent-dark, #444);  /* optional darker shade */
  /* -----------------------------------------------------------
     HEADER BAR (Search Music Database)
  ----------------------------------------------------------- */
  --gb-header-bg: var(--gb-header-background);
  --gb-header-text: var(--gb-header-color);
  /* -----------------------------------------------------------
     ACCENTS (used for outlines, focus rings)
  ----------------------------------------------------------- */
  --gb-accent: var(--gb-header-background);
  --gb-accent-dark: var(--gb-accent-dark, #2929a0);
  --gb-accent-light: var(--gb-accent-light, #2986cc);
  /* -----------------------------------------------------------
     BORDER + SHADOW
  ----------------------------------------------------------- */
  --gb-border: var(--gb-border-color);
  --gb-border-shadow: var(--gb-border-shadow);
  --gb-radius: 10px;
  --gb-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  /* -----------------------------------------------------------
     SPECIAL COLORS (Chat)
  ----------------------------------------------------------- */
  --gb-chat-bg: #2b2525;
  --gb-client: #a53d38;
  --gb-admin: #0b93f6;
  /* -----------------------------------------------------------
     FONTS
  ----------------------------------------------------------- */
  --gb-font: "Heebo", "Segoe UI", sans-serif;
}
/* ============================================================
   POPUP MODAL
   ============================================================ */
smq-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 20000;
  display: block;
}
smq-popup .api-title { font-size: 24px; margin-top: -10px; }
smq-popup .api-content { margin-top: -10px; }
smq-popup .window {
  margin: 20px auto;
  width: 600px;
  min-height: 100px;
  background: var(--gb-bg);
  border-radius: var(--gb-radius);
  padding: 1em;
  box-shadow: var(--gb-shadow);
}
smq-popup .close {
  float: right;
  color: var(--gb-muted);
  font-size: 20px;
  cursor: pointer;
  font-family: sans-serif;
}
smq-popup img { width: 100%; }
@media (max-width: 768px) {
  smq-popup .window {
    width: 95%;
    margin-top: 10px;
  }
}
/* ============================================================
   IFRAME WRAPPER
   ============================================================ */
.gbWrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.gbWrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* ============================================================
   FORM CONTAINERS
   ============================================================ */
.gbContainer {
  border: 1px solid var(--gb-border);
  background: var(--gb-surface);
  border-radius: 5px;
  font-size: 1.1em;
  color: var(--gb-text);
  padding: 10px 20px 20px;
}
.gbContainer h4 { font-size: 1.5em; margin-top: 0; }
.gbContainer label {
  display: inline-block;
  padding: 12px 12px 12px 0;
  min-width: 200px;
}
.gbContainer input[type=text],
.gbContainer select,
.gbContainer textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #aaa;
  border-radius: 4px;
  box-sizing: border-box;
  resize: vertical;
  font-family: var(--gb-font);
}
.gbContainer input[type=submit] {
  background: var(--gb-accent);
  color: #fff;
  padding: 12px 20px;
  border: none;
  width: 90%;
  font-size: 1.2em;
  margin-top: 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.gbContainer input[type=submit]:hover {
  background: var(--gb-accent-dark);
}
.gbContainer .row::after {
  content: "";
  display: table;
  clear: both;
}
.gbContainer .col-25 { float: left; width: 22%; padding: 0.5%; }
.gbContainer .col-75 { float: left; width: 72%; padding: 0.5%; }
@media (max-width: 600px) {
  .gbContainer label,
  .gbContainer .col-25,
  .gbContainer .col-75,
  .gbContainer input[type=submit] {
    width: 100%;
    padding-top: 5px;
  }
}
/* ============================================================
   OVERLAY + BLOCKQUOTE
   ============================================================ */
.gbOverlay {
  position: absolute;
  z-index: 10000;
  inset: 0;
  display: none;
  width: 100vw;
  height: 100%;
  background: #efefef;
  color: var(--gb-text);
  overflow: visible;
  -webkit-overflow-scrolling: touch;
}
.gbOverlay iframe {
  width: 100%;
  height: 100vh;
  border: 0;
  overflow-y: auto;
}
blockquote {
  font-family: Georgia, serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.45;
  position: relative;
  color: #383838;
  margin: 0.25em 0;
  padding: 0.25em 40px;
}
blockquote:before {
  content: "“";
  font-size: 80px;
  position: absolute;
  left: -1px;
  top: -20px;
  color: #7a7a7a;
}
blockquote cite {
  color: #999;
  font-size: 14px;
  display: block;
  margin-top: 5px;
}
blockquote cite:before { content: "— "; }
/* ============================================================
   CHAT / SUPPORT POPUP
   ============================================================ */
.gbOpenBtn {
  background: var(--gb-chat-bg);
  color: var(--gb-contrast);
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  position: fixed;
  bottom: 23px;
  right: 28px;
  width: 48px;
  height: 48px;
  font-size: 28px;
  text-align: center;
  opacity: 0.8;
  z-index: 10000;
  box-shadow: 0 0 0 4px var(--gb-contrast);
}
.gbOpenBtn:hover { border-style: dashed; }
.gbChat-popup { display: none; position: fixed; z-index: 10010; bottom: 0; right: 15px; }
.gbChat-container {
  max-width: 350px;
  padding: 10px;
  color: var(--gb-contrast);
  background: var(--gb-chat-bg);
  border-radius: 10px 10px 0 0;
  box-shadow: inset 0 30px 60px -12px rgba(50,50,93,0.25),
              inset 0 18px 36px -18px rgba(0,0,0,0.3);
}
.gbChat-container h1 { font-size: 26px; margin: 0; }
.gbChat-container label { font-size: 13pt; }
.gbChat-container .info { font-size: 10pt; font-style: italic; margin: 5px 0 12px; }
.gbChat-container textarea,
.gbChat-container input {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 4px;
  background: var(--gb-contrast);
  color: #20124d;
  padding: 8px;
  margin: 4px 0 14px;
}
.gbChat-container textarea { min-height: 200px; resize: none; padding: 15px; }
.gbChat-container textarea:focus,
.gbChat-container input:focus { outline: 2px solid var(--gb-accent-light); }
.gbClientInfo { text-align: center; color: #20124d; font-style: italic; font-size: 11pt; }
.gbClient, .gbAdmin {
  position: relative;
  border-radius: 10px;
  margin: 8px 0;
  padding: 12px;
  color: #fff;
  max-width: 80%;
}
.gbClient { background: var(--gb-client); }
.gbClient:after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  border: 12px solid transparent;
  border-right-color: var(--gb-client);
  margin: -6px 0 0 -12px;
}
.gbAdmin {
  background: var(--gb-admin);
  float: right;
  max-width: 300px;
}
.gbAdmin:after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  border: 12px solid transparent;
  border-left-color: var(--gb-admin);
  margin: -6px -12px 0 0;
}
.newline { clear: both; }
.gbChat-container .btn {
  background: #04aa6d;
  color: #fff;
  font-weight: 700;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-bottom: 10px;
  border-radius: 6px;
  opacity: 0.92;
  transition: opacity 0.2s;
}
.gbChat-container .btn:hover { opacity: 1; }
.gbChat-container .cancel { background: red; }
.gbThread {
  padding: 12px;
  background: var(--gb-contrast);
  font-family: "Comic Sans MS", cursive;
  font-size: 10pt;
  height: 500px;
  width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}
.gbQdiv { margin-top: 5px; }
.gbQ { width: 400px; font-family: "Comic Sans MS"; font-size: 10pt; color: #0033cc; }
/* ============================================================
   FORMS + TABLES + MISC
   ============================================================ */
.gbSubmit {
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),
              0 1px 2px rgba(0,0,0,0.08);
  background: var(--gb-accent);
  color: var(--gb-accent-light);
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  width: 200px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.075);
  padding: 8px 16px;
  transition: background 0.1s linear;
}
.gbSubmit:hover { background: var(--gb-accent-dark); }
.tableDiv { background: var(--gb-chat-bg); color: var(--gb-contrast); margin: 10px 0; }
.tableDiv td { width: 50%; vertical-align: top; }
/* ===============================
   GIGBUILDER JUKEBOX POLISH PATCH
   =============================== */
/* Tighter top controls */
.gb-field-group {
  display: grid;
  grid-template-columns:
    minmax(150px, 200px)
    minmax(200px, 1fr)
    minmax(160px, 200px);
  gap: .45rem;
  align-items: center;
  margin-top: .25rem;
  margin-bottom: .25rem;
}
/* Inputs & selects reduce padding & radius */
.gbJukeboxUI select,
.gbJukeboxUI input[type="text"] {
  padding: .48em .75em;
  font-size: .95rem;
  border-radius: calc(var(--gb-radius) - 3px);
}
/* Sleeker modern buttons */
.gb-btn {
  flex: 1 1 0;
  padding: .55em 1em;
  font-size: .92rem;
  font-weight: 600;
  color: var(--gb-btn-text);
  background: var(--gb-btn-bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition:
    background .15s ease,
    box-shadow .15s ease,
    transform .12s ease;
}
/* Button hover */
.gb-btn:hover {
  background: var(--gb-btn-bg-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.22);
}
/* Button pressed */
.gb-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.18);
}
/* Optional: tighter header */
.gbJukeboxHeader {
  padding: .85rem 1.5rem;
  font-size: 1.2rem;
}
/* ============================================================
   GIGBUILDER MUSIC RESULT TABLE — FIXED HEADER + REVERSED ROWS
   ============================================================ */
/* Table container */
#gbMusicResults table.musicTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: .75rem;
  background: var(--gb-bg);
  color: var(--gb-text);
  font-family: var(--gb-font);
  border: 1px solid var(--gb-border);
  border-radius: var(--gb-radius);
  overflow: hidden;
  font-size: .95rem;
}
/* Header now correctly uses CRM header colors */
#gbMusicResults table.musicTable thead th {
  background: var(--gb-header-background);   /* FIXED */
  color: var(--gb-header-color);             /* FIXED */
  text-align: left;
  padding: .65rem .75rem;
  font-weight: 600;
  border-bottom: 2px solid var(--gb-border);
  font-size: 1rem;
}
/* Footer */
#gbMusicResults table.musicTable tfoot td {
  background: var(--gb-bg);
  color: var(--gb-muted);
  font-style: italic;
  padding: .6rem .75rem;
  border-top: 1px solid var(--gb-border);
}
/* ----------------------------------------------
   REVERSED ROWS — LIGHT BASE, DARK STRIPES
---------------------------------------------- */
/* Base row = light yellow (use client's element background) */
#gbMusicResults table.musicTable tbody tr {
  cursor: pointer;
  background: var(--gb-element-background);   /* pale yellow */
  color: var(--gb-element-color);             /* dark purple text */
  transition: background .12s ease, color .12s ease;
}
/* Alternating row = dark theme background (GB background) */
#gbMusicResults table.musicTable tbody tr:nth-child(even) {
  background: var(--gb-background);           /* dark charcoal */
  color: var(--gb-color);                     /* light gold text */
}
/* Hover highlighting always uses accent-light */
#gbMusicResults table.musicTable tbody tr:hover {
  background: var(--gb-accent-light);
  color: #ffffff;
}
/* Cells */
#gbMusicResults table.musicTable td {
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--gb-border-color);
  font-size: .95rem;
}
/* Pressed / active effect */
#gbMusicResults table.musicTable tbody tr:active {
  background: var(--gb-accent);
  color: #ffffff !important;
}
/* Rounded corners for last row */
#gbMusicResults table.musicTable tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--gb-radius);
}
#gbMusicResults table.musicTable tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--gb-radius);
}
/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 500px) {
  body { margin: 0; padding: 2px; }
  .gb_roundThumb img { width: 300px !important; }
  .gbSubmit { padding: 0.5em; width: 100% !important; font-size: 1.5em; }
}
@media (max-width: 780px) {
  .gbform-fields label { text-align: left !important; }
}
