/**
 * vtm.css — Vidai to Mulai · Shared Styles
 * For: gig_setup.html, gig_eval_v4.html, launcher.html
 * Based on design tokens from design document + gig_eval_v_3.html
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:      #c0392b;
  --red-dark: #8b1a10;
  --green:    #2d5a3d;
  --black:    #111111;
  --charcoal: #2c2c2c;
  --mid:      #555555;
  --stone:    #8a8a8a;
  --light:    #eeece6;
  --white:    #f7f6f2;
  --font-display: 'Playfair Display', serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

body {
  font-family: var(--font-body);
  background: var(--light);
  color: var(--black);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── HEADER (from v_3) ── */
header {
  background: var(--black);
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--red);
}

.header-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: 0.04em;
}

.header-brand span { color: var(--red); }

.header-sub {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247,246,242,0.4);
}

/* ── MAIN CONTAINER ── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── GIG META (from v_3) ── */
.gig-meta {
  background: var(--white);
  padding: 32px 36px;
  margin-bottom: 24px;
  border-top: 4px solid var(--red);
}

.gig-meta-grid {
  display: grid;
  grid-template-columns: 120px 1fr 120px 1fr;
  gap: 16px 24px;
  align-items: start;
}

.meta-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 500;
  padding-top: 10px;
}

.meta-input {
  background: var(--light);
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--black);
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.meta-input:focus { border-bottom-color: var(--red); }
.meta-input.wide { grid-column: span 3; }

/* ── GIG TOGGLES (from v_3) ── */
.gig-toggles {
  background: var(--white);
  padding: 24px 36px;
  margin-bottom: 32px;
  border-top: 4px solid var(--charcoal);
}

.toggles-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 500;
  margin-bottom: 16px;
}

.toggles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toggle-group-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 500;
}

.toggle-pair {
  display: flex;
  border: 1px solid #ccc;
  overflow: hidden;
}

.toggle-pair input[type="radio"] { display: none; }

.toggle-pair label {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  background: var(--light);
  color: var(--stone);
  transition: background 0.2s, color 0.2s;
  border-right: 1px solid #ccc;
  user-select: none;
}

.toggle-pair label:last-of-type { border-right: none; }

.toggle-pair input[type="radio"]:checked + label {
  background: var(--black);
  color: var(--white);
}

/* Major toggle gets red when selected */
#tog-major:checked + label,
input[name="tog-scale"][value="major"]:checked + label {
  background: var(--red);
  color: var(--white);
}

/* ── SECTION HEADERS (from v_3) ── */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 36px 0 16px;
}

.section-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--light);
  -webkit-text-stroke: 1px var(--stone);
  line-height: 1;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--black);
}

.section-weight {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}

/* ── EVALUATION TABLE (from v_3) ── */
.eval-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.eval-table th {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--light);
}

.eval-table th.center { text-align: center; }

.eval-table thead tr {
  background: var(--black);
  color: var(--white);
}

.eval-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--light);
  vertical-align: middle;
}

.attr-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--black);
}

.attr-desc {
  font-size: 12px;
  color: var(--stone);
  font-weight: 300;
  margin-top: 2px;
}

/* ── RATING CELL (from v_3) ── */
.rating-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Star rating — reverse order for hover effect */
.stars {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
  justify-content: center;
}

.stars input[type="radio"] { display: none; }

.stars label {
  font-size: 22px;
  color: #ddd;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
  line-height: 1;
}

.stars label:hover,
.stars label:hover ~ label,
.stars input:checked ~ label {
  color: var(--red);
}

/* Slider */
.star-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  background: #ddd;
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}

.star-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  transition: transform 0.1s;
}

.star-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }
.star-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  cursor: pointer;
}

/* Badges */
.col-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  margin-bottom: 2px;
}

.rover-badge { background: var(--red); color: var(--white); }
.pacer-badge { background: var(--charcoal); color: rgba(247,246,242,0.6); }

.score-cell {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--red);
  font-weight: 600;
}

/* Hidden row for desk gigs */
.cost-row.hidden { display: none; }

/* Dimension score row */
.dim-score-row td {
  background: var(--light);
  font-weight: 500;
  font-size: 13px;
  border-bottom: 2px solid var(--light);
}

.dim-score-row .score-cell {
  background: var(--black);
  color: var(--white);
}

/* ── FINAL BLOCK (from v_3) ── */
.final-block {
  background: var(--black);
  padding: 32px 36px;
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.final-item { text-align: center; }

.final-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247,246,242,0.4);
  margin-bottom: 8px;
}

.final-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--white);
  line-height: 1;
}

.final-value.red { color: var(--red); }
.final-stars { font-size: 1.8rem; letter-spacing: 2px; }

/* ── NOTES & REFLECTION (from v_3) ── */
.notes-block {
  background: var(--white);
  padding: 28px 36px;
  margin-top: 24px;
}

.notes-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 500;
  margin-bottom: 8px;
}

.notes-input {
  width: 100%;
  background: var(--light);
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--black);
  outline: none;
  resize: none;
  min-height: 80px;
  transition: border-color 0.2s;
}

.notes-input:focus { border-bottom-color: var(--red); }

.reflection-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 24px;
  background: var(--white);
  border-left: 3px solid var(--green);
}

.reflection-row label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
  white-space: nowrap;
}

/* ── SUBMIT BUTTON (from v_3) ── */
.submit-block {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.submit-note {
  font-size: 12px;
  color: var(--stone);
  font-weight: 300;
}

.btn-submit {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-submit:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

/* ── BUDGET TABLE (for gig_setup) ── */
.budget-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  margin: 16px 0;
}

.budget-table th {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 12px;
  background: var(--charcoal);
  color: var(--white);
  text-align: left;
}

.budget-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--light);
}

.budget-table input {
  width: 100%;
  background: var(--light);
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 6px 8px;
  font-family: var(--font-body);
  font-size: 13px;
}

.del-btn {
  background: none;
  border: 1px solid var(--stone);
  color: var(--stone);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s;
}

.del-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.add-row-btn {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  margin: 8px 0;
}

.budget-total-row {
  background: var(--light);
  font-weight: 600;
}

#budgetBlock.visible { display: block; }
#budgetBlock { display: none; }

/* ── DELIVERABLES LIST (for gig_setup) ── */
.deliverables-list {
  list-style: none;
  margin: 12px 0;
}

.deliverables-list li {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.deliverables-list li input {
  flex: 1;
  background: var(--light);
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 8px 12px;
  font-family: var(--font-body);
}

/* ── TOAST NOTIFICATION (from vtm.js requirement) ── */
.vtm-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--black);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 40px;
  font-size: 13px;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  z-index: 2000;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.vtm-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.vtm-toast--err { background: var(--red); }
.vtm-toast--ok  { background: var(--green); }

/* ── LAUNCHER SPECIFIC (from design doc) ── */
.mock-big-btn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}

.mock-big-btn div {
  padding: 48px 24px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  background: var(--white);
  border: 2px solid var(--black);
  cursor: pointer;
  transition: all 0.2s;
}

.mock-big-btn div:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.mock-big-btn div.red {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ── LOAD GIG BAR (gig_eval) ── */
.load-gig-bar {
  background: var(--charcoal);
  padding: 14px 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 2px solid var(--black);
}

.load-gig-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247,246,242,0.45);
  white-space: nowrap;
}

.load-gig-btn {
  background: var(--red);
  color: var(--white);
  padding: 7px 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.load-gig-btn:hover { background: var(--red-dark); }

#loadGigInput { display: none; }

.load-gig-hint {
  font-size: 11px;
  color: rgba(247,246,242,0.3);
  font-style: normal;
}

.load-gig-hint em {
  font-style: normal;
  color: rgba(247,246,242,0.55);
  font-family: var(--font-mono);
}

.load-gig-bar.loaded {
  background: var(--green);
  border-bottom-color: var(--green);
}

.load-gig-bar.loaded .load-gig-label,
.load-gig-bar.loaded .load-gig-hint { color: rgba(247,246,242,0.7); }

/* ── PRINT STYLES (from design doc) ── */
@media print {
  body { font-size: 12px; background: white; }
  .btn-submit, .add-row-btn, .del-btn, .submit-block, .load-gig-bar { display: none; }
  .final-block { background: var(--light); color: var(--black); }
  .final-value { color: var(--black); }
  .final-value.red { color: var(--red); }
  .vtm-toast { display: none; }
  header { background: var(--light); border-bottom: 2px solid var(--black); color: var(--black); }
  .header-brand, .header-sub { color: var(--black); }
}