/* =========================================================
   Honey Barrel Hunter — Skin2
   Compact • Data-driven • Whiskey palette
   ========================================================= */

/* ---------- CSS Variables (Theme) ---------- */
:root {
  --s2-bg: #f6f1ea;
  --s2-panel: #ffffff;
  --s2-border: #d8cfc3;

  --s2-brown-dark: #3b2a20;
  --s2-brown-mid: #6a4a32;
  --s2-amber: #b57a2a;
  --s2-amber-soft: #e1b66a;

  --s2-text: #2b1d14;
  --s2-text-muted: #7a6758;
  --s2-text-invert: #ffffff;

  --s2-link: #8a5a20;
  --s2-link-hover: #b57a2a;

  --s2-font-sans: ui-sans-serif, system-ui, -apple-system,
                  Segoe UI, Roboto, Helvetica, Arial;
  --s2-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco,
                  Consolas, "Liberation Mono", monospace;
}

/* =========================================================
   Hero Fight Video (Home Only)
   ========================================================= */

body[data-page="home"] .hero-video-wrap {
  width: 100%;
  max-width: clamp(320px, 85vw, 700px);
  margin: 0 auto 18px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--s2-border);
  background: #000;
  box-sizing: border-box;
}

body[data-page="home"] .hero-video {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Base ---------- */
html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #efe6d9 0%, #f6f1ea 45%);
  color: var(--s2-text);
  font-family: var(--s2-font-sans);
  font-size: 13px;
}

/* ---------- Layout ---------- */
.skin2-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 16px 40px;
}

.skin2-card {
  background: var(--s2-panel);
  border: 1px solid var(--s2-border);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Utility helpers used across pages */
.mono { font-family: var(--s2-font-mono); }

.muted-card {
  border: 1px solid var(--s2-border);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 14px;
  color: var(--s2-text-muted);
}

/* ---------- Header ---------- */
.skin2-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--s2-border);
  background: linear-gradient(90deg, #4a3326, #2f2119);
  color: var(--s2-text-invert);
}

.skin2-header h1 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
}

.skin2-header .subtitle {
  font-size: 11px;
  color: #e6d3b8;
  font-family: var(--s2-font-mono);
}

/* ---------- Navigation ---------- */
.skin2-nav-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 9px 0 11px;
  background: linear-gradient(90deg, #3b2a20, #2a1d16);
  border-bottom: 1px solid var(--s2-border);
}

.skin2-nav {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--s2-amber-soft);
  text-decoration: none;
  padding: 5px 9px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.skin2-nav:hover {
  background-color: rgba(255,255,255,0.08);
  color: #fff;
}

.skin2-nav-active {
  background-color: rgba(255,255,255,0.15);
  color: #fff;
}

/* ---------- Controls ---------- */
.skin2-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--s2-border);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.95),
    rgba(250,247,242,0.95)
  );
}

.skin2-controls input[type="text"],
.skin2-controls input[type="number"] {
  width: 300px;
  max-width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--s2-border);
  background: #fff;
  color: var(--s2-text);
}

.skin2-controls input[type="number"] {
  width: 140px; /* nicer default for proof inputs */
}

.skin2-controls input::placeholder {
  color: var(--s2-text-muted);
}

.skin2-controls input:focus {
  outline: none;
  border-color: var(--s2-amber);
  box-shadow: 0 0 0 3px rgba(181,122,42,0.18);
}

.skin2-status {
  font-size: 11px;
  color: var(--s2-text-muted);
  font-family: var(--s2-font-mono);
}

/* ---------- Tables ---------- */
.skin2-table-wrap {
  overflow-x: auto;
}

table.skin2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

table.skin2-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--s2-text-muted);
  background: #f3ede5;
  border-bottom: 1px solid var(--s2-border);
  text-align: left;
}

table.skin2-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #ece4da;
  vertical-align: middle;
}

table.skin2-table tbody tr:nth-child(even) {
  background: #fbf8f4;
}

table.skin2-table tbody tr:hover {
  background: rgba(181,122,42,0.08);
}

/* ---------- Column helpers ---------- */

.skin2-table th.col-score,
.skin2-table td.col-score {
  width: 70px;
  white-space: nowrap;
  text-align: center;
}

.skin2-table th.col-msrp,
.skin2-table td.col-msrp {
  width: 90px;
  white-space: nowrap;
  text-align: right;
}

.skin2-table th.col-proof,
.skin2-table td.col-proof {
  width: 80px;
  white-space: nowrap;
  text-align: right;
}

.skin2-table th.col-age,
.skin2-table td.col-age {
  width: 70px;
  white-space: nowrap;
  text-align: center;
}

/* --- NEW: Coterie Narrow Columns --- */

.skin2-table th.col-reviews,
.skin2-table td.col-reviews {
  width: 70px;
  text-align: center;
  white-space: nowrap;
}

.skin2-table th.col-add,
.skin2-table td.col-add {
  width: 90px;
  text-align: center;
  white-space: nowrap;
}

/* ---------- Rotating Star (row indicators) ---------- */
.star-icon,
.hbh-star-icon {
  display: inline-block;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
  animation: hbhSpin 3.2s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes hbhSpin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* Toggle stars should be static (row stars can still spin) */
.hbh-star-toggle .star-icon,
.star-toggle .star-icon,
.hbh-star-toggle .hbh-star-icon {
  animation: none !important;
}

/* ---------- Links ---------- */
.skin2-link {
  color: var(--s2-link);
  text-decoration: none;
  font-weight: 700;
}

.skin2-link:hover {
  color: var(--s2-link-hover);
  text-decoration: underline;
}

/* ---------- Error ---------- */
.skin2-error,
.muted-card.error {
  padding: 10px 16px;
  color: #9b2c2c;
  font-size: 12px;
  font-family: var(--s2-font-mono);
  background: #fdecec;
  border-top: 1px solid #f5c2c2;
}

/* =========================================================
   Bottle Page Tables (HBH Notes + Coterie Notes)
   Applies ONLY on bottles page to table.sensory-table
   ========================================================= */

body[data-page="bottles"] table.sensory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

body[data-page="bottles"] table.sensory-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--s2-text-muted);
  background: #f3ede5;
  border-bottom: 1px solid var(--s2-border);
  text-align: left;
}

body[data-page="bottles"] table.sensory-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #ece4da;
  vertical-align: top;
}

/* zebra + hover */
body[data-page="bottles"] table.sensory-table tbody tr:nth-child(even) {
  background: #fbf8f4;
}
body[data-page="bottles"] table.sensory-table tbody tr:hover {
  background: rgba(181,122,42,0.08);
}

/* helpers used by your JS markup */
body[data-page="bottles"] table.sensory-table .no-wrap { white-space: nowrap; }

body[data-page="bottles"] table.sensory-table th.score-head,
body[data-page="bottles"] table.sensory-table td.score-cell {
  width: 70px;
  white-space: nowrap;
  text-align: center;
}

body[data-page="bottles"] table.sensory-table th.num,
body[data-page="bottles"] table.sensory-table td.num {
  width: 70px;
  white-space: nowrap;
  text-align: center;
}

body[data-page="bottles"] table.sensory-table td.date-cell {
  text-align: right;
}

/* Notes cells wrap nicely */
body[data-page="bottles"] table.sensory-table td.notes {
  white-space: normal;
  word-break: break-word;
}

/* nicer on small screens */
@media (max-width: 860px) {
  body[data-page="bottles"] table.sensory-table {
    table-layout: auto;
  }
}
