/* ============================================================
   END 2026 — Spune-ne povestea – Cel mai bun prieten câștigă
   Route: /cel-mai-bun-prieten-castiga   View: end2026/index   Prefix: e26-
   ============================================================ */

/* ----- Font faces -----
   Only the .otf files contain ă, ș and ț (the Gotham-Bold .woff/.woff2 lack them). */
@font-face {
  font-family: 'Gotham Bold';
  src: url('../fonts/Gotham-Bold.otf') format('opentype');
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gotham';
  src:
    url('../fonts/Gotham-Book.woff2') format('woff2'),
    url('../fonts/Gotham-Book.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ----- Global menu: same overrides as the other campaign pages ----- */
.menu-main a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-decoration: none;
}
.menu-main a:hover {
  text-decoration: underline;
}
button.menu-toggle:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================================
   PAGE
   ============================================================ */
.e26 {
  --e26-blue: #00689e; /* form text, borders, button, consume bar */
  --e26-heading: #005d97; /* "NE GĂSIȚI ȘI PE:" */
  --e26-yellow: #f7df0d;
  --e26-grey: #959595;
  --e26-error: #c8102e;

  /* The form column is 782px wide in the 1920px design and 358px in the 393px one, with the
     same proportions, so every form size is "design px × --e26-u".
     Phones: full width minus 17px gutters. Tablets/laptops: 600px. Wide: 41vw, up to 782px. */
  --e26-fw: min(calc(100vw - 34px), max(600px, 41vw), 782px);
  --e26-u: calc(var(--e26-fw) / 782);

  display: block;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Keyboard focus: the global app.css removes the outline from a:focus */
.e26 a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.e26-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ============================================================
   HERO + PRIZES (baked images, never cropped)
   ============================================================ */
.e26-hero,
.e26-prizes {
  position: relative;
}

.e26-hero picture,
.e26-prizes picture {
  display: block;
}

.e26-img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  border: 0;
}

.e26-hero {
  background-color: var(--e26-yellow);
}

/* ============================================================
   FORM
   ============================================================ */
.e26-form-section {
  padding-top: calc(46 * var(--e26-u));
}

.e26-form-wrap {
  width: var(--e26-fw);
  max-width: calc(100% - 34px);
  margin: 0 auto;
}

.e26-form {
  margin: 0;
}

/* Keep focused fields / the thank-you box clear of the fixed global header when the
   browser scrolls them into view (first invalid field, success message). */
.e26-input,
.e26-check input,
.e26-thanks {
  scroll-margin-top: 100px;
}

.e26-field {
  margin: 0 0 calc(19 * var(--e26-u));
}
.e26-field--story {
  margin-top: calc(22 * var(--e26-u)); /* collapses with the 19u above: 22u before the story box */
  margin-bottom: 0;
}

.e26-input {
  display: block;
  width: 100%;
  height: calc(101 * var(--e26-u));
  min-height: 44px; /* tap target on small phones */
  margin: 0;
  /* 4u of bottom padding moves the vertically centred text up by 2u (Gotham sits low) */
  padding: 0 calc(41 * var(--e26-u)) calc(4 * var(--e26-u));
  border: max(2px, calc(4 * var(--e26-u))) solid var(--e26-blue);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  color: var(--e26-blue);
  font-family: 'Gotham Bold', sans-serif;
  font-size: max(16px, calc(34.8 * var(--e26-u))); /* >= 16px: no iOS zoom on focus */
  font-weight: normal;
  line-height: 1.2;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.e26-input::placeholder {
  color: var(--e26-blue);
  opacity: 1;
}
.e26-input::-webkit-input-placeholder {
  color: var(--e26-blue);
  opacity: 1;
}

.e26-input:focus-visible {
  outline: 2px solid var(--e26-blue);
  outline-offset: 2px;
}

.e26-input[aria-invalid='true'] {
  border-color: var(--e26-error);
}

.e26-textarea {
  height: calc(272 * var(--e26-u));
  min-height: calc(272 * var(--e26-u));
  padding-top: calc(20 * var(--e26-u));
  padding-bottom: calc(16 * var(--e26-u));
  line-height: 1.25;
  overflow: auto;
  resize: vertical;
}

/* Per-field errors (filled from the 422 response) */
.e26-err {
  display: block;
  margin-top: max(4px, calc(8 * var(--e26-u)));
  color: var(--e26-error);
  font-family: 'Gotham Bold', sans-serif;
  font-size: max(13px, calc(18 * var(--e26-u)));
  line-height: 1.3;
}
.e26-err:empty {
  display: none;
}

/* ----- Checkboxes (custom squares; the real input sits on top, invisible) ----- */
.e26-checks {
  /* label size, also used by the checkbox errors so they're never bigger than the label */
  --e26-label-fs: max(12px, calc(16.1 * var(--e26-u)));
  margin-top: max(18px, calc(27.5 * var(--e26-u)));
}

@media (min-width: 768px) {
  .e26-checks {
    --e26-label-fs: max(15px, calc(16.1 * var(--e26-u)));
  }
}

.e26-check-field + .e26-check-field {
  margin-top: max(19px, calc(21 * var(--e26-u)));
}

.e26-check-row {
  position: relative;
  z-index: 0; /* own stacking context for the hit area below */
  display: flex;
  align-items: center;
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

/* Taller hit area (at least 44px) without changing the layout; sits under the row's content
   so the rules link stays clickable. */
.e26-check-row::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 0;
  right: 0;
  height: max(44px, 100%);
  transform: translateY(-50%);
}

.e26-check {
  position: relative;
  flex: 0 0 auto;
  width: max(30px, calc(40 * var(--e26-u)));
  height: max(30px, calc(40 * var(--e26-u)));
  margin-right: max(12px, calc(18 * var(--e26-u)));
}

.e26-check input {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.e26-check-box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border: max(2px, calc(4 * var(--e26-u))) solid var(--e26-blue);
  background: #fff;
  pointer-events: none;
}

.e26-check input:checked + .e26-check-box::after {
  content: '';
  position: absolute;
  left: 34%;
  top: 12%;
  width: 30%;
  height: 58%;
  border: solid var(--e26-blue);
  border-width: 0 max(3px, calc(5 * var(--e26-u))) max(3px, calc(5 * var(--e26-u))) 0;
  transform: rotate(45deg);
}

.e26-check input:focus-visible + .e26-check-box {
  outline: 2px solid var(--e26-blue);
  outline-offset: 2px;
}

.e26-check input[aria-invalid='true'] + .e26-check-box {
  border-color: var(--e26-error);
}

.e26-check-label {
  display: block;
  margin: 0;
  color: var(--e26-blue);
  font-family: 'Gotham Bold', sans-serif;
  font-size: var(--e26-label-fs);
  font-weight: normal;
  /* extra space between lines keeps Chrome's touch adjustment from moving taps on the text
     onto the rules link of the next line */
  line-height: 1.5;
}

.e26-check-label a {
  color: inherit;
  text-decoration: underline;
  white-space: nowrap;
}
.e26-check-label a:hover,
.e26-check-label a:focus {
  color: var(--e26-heading);
}

/* Checkbox errors line up with the label text, at the label's size */
.e26-check-field .e26-err {
  font-size: var(--e26-label-fs);
  padding-left: calc(max(30px, calc(40 * var(--e26-u))) + max(12px, calc(18 * var(--e26-u))));
}

/* ----- General message (above the button) ----- */
.e26-form-msg {
  margin: max(18px, calc(30 * var(--e26-u))) 0 0;
  color: var(--e26-error);
  font-family: 'Gotham Bold', sans-serif;
  font-size: max(14px, calc(20 * var(--e26-u)));
  line-height: 1.3;
  text-align: center;
}

/* ----- Submit ----- */
.e26-submit {
  display: block;
  width: 100%;
  height: calc(97 * var(--e26-u));
  min-height: 44px; /* tap target on small phones */
  margin: max(18px, calc(37 * var(--e26-u))) 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: var(--e26-blue);
  color: var(--e26-yellow);
  font-family: 'Gotham Bold', sans-serif;
  font-size: calc(46.5 * var(--e26-u));
  font-weight: normal;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.e26-form-msg:not([hidden]) + .e26-submit {
  margin-top: max(12px, calc(20 * var(--e26-u)));
}

.e26-submit:hover {
  background-color: var(--e26-heading);
}

.e26-submit:focus:not(:focus-visible) {
  outline: none;
}
.e26-submit:focus-visible {
  outline: 2px solid var(--e26-blue);
  outline-offset: 2px;
}

.e26-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ----- Thank-you message (replaces the form) ----- */
.e26-thanks {
  padding: calc(60 * var(--e26-u)) calc(41 * var(--e26-u));
  border: max(2px, calc(4 * var(--e26-u))) solid var(--e26-blue);
  text-align: center;
}
.e26-thanks:focus {
  outline: none;
}

.e26-thanks-msg {
  margin: 0;
  color: var(--e26-blue);
  font-family: 'Gotham Bold', sans-serif;
  font-size: max(18px, calc(34.8 * var(--e26-u)));
  line-height: 1.25;
}

/* ----- "Still processing" note (after 8s of waiting) -----
   Always rendered (a live region that is never display:none, so screen readers announce the text
   when it's added); empty = no box. Drawn over the loading overlay, which the JS shows with
   z-index 2147483646, just under the overlay's spinner (max 120px, centred). */
.e26-wait {
  position: fixed;
  z-index: 2147483647;
  top: calc(50% + 76px);
  left: 50%;
  width: max-content;
  max-width: calc(100vw - 34px);
  margin: 0;
  transform: translateX(-50%);
  color: var(--e26-blue);
  font-family: 'Gotham Bold', sans-serif;
  font-size: max(16px, calc(24 * var(--e26-u)));
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
}
.e26-wait:not(:empty) {
  padding: 10px 16px;
  background: #fff;
}

/* ============================================================
   SOCIAL
   ============================================================ */
.e26-social {
  --e26-icon: calc(62 * var(--e26-u)); /* drawn size, as in the design */
  --e26-tap: max(40px, var(--e26-icon)); /* tap target */
  --e26-pad: calc((var(--e26-tap) - var(--e26-icon)) / 2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: calc(85 * var(--e26-u)) 17px max(20px, calc(68 * var(--e26-u)));
}

.e26-social-label {
  margin-right: max(4px, calc(25 * var(--e26-u) - var(--e26-pad)));
  color: var(--e26-heading);
  font-family: 'Gotham Bold', sans-serif;
  font-size: max(12px, calc(24 * var(--e26-u)));
  line-height: 1.2;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.e26-social-icons {
  display: flex;
  align-items: center;
}

.e26-social-icon {
  display: block;
  box-sizing: border-box;
  width: var(--e26-tap);
  height: var(--e26-tap);
  padding: var(--e26-pad);
  border-radius: 50%;
}
.e26 .e26-social-icon:focus-visible {
  outline: 3px solid var(--e26-blue);
  outline-offset: 2px;
}
.e26-social-icon + .e26-social-icon {
  margin-left: max(0px, calc(17 * var(--e26-u) - 2 * var(--e26-pad)));
}

.e26-social-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================================
   RESPONSIBLE DRINKING + FOOTER
   ============================================================ */
.e26-responsible {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: max(32px, calc(60 * var(--e26-u)));
  padding: 8px 17px;
  background-color: var(--e26-blue);
}

.e26-responsible img {
  display: block;
  width: max(230px, calc(460 * var(--e26-u)));
  max-width: 100%;
  height: auto;
}

.e26-footer {
  padding: max(10px, calc(30 * var(--e26-u))) 17px;
  background-color: var(--e26-grey);
  text-align: center;
}

.e26-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px max(18px, calc(52 * var(--e26-u)));
}

.e26-footer-links a,
.e26-footer-links span {
  color: #fff;
  font-size: max(12px, calc(17 * var(--e26-u)));
  line-height: 1.3;
  text-decoration: none;
}

.e26-footer-links a {
  font-family: 'Gotham Bold', sans-serif;
}
.e26-footer-links a:hover,
.e26-footer-links a:focus {
  color: #fff;
  text-decoration: underline;
}

.e26-footer-links span {
  font-family: 'Gotham', sans-serif;
  color: #ededed;
}
