/* ====================================================================
   112 Italy — Community Voting Panels
   Full-width black band on the product page, matching the campaign
   banner and footer. Gold #BD9C2F, Cinzel headings, 2px radii.
   ==================================================================== */

.tif-voting {
  --tif-band: #000000;
  --tif-card: #0f0f10;
  --tif-head: #17171a;
  --tif-line: #2a2721;
  --tif-track: #26241f;
  --tif-text: #f2efe9;
  --tif-muted: #8a8580;
  --tif-gold: #bd9c2f;
  --tif-gold-hi: #e0c566;
  --tif-body: "DM Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --tif-display: "Cinzel", "Times New Roman", serif;

  /* Break out of the constrained product column into a full-width band. */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 64px 0;
  background: var(--tif-band);
  color: var(--tif-text);
  font-family: var(--tif-body);
  box-sizing: border-box;
}

.tif-voting *,
.tif-voting *::before,
.tif-voting *::after { box-sizing: border-box; }

.tif-voting__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section heading ------------------------------------------------ */
.tif-voting__title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 26px;
  padding: 0;
  font-family: var(--tif-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--tif-gold);
}
.tif-voting__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tif-line);
}

/* --- Grid ------------------------------------------------------------ */
.tif-voting__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 18px;
}
@media (max-width: 880px) {
  .tif-voting__grid { grid-template-columns: 1fr; }
}
.tif-panel--wide { grid-column: 1 / -1; }

/* --- Panel ----------------------------------------------------------- */
.tif-panel {
  background: var(--tif-card);
  border: 1px solid var(--tif-line);
  border-radius: 2px;
  overflow: hidden;
}
.tif-panel__head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 20px;
  background: var(--tif-head);
  border-bottom: 1px solid var(--tif-line);
}
.tif-panel__head svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--tif-gold);
}
.tif-panel__head h3 {
  margin: 0;
  padding: 0;
  font-family: var(--tif-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tif-text);
}
.tif-panel__body { padding: 20px; }

/* --- Shared bar ------------------------------------------------------ */
.tif-bar {
  display: block;
  background: var(--tif-track);
  border-radius: 2px;
  overflow: hidden;
}
.tif-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--tif-gold);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Face row (rating) ----------------------------------------------- */
.tif-faces {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.tif-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 10px 4px;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--tif-muted);
  font-family: var(--tif-body);
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.tif-face svg { width: 40px; height: 40px; }
.tif-face .tif-bar { width: 100%; height: 4px; }
.tif-face .tif-n {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--tif-text);
}

/* --- Season row ------------------------------------------------------ */
.tif-seasons {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.tif-season {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 2px;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--tif-muted);
  font-family: var(--tif-body);
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.tif-season svg { width: 28px; height: 28px; }
.tif-season .tif-bar { width: 100%; height: 4px; }
.tif-season .tif-n {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--tif-text);
}

/* --- Scale rows ------------------------------------------------------ */
.tif-scale { display: flex; flex-direction: column; gap: 2px; }
.tif-row {
  display: grid;
  grid-template-columns: 116px 30px 1fr;
  align-items: center;
  gap: 12px;
  padding: 7px 8px;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--tif-muted);
  font-family: var(--tif-body);
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.tif-row .tif-n {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 13px;
  color: var(--tif-text);
}
.tif-row .tif-bar { height: 8px; }

/* --- Interaction states (shared) ------------------------------------- */
.tif-face:hover,
.tif-season:hover,
.tif-row:hover {
  color: var(--tif-text);
  background: #1b1b1e;
  border-color: #3a352b;
}
.tif-face:focus-visible,
.tif-season:focus-visible,
.tif-row:focus-visible {
  outline: 2px solid var(--tif-gold);
  outline-offset: 1px;
}
.tif-face[aria-pressed="true"],
.tif-season[aria-pressed="true"],
.tif-row[aria-pressed="true"] {
  color: var(--tif-gold-hi);
  border-color: var(--tif-gold);
  background: #16150f;
}

/* --- Axis labels ------------------------------------------------------ */
.tif-axis {
  display: flex;
  justify-content: space-between;
  padding: 0 8px 11px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tif-muted);
}

/* --- Summary ---------------------------------------------------------- */
.tif-summary {
  margin: 22px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--tif-muted);
}
.tif-summary b {
  font-family: var(--tif-display);
  font-size: 23px;
  font-weight: 600;
  color: var(--tif-gold);
  font-variant-numeric: tabular-nums;
}
.tif-summary .tif-total {
  color: var(--tif-text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* --- Empty state ------------------------------------------------------ */
.tif-empty {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--tif-muted);
}

/* --- Status / errors --------------------------------------------------- */
.tif-voting__status {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  min-height: 18px;
  color: var(--tif-muted);
}
.tif-voting__status[data-state="error"] { color: #e0857f; }
.tif-voting.is-busy { opacity: 0.7; }

/* --- Small screens ----------------------------------------------------- */
@media (max-width: 560px) {
  .tif-voting { padding: 44px 0; }
  .tif-voting__inner { padding: 0 16px; }
  .tif-faces { gap: 3px; }
  .tif-face { font-size: 11px; padding: 8px 2px; }
  .tif-face svg { width: 30px; height: 30px; }
  .tif-seasons { grid-template-columns: repeat(3, 1fr); }
  .tif-row { grid-template-columns: 92px 26px 1fr; gap: 8px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .tif-bar i,
  .tif-face,
  .tif-season,
  .tif-row { transition: none; }
}

/* --- House profile marker ---------------------------------------------
   The brand's own read on the fragrance. Marked, never counted as a vote. */
.tif-row.is-house,
.tif-season.is-house {
  border-color: rgba(189, 156, 47, 0.42);
}
.tif-row.is-house .tif-label,
.tif-season.is-house .tif-label {
  color: var(--tif-gold-hi);
}
.tif-row.is-house .tif-label::after,
.tif-season.is-house .tif-label::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--tif-gold);
  vertical-align: middle;
}
.tif-house-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tif-muted);
}
.tif-house-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tif-gold);
}

/* --- Profile mode -----------------------------------------------------
   No customer votes yet, so the bars show the house's placement on the
   scale. A column of zeros would read as broken, so the counts are held
   back until real votes exist. */
.tif-panel.is-profile .tif-n {
  visibility: hidden;
}
.tif-panel.is-profile .tif-bar i {
  background: var(--tif-gold);
  opacity: 0.85;
}
.tif-panel.is-profile .tif-row.is-house,
.tif-panel.is-profile .tif-season.is-house {
  border-color: rgba(189, 156, 47, 0.55);
}
