/* Ferrero Rocher — "Celebrate with Gold" (BIG W) theme
 * Palette + components derived from the TCG-Ferrero_Pralines mockup.
 * Loaded by cms/ferrero-celebrate-gold/base.html.twig.
 */

/* Brand display font supplied by the client ("The Amoret Collection Sans").
   Elegant high-contrast display sans — used for headings/wordmark. */
@font-face {
  font-family: "Amoret Collection Sans";
  src: url("../fonts/ferrero-celebrate-gold/amoret-collection-sans.woff2") format("woff2"),
       url("../fonts/ferrero-celebrate-gold/amoret-collection-sans.woff") format("woff"),
       url("../fonts/ferrero-celebrate-gold/amoret-collection-sans.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --fr-gold:        #d8ac52;   /* section background gold */
  --fr-gold-deep:   #b9862b;   /* accents / rules */
  --fr-cream:       #f8f1da;   /* steps + nav bands, headings on dark */
  --fr-brown:       #6e3612;   /* headings + body text on gold */
  --fr-brown-dark:  #4a250e;   /* submit button, T&Cs strip base */
  --fr-tc-strip:    #8a4712;   /* T&Cs disclaimer band */
  --fr-footer:      #2c1810;   /* corporate footer band */
  /* Client brand font (display; all-caps) — headings/UI. Sans fallback while it loads. */
  --fr-font: "Amoret Collection Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Plain sans with true lowercase — body copy that must not be all-caps (consent text, T&Cs). */
  --fr-font-body: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--fr-font);
  background-color: var(--fr-gold);
  color: var(--fr-brown);
}

/* Client gold texture on the content band — tiled + scrolls with the page (no parallax),
   same approach as the hamilton theme. */
main {
  background: url("../images/ferrero-celebrate-gold/background-tile.png") var(--fr-gold);
}

/* ---- palette utilities used by the templates ---- */
.bg-cream   { background-color: var(--fr-cream) !important; }
.bg-gold    { background-color: var(--fr-gold) !important; }
.bg-footer  { background-color: var(--fr-footer) !important; }
.bg-tc      { background-color: var(--fr-tc-strip) !important; }
.text-cream { color: var(--fr-cream) !important; }
.text-brown { color: var(--fr-brown) !important; }
.text-gold  { color: var(--fr-gold-deep) !important; }

/* ---- headings ("ENTER HERE", "Thank You", "Winners" ...) ---- */
.fr-heading {
  color: var(--fr-brown);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-weight: 700;
  text-align: center;
}
.fr-heading::after {
  content: "";
  display: block;
  width: 220px; max-width: 60%;
  height: 2px;
  margin: .75rem auto 0;
  background: var(--fr-brown);
  opacity: .5;
}
/* "ENTER HERE": light + smaller to match the mockup (font has one weight, so 700 = faux-bold) */
.fr-heading--wide { font-weight: 400; font-size: 2.2rem; letter-spacing: .12em; }
/* wide rule under "ENTER HERE" — spans the full form width, with more gap above it */
.fr-heading--wide::after { width: 100% !important; max-width: 100% !important; margin-top: 1.9rem; }
/* headings with no underline rule (e.g. FAQ) */
.fr-heading--no-rule::after { display: none !important; }
/* Section titles (FAQ / Terms): client brand font, lighter weight — overrides display-5's size.
   Fluid size so long single words ("CONDITIONS", "QUESTIONS") shrink to fit small
   phones instead of overflowing the screen (which cut the heading off + caused a
   right-hand margin). Caps out at 3.1rem so desktop is unchanged. */
.fr-heading.fr-heading--no-rule {
  font-family: var(--fr-font);
  font-weight: 400;
  font-size: clamp(1.7rem, 6vw, 3.1rem);
}
/* longer underline rule (e.g. Winners) */
.fr-heading--long::after { width: 360px !important; max-width: 75% !important; }
/* lighter heading (single-weight brand font — drops faux-bold), e.g. "Thank You" */
.fr-heading.fr-heading--light { font-weight: 400; }

/* ---- Thank You / success page ---- */
/* longer rule under "Thank You" (scoped to success so Winners' --long is untouched) */
.fr-success .fr-heading::after { width: 520px !important; max-width: 90% !important; }
/* TEMP PREVIEW (2026-08-27): message in the supplied Amoret brand font (renders ALL-CAPS).
   Revert to the body-sans block below when done previewing. */
.fr-success h3 {
  font-family: var(--fr-font);   /* Amoret brand font — caps only */
  font-weight: 400;
}
/* --- original (revert to this):
.fr-success h3 {
  font-family: var(--fr-font-body);
  text-transform: lowercase;
  font-weight: 300;
}
.fr-success h3::first-letter { text-transform: uppercase; }
--- */

/* Content column matches the "1 BUY / 2 KEEP / 3 ENTER" band in the header image
   (measured at 55.2% of image width, centred). Full width on mobile. */
@media (min-width: 768px) {
  .page-contents { width: 55vw; max-width: 100%; margin-inline: auto; }
}

/* ---- top corporate-style brand bar ---- */
.fr-topbar {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.fr-wordmark {
  font-family: var(--fr-font);
  color: var(--fr-brown);
  letter-spacing: .06em;
  line-height: .95;
  text-align: center;
  font-weight: 700;
}

/* ---- hero ---- */
header img { display: block; }

/* ---- entry form (white rounded inputs on gold) ---- */
.page-contents .form-label {
  color: var(--fr-brown);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .8rem;
  font-weight: 400;
  margin-bottom: .5rem;
}
.page-contents .form-control,
.page-contents .form-select {
  border: none;
  border-radius: 1.6rem;
  padding: .95rem 1.4rem;
  background: #fff;
  font-size: 1.05rem;
  font-family: var(--fr-font-body);   /* typed text / placeholders / options in normal case, not all-caps */
}
.page-contents .form-control:focus,
.page-contents .form-select:focus {
  box-shadow: 0 0 0 .2rem rgba(74,37,14,.25);
}
/* file upload dropzone — matches the hamilton field: square, dashed border */
.page-contents .file-uploader .file-upload {
  border: 1px dashed rgba(0, 0, 0, .2) !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  min-height: 100px !important;
  padding-top: 2.5rem !important;
  padding-bottom: 2.5rem !important;
  color: var(--fr-brown);
  /* plain sans so the prompt/filename aren't rendered in the all-caps brand font */
  font-family: var(--fr-font-body);
}
.page-contents .file-uploader .file-upload:hover {
  border-color: var(--fr-brown) !important;
}
/* upload hint ("Maximum upload size...") sits outside the label — keep it plain sans, not all-caps */
.page-contents .file-uploader p { font-family: var(--fr-font-body); }
.page-contents .file-uploader .file-upload .empty span { text-transform: none; }
.page-contents .file-uploader .file-upload .filename { display: none; text-transform: none; }
.page-contents .file-uploader .file-upload.has-file .empty { display: none !important; }
.page-contents .file-uploader .file-upload.has-file .filename { display: block !important; }
/* consent checkboxes */
/* vertically centre the checkbox against its consent text */
.page-contents .form-check { align-items: center; }
.page-contents .form-check-input { flex: 0 0 auto; width: 1.25em; height: 1.25em; margin-top: .1em; }
/* consent copy: plain sans (true lowercase) — must not render in the all-caps brand font */
.page-contents .form-check-label {
  color: var(--fr-brown);
  font-family: var(--fr-font-body);
  font-size: .85rem;
  line-height: 1.5;
  padding-top: 0;   /* override the shared template's pt-p6rem that pushed text below the box */
}

/* ---- submit button ("SUBMIT ENTRY") — overrides Bootstrap btn-light/text-dark ---- */
.page-contents button[type="submit"] {
  background: #894514 !important;
  border-color: #894514 !important;
  color: var(--fr-cream) !important;
  border-radius: 50rem;
  /* Flex-centre the label both axes; line-height:1 stops the caps-only brand font
     from sitting high in the line box. Vertical padding bumped so the pill keeps
     its original height with the tighter line-height. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 1.15rem 3rem;
  padding-top: 1.5rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 1.1rem !important;
}
.page-contents button[type="submit"]:hover {
  background: #6d360f !important;
  border-color: #6d360f !important;
  color: #fff !important;
}

/* ---- accordion (FAQs) ---- */
.page-contents .accordion { --bs-accordion-btn-focus-box-shadow: none; }
.page-contents .accordion-item { border-radius: 0 !important; border: 0 !important; }
.page-contents .accordion-button {
  color: #894514 !important;
  text-decoration: none !important;
  font-family: var(--fr-font-body);   /* mixed-case sans, not the all-caps brand font */
  font-weight: 700 !important;
  font-size: 1.1rem;
  padding: 1.15rem 1.5rem;
  background: #fff !important;
  box-shadow: none !important;
}
.page-contents .accordion-button:hover { color: #6d360f !important; }
/* solid circular +/- toggle (small) */
.page-contents .accordion-button::after {
  background-image: none !important;
  content: "+";
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #894514;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none !important;
  transition: none;
}
.page-contents .accordion-button:not(.collapsed)::after {
  content: "\2212"; /* minus sign */
}
.page-contents .accordion-body {
  color: #894514;
  font-family: var(--fr-font-body);   /* mixed-case sans for answer copy */
  padding: 0 1.5rem 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* ---- page-links nav (cream/white band below content) ---- */
.fr-pagenav { background: #fff; }
.fr-pagenav .nav-link {
  color: var(--fr-brown);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  font-size: 1rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.fr-pagenav .nav-link.active { text-decoration: underline; text-underline-offset: 4px; }

/* ---- Winners table (transparent, with column + row dividers) ---- */
.fr-winners {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  border: 1px solid rgba(110, 54, 18, .3);
  margin-bottom: 3rem;
}
.fr-winners thead th {
  background: #894514 !important;
  color: var(--fr-cream) !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  padding: .55rem 1.1rem;
  font-weight: 600;
  font-size: 1.4rem;
}
.fr-winners tbody td {
  text-align: center;
  color: var(--fr-brown);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(110, 54, 18, .3);
  font-size: 1.25rem;
}
/* vertical divider between the two columns */
.fr-winners tbody td:first-child { border-right: 1px solid rgba(110, 54, 18, .3); }

/* ---- Terms table ---- */
.fr-terms { width: 100%; border-collapse: collapse; }
.fr-terms th, .fr-terms td {
  border: 1px solid #000;
  padding: .8rem 1.1rem;
  text-align: left;
  vertical-align: top;
  color: #000;
  font-family: var(--fr-font-body);   /* mixed-case sans, not the all-caps brand font */
  font-weight: 400;
  font-size: 1rem;
}
.fr-terms th { width: 30%; }
.fr-terms-card { padding: 2.25rem; }

/* Full T&Cs prose inside the terms card (mixed-case, black, readable) */
.fr-terms-card p,
.fr-terms-card li,
.fr-terms-note { color: #000; font-family: var(--fr-font-body); font-weight: 400; font-size: 1rem; line-height: 1.55; }
.fr-terms-card ul,
.fr-terms-card ol { margin: .4rem 0 .8rem; padding-left: 1.6rem; }
.fr-terms-card ol > li { margin-bottom: .5rem; }
.fr-terms-card td > p:first-child { margin-top: 0; }
.fr-terms-card td > p:last-child,
.fr-terms-card td > ul:last-child,
.fr-terms-card td > ol:last-child { margin-bottom: 0; }
/* Nested "(a) (b) (c)" sub-clauses (e.g. the "You must not" list). */
.fr-terms-card ol.fr-terms-alpha { list-style: none; padding-left: 1.9rem; counter-reset: fr-alpha; margin-top: .5rem; }
.fr-terms-card ol.fr-terms-alpha > li { counter-increment: fr-alpha; position: relative; }
.fr-terms-card ol.fr-terms-alpha > li::before {
  content: "(" counter(fr-alpha, lower-alpha) ")";
  position: absolute; left: -1.9rem;
}
.fr-terms-h { color: #000; font-family: var(--fr-font-body); font-weight: 700;
  font-size: 1.15rem; margin: 1.75rem 0 .6rem; }
.fr-terms-note { margin: 1.5rem 0; }
.fr-terms--draws { font-size: .95rem; }
.fr-terms--draws th { width: auto; font-weight: 700; }

/* ---- T&Cs disclaimer strip ---- */
.fr-tc {
  background: #894514;
  color: var(--fr-cream);
  padding-top: 3.25rem;
  padding-bottom: 3.25rem;
}
/* legal fine print: plain sans (true lowercase), smaller — not the all-caps brand font */
.fr-tc p { font-family: var(--fr-font-body); font-size: .8rem; line-height: 1.7; margin: 0; }

/* ---- corporate footer band (Ferrero Rocher logo only; replicates the staging embed) ---- */
.fr-footer {
  position: relative;
  width: 100%;
  background: #2b1a15;   /* staging footer.footer background */
  color: var(--fr-cream);
}
/* Gold diamond notched into the top-centre edge — exact copy of staging's
   footer.footer::before (content/display added so it renders standalone). */
.fr-footer::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  transform: rotate(45deg) translate(-50%);
  background-color: #d5ac5b;
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 2;
}
.fr-footer--logo {
  max-width: 75px;
  margin: 0 auto;
  padding: 38px 0;
}
.fr-footer--logo img { display: block; width: 100%; height: auto; }
@media (min-width: 1024px) {
  .fr-footer--logo { max-width: 118px; padding: 40px 0 70px; }
}

a { color: var(--fr-brown-dark); }
a:hover { color: var(--fr-gold-deep); }

/* ============================================================
   Client feedback (TCG markups) — kept together, loaded last.
   ============================================================ */

/* [Entry] Required-field marker — theme was missing the shared "*" rule
   other promotions use. Fields still need `required` set in the form config. */
.page-contents label.required:after,
.page-contents .form-label.required:after,
.page-contents .form-check-label.required:after {
  content: " *" !important;
  color: var(--bs-red, #dc3545) !important;
}

/* [Entry] Header hero — "fit the whole image on screen" is REVERTED pending client
   confirmation. Hero stays full-width at its natural height (Bootstrap img-fluid.w-100
   on the <img> in header.html.twig). Re-add the fit-to-viewport rules here + the
   nav-height script in header.html.twig if the client confirms they want it. */

/* [Entry] Header → form anchor: clicking the hero scrolls to the form. The
   "ENTER HERE" heading sits ~100px above the form, so give the anchor enough
   scroll-margin that the jump lands with that heading in view (not scrolled past). */
#entry-form { scroll-margin-top: 8rem; }

/* [Entry] STATE (and other) selects were missing their dropdown arrow —
   the shared `background:#fff` wiped Bootstrap's caret. Restore it in brown. */
.page-contents .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236e3612' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 16px 12px;
  padding-right: 3rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* [Entry] File dropzone — highlight while a file is dragged over it
   (drag-and-drop is now wired in file-upload-handler.js). */
.page-contents .file-uploader .file-upload.dragover {
  border-color: var(--fr-brown) !important;
  background: #fff8ec !important;
}

/* [Entry] reCAPTCHA / submit row — breathing room above the control. */
.page-contents .g-recaptcha { margin-top: 1rem; }

/* [Form] Alert close (X) button — brown (same as the heading font) not black. */
.page-contents .alert .btn-close {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236e3612'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E");
  opacity: 1;
}

/* [Winners] More space above the table and below it. */
.fr-winners { margin-top: 2rem; margin-bottom: 4rem; }

/* [Winners] Mobile: the two-column layout is wider than a phone, so the second
   column was pushed off the right edge (cut off). Instead of shrinking the text,
   stack the table into a single full-width column so every winner reads at full
   size, one per row. The header bar + outer border are kept. */
@media (max-width: 767.98px) {
  .fr-winners,
  .fr-winners thead,
  .fr-winners tbody,
  .fr-winners tr { display: block; width: 100%; }
  .fr-winners thead th { display: block; }
  .fr-winners tbody td {
    display: block;
    width: 100%;
    border-right: 0;            /* no vertical divider in single-column mode */
    border-bottom: 1px solid rgba(110, 54, 18, .3);
  }
  /* The base layout gives every left-column cell a right divider (td:first-child);
     once stacked that leaves a stray vertical line on alternating rows, so clear it. */
  .fr-winners tbody td:first-child { border-right: 0; }
  /* Block cells don't border-collapse, so the last visible cell's divider would
     double up against the table's own bottom border. Drop the table bottom border
     instead and let each cell's divider draw every line — including between the two
     stacked cells of the final row, and the one that closes the table. */
  .fr-winners { border-bottom: 0; }
  /* The final row can have an empty second cell (odd winner count) — don't render
     it as a blank row. */
  .fr-winners tbody td:empty { display: none; }
}

/* [Terms] Left-column labels (Promoter, Promotional Period, …) heavier than
   the values in the right column. */
.fr-terms:not(.fr-terms--draws) th { font-weight: 700; }

/* [Terms] The wide 5-column draws table can't shrink below ~540px, so on any
   screen narrower than that it used to overflow the page. Wrap it in a horizontal
   scroll container (.fr-terms-scroll in the Terms HTML) so it scrolls on its own
   instead of breaking the layout — works at every width, no breakpoint guessing. */
.fr-terms-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .5rem 0 1rem; }
.fr-terms-scroll .fr-terms--draws { margin-bottom: 0; }
/* Fixed layout makes the summary cells respect the table width, so the draws
   scroll-wrapper inside a value cell stays bounded (and scrolls) at every width
   instead of stretching the cell — otherwise the whole table overflows the card.
   Label column narrowed to 24% so the draws table (headers wrapping) fits the value
   cell on desktop without a scrollbar, and only scrolls once the screen is small. */
.fr-terms:not(.fr-terms--draws) { table-layout: fixed; }
.fr-terms:not(.fr-terms--draws) th { width: 22%; }
/* break-word wraps long tokens (e.g. URLs) inside the fixed cells, but — unlike
   `anywhere` — does NOT shrink the nested draws table's min-width (which inherits
   overflow-wrap), so its headers wrap word-by-word and it scrolls when too narrow
   instead of crushing letter-by-letter. */
.fr-terms:not(.fr-terms--draws) td { overflow-wrap: break-word; }
/* Draws table: keep its original styling — only reset inherited wrapping so words
   stay whole, and use a compact font/padding so it fits the content column and
   scrolls (in its wrapper) rather than overflowing on small screens. */
.fr-terms--draws th, .fr-terms--draws td {
  overflow-wrap: normal; word-break: normal;
  font-size: .82rem; padding: .5rem .6rem;
}
/* Floor so it scrolls (in its wrapper) rather than compressing to an unreadable
   stack on very narrow screens. */
.fr-terms--draws { min-width: 380px; }

/* [Terms] Mobile: stack the 2-column summary table (label above value) for
   readability, shrink the draws table's text, and tighten the card padding. */
@media (max-width: 767.98px) {
  .fr-terms-card { padding: 1.25rem; }
  /* 2-column summary table: stack label above value. Scope to the summary's OWN
     rows/cells with child combinators — a plain descendant selector also matches
     the draws table nested inside a value cell and collapses it into one column. */
  .fr-terms:not(.fr-terms--draws) > tbody > tr { display: block; border-bottom: 1px solid #000; }
  .fr-terms:not(.fr-terms--draws) > tbody > tr:last-child { border-bottom: 0; }
  .fr-terms:not(.fr-terms--draws) > tbody > tr > th,
  .fr-terms:not(.fr-terms--draws) > tbody > tr > td { display: block; width: 100% !important; }
  .fr-terms:not(.fr-terms--draws) > tbody > tr > th { border-bottom: 0; font-weight: 700; }
  /* Draws table: keep its natural layout — just lessen the width (smaller font +
     let the wordy headers wrap) so it fits the phone without a horizontal scroll.
     Dates are single tokens so they stay on one line. Fits ~360px+ phones; the
     scroll wrapper stays as a graceful fallback for tiny (<=320px) screens. */
  .fr-terms--draws { min-width: 0; }
  .fr-terms--draws th, .fr-terms--draws td {
    font-size: .66rem; padding: .3rem .25rem; white-space: normal;
  }
}

/* [Thank you] Constrain the message width so the second line doesn't run
   wider than the first, and give it side padding on mobile. */
.fr-success h3 { max-width: 34ch; margin-inline: auto; padding-inline: 1rem; }
@media (max-width: 767.98px) {
  .fr-success { padding-inline: 1rem; }
  .fr-success h3 { padding-inline: 1.5rem; }
}

/* ============================================================
   [Global] Readability (client feedback: mobile 2026-09-14, desktop 2026-09-17)
   — body copy a touch larger and heavier so it's easier to read. Originally
   scoped to the phone breakpoint; the client then asked for the desktop version
   to match, so these now apply at ALL widths (media query removed).
   ============================================================ */
/* Form field labels — the small uppercase caption text was hardest to read. */
.page-contents .form-label { font-size: .95rem; font-weight: 600; }
/* Typed input + dropdown text (incl. the date-of-birth field). */
.page-contents .form-control,
.page-contents .form-select { font-size: 1.1rem; }
/* Consent / opt-in copy. */
.page-contents .form-check-label { font-size: .95rem; font-weight: 500; line-height: 1.55; }
/* Upload hint + dropzone prompt. */
.page-contents .file-uploader p,
.page-contents .file-uploader .file-upload { font-size: 1rem; }
/* FAQ questions + answers. */
.page-contents .accordion-button { font-size: 1.15rem; }
.page-contents .accordion-body { font-size: 1.05rem; }
/* Page-navigation links. */
.fr-pagenav .nav-link { font-size: 1.05rem; }
/* Legal fine-print strip. */
.fr-tc p { font-size: .9rem; font-weight: 500; line-height: 1.75; }
/* Terms prose. */
.fr-terms-card p,
.fr-terms-card li,
.fr-terms-note { font-size: 1.05rem; }
