/* Area "ads" (docs/V2_BUILD.md). Only this area edits this file.
   Consent banner, /cookies/, sponsored units, /pro/ads/ self-service and staff review.
   Tokens of tokens.css only: flat, no shadow, no radius above 3px, no color outside the palette. */

/* Consent banner: the v1 cookie bar, see static/v1/hsm-v1.css (.hsm-consent). */

/* /cookies/ ---------------------------------------------------------------------- */
.hsm-cookies__intro { max-width: 720px; }
.hsm-cookies__status { margin: 24px 0 0; color: var(--hsm-white); }
.hsm-cookies { border-top: 1px solid var(--hsm-rule); max-width: 980px; }
.hsm-cookies__row {
  display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 40px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--hsm-rule);
}
.hsm-cookies__row p { margin: 0; }
.hsm-cookies__name {
  margin: 0 0 8px; font: 600 20px/1.2 var(--hsm-font-wide); letter-spacing: var(--hsm-track);
  text-transform: uppercase; color: var(--hsm-white);
}
.hsm-cookies__name label { cursor: pointer; }
.hsm-cookies__state { margin: 0; justify-self: end; color: var(--hsm-muted); }
.hsm-cookies__check { justify-self: end; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.hsm-cookies__check input { width: 20px; height: 20px; margin: 0; accent-color: var(--hsm-coral); }
.hsm-cookies__actions { margin-top: 32px; }
.hsm-cookies__all { margin-top: 20px; }
.hsm-cookies__all form { margin: 0; }
@media (max-width: 800px) {
  .hsm-cookies__row { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px 0; }
  .hsm-cookies__state, .hsm-cookies__check { justify-self: start; }
  .hsm-cookies__name { font-size: 16px; }
}

/* Sponsored units ------------------------------------------------------------------ */
.hsm-ad { margin-top: var(--hsm-gap); min-width: 0; }
.hsm-ad__label { margin: 0 0 12px; color: var(--hsm-muted); }
.hsm-ad__unit {
  display: grid; gap: 20px; align-items: center; padding: 24px 0;
  border-top: 1px solid var(--hsm-rule); border-bottom: 1px solid var(--hsm-rule);
  text-decoration: none; color: inherit;
}
a.hsm-ad__unit:hover { background: color-mix(in srgb, var(--style, var(--hsm-text)) 6%, transparent); }
.hsm-ad__body { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.hsm-ad__headline {
  font: 600 30px/1.1 var(--hsm-font-wide); letter-spacing: var(--hsm-track); text-transform: uppercase;
  color: var(--hsm-white); overflow-wrap: anywhere;
}
.hsm-ad__when { color: var(--hsm-text); }
.hsm-ad__text { max-width: 640px; }
.hsm-ad__more {
  display: inline-flex; gap: 14px; align-items: center; margin-top: 6px; color: var(--hsm-white);
  font: 600 12px/1.4 var(--hsm-font); letter-spacing: var(--hsm-track); text-transform: uppercase;
}
.hsm-ad__more svg { width: 60px; }
.hsm-ad__image { width: 100%; height: auto; }
.hsm-ad__image--wide { aspect-ratio: 4 / 1; object-fit: cover; }
.hsm-ad__image--square { aspect-ratio: 1; object-fit: cover; }
.hsm-ad__poster { width: 180px; transform: rotate(var(--hsm-poster-tilt)); margin: 12px; }
.hsm-ad__photo { width: 180px; aspect-ratio: 1; object-fit: cover; }

/* Home banner and lists: image and text side by side on wide screens */
@media (min-width: 901px) {
  .hsm-ad--home_banner .hsm-ad__unit:has(.hsm-ad__image--wide),
  .hsm-ad--list_inline .hsm-ad__unit:has(.hsm-ad__image--wide) { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; }
  .hsm-ad--home_banner .hsm-ad__unit:has(.hsm-ad__poster, .hsm-ad__photo, .hsm-ad__image--square),
  .hsm-ad--list_inline .hsm-ad__unit:has(.hsm-ad__poster, .hsm-ad__photo, .hsm-ad__image--square),
  .hsm-ad--entity_sidebar .hsm-ad__unit:has(img) { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
}
.hsm-ad--list_inline { margin-top: 0; }
.hsm-ad--list_inline .hsm-ad__label { margin: 0; padding: 16px 0 0; }
.hsm-ad--list_inline .hsm-ad__unit { border-top: 0; }
.hsm-ad--list_inline .hsm-ad__headline { font-size: 26px; }

/* Side columns: compact, aligned like the column */
.hsm-ad--event_sidebar { width: 100%; max-width: 380px; margin-top: 0; }
.hsm-event__side .hsm-ad--event_sidebar .hsm-ad__body { justify-items: end; }
.hsm-ad--event_sidebar .hsm-ad__headline, .hsm-ad--entity_sidebar .hsm-ad__headline { font-size: 20px; }
.hsm-ad--event_sidebar .hsm-ad__poster, .hsm-ad--event_sidebar .hsm-ad__photo { width: 160px; }
.hsm-event__side .hsm-ad--event_sidebar .hsm-ad__poster, .hsm-event__side .hsm-ad--event_sidebar .hsm-ad__photo { justify-self: end; }
.hsm-ad--entity_sidebar { max-width: 760px; }

@media (max-width: 900px) {
  .hsm-ad__unit { gap: 16px; }
  .hsm-ad__headline, .hsm-ad--list_inline .hsm-ad__headline { font-size: 20px; }
  .hsm-ad__poster, .hsm-ad__photo { width: 140px; }
  .hsm-event__side .hsm-ad--event_sidebar .hsm-ad__body { justify-items: start; }
  .hsm-event__side .hsm-ad--event_sidebar .hsm-ad__poster, .hsm-event__side .hsm-ad--event_sidebar .hsm-ad__photo { justify-self: start; }
}

/* Pro area: shared bits ------------------------------------------------------------ */
.hsm-adback { margin: 12px 0 0; }
.hsm-adtext { max-width: 720px; }
.hsm-adempty { margin: 0; padding: 32px 0; }
.hsm-adactions { margin-top: 40px; }
.hsm-adactions form { margin: 0; }
.hsm-adlinkbtn {
  background: none; border: 0; padding: 0; color: var(--hsm-text); cursor: pointer;
  font: 400 14px var(--hsm-font); text-decoration: underline; text-underline-offset: 4px;
}
.hsm-adlinkbtn:hover { color: var(--hsm-white); }
.hsm-adbeta {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; max-width: 980px;
  margin-top: 32px; padding: 18px 0; border-top: 1px solid var(--hsm-rule); border-bottom: 1px solid var(--hsm-rule);
}
.hsm-adbeta p { margin: 0; font-size: 14px; }
.hsm-adbeta .hsm-overline { color: var(--hsm-white); padding-top: 2px; }
@media (max-width: 800px) { .hsm-adbeta { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

.hsm-adstatus {
  display: inline-block; padding: 6px 8px 5px; border: 1px solid var(--hsm-muted); color: var(--hsm-muted);
  font: 600 11px/1 var(--hsm-font-wide); letter-spacing: var(--hsm-track); text-transform: uppercase; white-space: nowrap;
}
.hsm-adstatus--submitted, .hsm-adstatus--approved, .hsm-adstatus--active, .hsm-adstatus--paused {
  border-color: var(--hsm-white); color: var(--hsm-white);
}
.hsm-adstatus--rejected { border-color: var(--hsm-coral); color: var(--hsm-coral); }
.hsm-adhead { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 24px; }
.hsm-adhead p { margin: 0; }
.hsm-adreason { max-width: 980px; margin: 24px 0 0; padding: 16px 0; border-top: 1px solid var(--hsm-rule); border-bottom: 1px solid var(--hsm-rule); }
.hsm-adreason .hsm-overline { display: block; margin-bottom: 4px; color: var(--hsm-muted); }
.hsm-adproblems { max-width: 980px; margin: 0 0 8px; padding: 16px 20px; background: var(--hsm-field); border-left: 4px solid var(--hsm-coral); }
.hsm-adproblems p { margin: 0; color: var(--hsm-white); }
.hsm-adproblems ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }

/* Campaign rows */
.hsm-adrows { margin-top: 32px; border-top: 1px solid var(--hsm-rule); }
.hsm-adrow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(150px, auto) 60px; gap: 32px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--hsm-rule); text-decoration: none;
}
.hsm-adrow:hover { background: color-mix(in srgb, var(--hsm-text) 4%, transparent); }
.hsm-adrow__main { display: grid; gap: 6px; min-width: 0; }
.hsm-adrow__name {
  font: 600 26px/1.1 var(--hsm-font-wide); letter-spacing: var(--hsm-track); text-transform: uppercase;
  color: var(--hsm-white); overflow-wrap: anywhere;
}
.hsm-adrow__when { display: grid; gap: 4px; justify-items: end; text-align: right; }
.hsm-adrow .hsm-adstatus { justify-self: end; }
.hsm-adrow__arrow { width: 60px; color: var(--hsm-white); }
@media (max-width: 800px) {
  .hsm-adrow { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 22px 0; }
  .hsm-adrow__name { font-size: 18px; }
  .hsm-adrow__when { justify-items: start; text-align: left; }
  .hsm-adrow .hsm-adstatus { justify-self: start; }
  .hsm-adrow__arrow { display: none; }
}

/* Steps */
.hsm-adsteps ol { display: flex; flex-wrap: wrap; margin: 40px 0 0; padding: 0; list-style: none; border-bottom: 1px solid var(--hsm-rule); }
.hsm-adsteps li > a, .hsm-adsteps li > span {
  display: block; margin-bottom: -1px; padding: 14px 32px 14px 0; border-bottom: 2px solid transparent;
  font: 600 12px/1.4 var(--hsm-font-wide); letter-spacing: var(--hsm-track); text-transform: uppercase;
  color: var(--hsm-muted); text-decoration: none;
}
.hsm-adsteps li span span { margin-right: 6px; }
.hsm-adsteps a:hover { color: var(--hsm-white); }
.hsm-adsteps .is-current { color: var(--hsm-white); border-bottom-color: var(--hsm-white); }
@media (max-width: 800px) { .hsm-adsteps li > a, .hsm-adsteps li > span { padding-right: 18px; font-size: 11px; letter-spacing: 2px; } }

/* Forms */
.hsm-adform {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; max-width: 980px;
  min-width: 0; margin: 0; padding: 0; border: 0;
}
.hsm-adform__full { grid-column: 1 / -1; }
.hsm-adform__field { align-content: start; }
.hsm-adform__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.hsm-adform__group legend, .hsm-adchoices legend { margin-bottom: 10px; padding: 0; }
.hsm-adform__help { margin: 0; color: var(--hsm-muted); font-size: 14px; }
.hsm-adform__error { margin: 0; color: var(--hsm-hardcore-text); font-size: 14px; font-weight: 600; }
.hsm-adform__field--error input:not([type="checkbox"], [type="radio"]), .hsm-adform__field--error select,
.hsm-adform__field--error textarea { outline: 1px solid var(--hsm-hardcore-text); }
.hsm-adform__req { color: var(--hsm-muted); }
.hsm-adform__value { margin: 0; min-height: 48px; display: flex; align-items: center; font-weight: 600; color: var(--hsm-white); }
.hsm-adform select[multiple] { min-height: 150px; }
.hsm-adform input[type="file"] { padding: 12px; font-size: 14px; }
.hsm-adform input[type="date"] { color-scheme: dark; }
.hsm-adform .hsm-checks input[type="radio"] { accent-color: var(--hsm-coral); width: 16px; height: 16px; }
.hsm-adform .hsm-checks:has(input[type="radio"]) { grid-template-columns: minmax(0, 1fr); }
.hsm-adcheck { display: flex; gap: 12px; align-items: center; min-height: 48px; font-size: 14px; cursor: pointer; }
.hsm-adcheck input { width: 16px; height: 16px; margin: 0; accent-color: var(--hsm-coral); }
@media (max-width: 800px) { .hsm-adform { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* Radio and checkbox rows (objective, placements) */
.hsm-adchoices { margin: 0; padding: 0; border: 0; min-width: 0; }
.hsm-adchoice {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 18px 0; border-top: 1px solid var(--hsm-rule); cursor: pointer;
}
.hsm-adchoice:last-of-type { border-bottom: 1px solid var(--hsm-rule); }
.hsm-adchoice:hover { background: color-mix(in srgb, var(--hsm-text) 4%, transparent); }
.hsm-adchoice input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--hsm-coral); }
.hsm-adchoice > span { display: grid; gap: 4px; }
.hsm-adchoice__name {
  font: 600 18px/1.2 var(--hsm-font-wide); letter-spacing: 2px; text-transform: uppercase; color: var(--hsm-white);
}
@media (max-width: 800px) { .hsm-adchoice__name { font-size: 15px; letter-spacing: 1.5px; } }

/* Audience step: fields and live estimate side by side */
.hsm-adaudience { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; margin-top: 56px; }
.hsm-adaudience__legend { margin-bottom: 20px; padding: 0; color: var(--hsm-white); }
.hsm-adestimate { position: sticky; top: 24px; max-width: 520px; margin-top: 24px; padding: 20px 0; border-top: 2px solid var(--hsm-white); }
.hsm-adaudience .hsm-adestimate { margin-top: 0; }
.hsm-adestimate p { margin: 0; }
.hsm-adestimate .hsm-adestimate__text { margin: 10px 0 12px; font: 600 22px/1.3 var(--hsm-font); color: var(--hsm-white); }
@media (max-width: 900px) {
  .hsm-adaudience { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hsm-adestimate { position: static; }
}

/* Summary rows */
.hsm-adsummary { max-width: 980px; margin: 32px 0 0; border-top: 1px solid var(--hsm-rule); }
.hsm-adsummary > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--hsm-rule); }
.hsm-adsummary dt { padding-top: 3px; color: var(--hsm-muted); }
.hsm-adsummary dd { margin: 0; }
.hsm-adsummary__url { overflow-wrap: anywhere; }
.hsm-adsummary .hsm-link { font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 800px) { .hsm-adsummary > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* Statistics: rows with thin bars, no big-number cards */
.hsm-adtotals { margin: 28px 0 4px; font: 600 20px/1.3 var(--hsm-font); color: var(--hsm-white); }
.hsm-adstats { width: 100%; max-width: 980px; margin-top: 40px; border-collapse: collapse; font-size: 14px; }
.hsm-adstats caption { padding-bottom: 12px; text-align: left; color: var(--hsm-white); }
.hsm-adstats th, .hsm-adstats td { padding: 10px 20px 10px 0; border-bottom: 1px solid var(--hsm-rule); text-align: left; vertical-align: bottom; font-weight: 400; }
.hsm-adstats thead th { font: 600 11px/1.4 var(--hsm-font); letter-spacing: var(--hsm-track); text-transform: uppercase; color: var(--hsm-muted); }
.hsm-adstats tbody th { white-space: nowrap; }
.hsm-adstats td { width: 32%; }
.hsm-adstats td:last-child, .hsm-adstats th:last-child { width: auto; padding-right: 0; text-align: right; }
.hsm-adbar { display: block; height: 4px; margin-bottom: 6px; background: var(--hsm-rule); }
.hsm-adbar > span { display: block; width: var(--w, 0%); height: 100%; background: var(--hsm-text); }
.hsm-adnum { font-variant-numeric: tabular-nums; }
@media (max-width: 800px) {
  .hsm-adstats { table-layout: fixed; font-size: 13px; }
  .hsm-adstats th, .hsm-adstats td { padding-right: 8px; overflow-wrap: anywhere; }
  .hsm-adstats thead th { font-size: 10px; letter-spacing: 1px; }
  .hsm-adstats tbody th { white-space: normal; }
  .hsm-adstats th:first-child { width: 26%; }
  .hsm-adstats td { width: 27%; }
  .hsm-adstats td:last-child, .hsm-adstats th:last-child { width: 20%; }
}

/* Previews and staff review */
.hsm-adpreview { margin-top: 24px; }
.hsm-adpreview .hsm-ad--event_sidebar, .hsm-adpreview .hsm-ad--entity_sidebar, .hsm-adpreview .hsm-ad--home_banner { max-width: 980px; }
.hsm-adpreview > .hsm-overline { margin: 32px 0 8px; }
.hsm-adpreview .hsm-ad { margin-top: 0; }
.hsm-adreview { max-width: 720px; margin-top: 24px; }
.hsm-adreview textarea { min-height: 96px; }
.hsm-adweight { display: flex; flex-wrap: wrap; gap: 20px; align-items: end; margin-top: 48px; }
.hsm-adweight .hsm-field { width: 180px; }
.hsm-adweight button { margin-bottom: 14px; }

/* "Sponsored" badge (templates/ads/components/sponsored_badge.html), shape of the style tag */
.hsm-adbadge {
  display: inline-block; padding: 5px 6px 4px; border: 1px solid var(--hsm-white); border-top-right-radius: var(--hsm-radius);
  color: var(--hsm-white); font: 600 11px/1 var(--hsm-font-wide); letter-spacing: var(--hsm-track); text-transform: uppercase;
}
