/* BAR Coach - Creed of Champions */
/* All colours are explicit to avoid inheriting the site's light theme variables */

.coach-shell {
  max-width: 960px;
  margin: 0 auto;
}

/* ---- TABS ---- */
.coach-tabs {
  display: flex; gap: 1px; margin-bottom: 2rem;
  background: rgba(15,53,240,0.18);
  border: 1px solid rgba(15,53,240,0.32);
  border-radius: 6px; overflow: hidden;
}
.coach-tab {
  flex: 1; padding: 1rem 1.5rem;
  background: rgba(2,2,3,0.94);
  color: #8c8c8c;
  font-family: var(--font-heading); font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  border: none; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.coach-tab:hover { background: rgba(15,53,240,0.12); color: #fff; }
.coach-tab.active {
  background: rgba(15,53,240,0.30); color: #fff;
  box-shadow: inset 0 -2px 0 #0f35f0;
}
.coach-panel { display: none; }
.coach-panel.active { display: block; }

/* ---- FORM — ALL INPUTS USE EXPLICIT DARK BG + LIGHT TEXT ---- */
.coach-form-group { margin-bottom: 1.5rem; }
.coach-form-group label {
  display: block; font-family: var(--font-heading);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  color: #8c8c8c;
  margin-bottom: 0.5rem;
}

.coach-input {
  width: 100%; padding: 0.75rem 1rem;
  background: #1a1a1f;    /* explicit dark background */
  border: 1px solid rgba(15,53,240,0.4);
  border-radius: 4px;
  color: #d2d2d4;        /* explicit light text */
  font-family: var(--font-body); font-size: 1rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.coach-input:focus {
  border-color: #0f35f0;
  box-shadow: 0 0 12px rgba(15,53,240,0.25);
}
.coach-input::placeholder { color: rgba(180,180,180,0.5); }

select.coach-input {
  cursor: pointer; appearance: none;
  background-color: #1a1a1f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230f35f0' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center;
  background-size: 1.2rem; padding-right: 2.5rem;
  color: #d2d2d4;
}
select.coach-input option {
  background: #1a1a1f;  /* dark dropdown option */
  color: #d2d2d4;
}

/* ---- MAP SEARCH ---- */
.map-search-wrap { position: relative; }
.map-suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #12121a;
  border: 1px solid rgba(15,53,240,0.4);
  border-top: none; border-radius: 0 0 4px 4px;
  max-height: 300px; overflow-y: auto; z-index: 100;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.map-suggestions.open { display: block; }
.map-suggestion {
  padding: 0.65rem 1rem; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #d2d2d4; font-size: 0.9rem;
  transition: background 0.12s;
}
.map-suggestion:hover { background: rgba(15,53,240,0.2); color: #fff; }
.map-suggestion:last-child { border-bottom: none; }
.map-suggestion .map-name { font-weight: 700; color: #fff; font-family: var(--font-heading); }
.map-suggestion .map-meta { font-size: 0.72rem; color: #8c8c8c; margin-top: 1px; }
.map-suggestion .map-author { font-size: 0.72rem; color: #666; }

/* ---- BUTTON ---- */
.coach-btn {
  padding: 0.85rem 2rem;
  background: linear-gradient(45deg, #fe0007, #9100fe);
  color: #fff; font-family: var(--font-heading); font-weight: 700;
  font-size: 0.9rem; letter-spacing: 2px; text-transform: uppercase;
  border: none; cursor: pointer;
  clip-path: polygon(15px 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,0 100%,0 15px);
  transition: transform 0.3s, filter 0.3s;
  width: 100%; text-align: center; display: block;
}
.coach-btn:hover {
  transform: scale(1.03);
  filter: brightness(1.2) drop-shadow(0 0 10px rgba(254,0,7,0.5));
}
.coach-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }

/* ---- RESULTS BOX — dark bg + light text ---- */
.coach-results {
  margin-top: 2rem; padding: 1.5rem;
  border: 1px solid rgba(15,53,240,0.35); border-radius: 6px;
  background: #12121a; display: none;
}
.coach-results.visible { display: block; }
.coach-results h3 {
  font-size: 1.1rem; color: #fff; margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(15,53,240,0.2);
  font-family: var(--font-heading);
}

/* ---- TIPS ---- */
.coach-tip {
  padding: 1rem; margin-bottom: 0.75rem;
  border-left: 3px solid #0f35f0;
  background: rgba(15,53,240,0.07);
  border-radius: 0 4px 4px 0;
  color: #c8c8cc; line-height: 1.75; font-size: 0.92rem;
}
.coach-tip.warn {
  border-left-color: #fe0007;
  background: rgba(254,0,7,0.07);
  color: #ffb3b3;
}
.coach-tip.good {
  border-left-color: #0eff06;
  background: rgba(14,255,6,0.05);
  color: #b3ffb3;
}
.coach-tip strong { color: #fff; font-family: var(--font-heading); font-size: 0.88rem; }
.coach-tip ul { margin: 0.5rem 0 0 1.2rem; }
.coach-tip li { margin-bottom: 0.35rem; }
.coach-tip a { color: #4d7fff; text-decoration: underline; }
.coach-tip a:hover { color: #fff; }

/* ---- SPINNER ---- */
.coach-spinner {
  text-align: center; padding: 2rem;
  color: #8c8c8c;
  font-family: var(--font-heading);
  letter-spacing: 1px; text-transform: uppercase;
  font-size: 0.82rem;
}
.coach-spinner::before {
  content: ''; display: inline-block;
  width: 22px; height: 22px;
  border: 3px solid rgba(15,53,240,0.3);
  border-top-color: #0f35f0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.75rem; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- CHECKLIST ---- */
.pre-game-checklist { list-style: none; padding: 0; }
.pre-game-checklist li {
  padding: 0.75rem 1rem; margin-bottom: 0.5rem;
  background: rgba(15,53,240,0.07);
  border: 1px solid rgba(15,53,240,0.2);
  border-radius: 4px;
  display: flex; align-items: flex-start; gap: 0.75rem;
  color: #c8c8cc; font-size: 0.9rem; line-height: 1.6;
}
.pre-game-checklist li .chk {
  flex: 0 0 22px; color: #0f35f0; font-weight: 900;
  font-size: 1.1rem; line-height: 1.4; margin-top: 2px;
}
.pre-game-checklist li .chk.warn { color: #fe0007; }

/* ---- UPLOAD ---- */
.upload-dropzone {
  border: 2px dashed rgba(15,53,240,0.35);
  border-radius: 8px; padding: 2rem; text-align: center;
  color: #8c8c8c; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1.5rem;
  background: #12121a;
}
.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: #0f35f0; background: rgba(15,53,240,0.08);
}
.upload-dropzone input { display: none; }
.file-info {
  font-family: var(--font-heading); font-size: 0.8rem;
  color: #0eff06; margin-top: 0.75rem; display: none;
}
.file-info.visible { display: block; }

/* ---- SECTION LABEL ---- */
.section-label {
  font-family: var(--font-heading); font-size: 0.85rem;
  color: #0f35f0; text-transform: uppercase;
  letter-spacing: 2px; margin-bottom: 1rem; margin-top: 1.5rem;
}
.section-label:first-child { margin-top: 0; }

/* ---- REPLAY SOURCE NOTE ---- */
.replay-source-note {
  padding: 1rem; margin-bottom: 1.5rem;
  background: rgba(15,53,240,0.06);
  border: 1px solid rgba(15,53,240,0.25);
  border-radius: 4px;
  font-size: 0.85rem; color: #8c8c8c; line-height: 1.6;
}
.replay-source-note strong { color: #fff; }
.replay-source-note a { color: #4d7fff; }
.replay-source-note code {
  background: rgba(255,255,255,0.08);
  padding: 0.1rem 0.4rem; border-radius: 3px;
  font-size: 0.82rem; color: #d2d2d4;
}

/* ---- REPLAY SELECTOR ---- */
.replay-option {
  padding: 0.8rem 1rem; margin-bottom: 0.5rem;
  background: rgba(15,53,240,0.05);
  border: 1px solid rgba(15,53,240,0.2);
  border-radius: 4px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  color: #c8c8cc;
}
.replay-option:hover { background: rgba(15,53,240,0.15); border-color: rgba(15,53,240,0.6); }
.replay-option.selected { background: rgba(15,53,240,0.2); border-color: #0f35f0; }
.replay-option .replay-map { font-weight: 700; color: #fff; font-family: var(--font-heading); font-size: 0.9rem; }
.replay-option .replay-meta { font-size: 0.75rem; color: #8c8c8c; margin-top: 3px; }

/* ---- INFO NOTE ---- */
.info-note {
  font-size: 0.8rem; color: #666; margin-top: 0.4rem; line-height: 1.5;
}

/* ---- WHERE TO FIND REPLAYS NOTE ---- */
.where-note {
  padding: 0.85rem 1rem; margin-bottom: 1rem;
  background: rgba(15,53,240,0.05);
  border: 1px solid rgba(15,53,240,0.2);
  border-radius: 4px; font-size: 0.85rem;
  color: #8c8c8c; line-height: 1.6;
}
.where-note strong { color: #fff; }
.where-note a { color: #4d7fff; }
.where-note code {
  background: rgba(255,255,255,0.08);
  padding: 0.1rem 0.4rem; border-radius: 3px;
  font-size: 0.82rem; color: #d2d2d4;
}
