/* ==========================================================================
   ItaliaPass Members Hotel Request: styles

   Colours, type, radii and spacing match italiapass.com (taken from the live
   site's computed styles, November 2026). If the main site changes, update
   the "Brand tokens" block below. Everything else reads from it.
   ========================================================================== */

:root {
  /* --- Brand tokens -------------------------------------------------------- */

  /* italiapass.com uses "Neue Haas Grotesk Display Pro", a licensed font that
     isn't loaded here (see docs/STYLING.md). Helvetica Neue / Helvetica /
     Arial are the closest system fonts, so visitors who don't have it see
     those, with no download and no third-party font service. */
  --ip-font-body: "Neue Haas Grotesk Display Pro", "Helvetica Neue", Helvetica,
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ip-font-heading: var(--ip-font-body);

  /* Brand colours (italiapass.com) */
  --ip-red: #ef444d;                       /* All primary buttons */
  --ip-red-hover: #d9363f;                 /* Derived: slightly darker red */
  --ip-red-light: #fac1c4;
  --ip-amber: #f79e1b;                     /* Prices, highlights */
  --ip-amber-10: rgba(247, 158, 27, 0.10);
  --ip-amber-24: rgba(247, 158, 27, 0.24); /* Highlight chips */
  --ip-green: #074c2b;                     /* Text links, accents */
  --ip-green-light: #e9f1ec;

  /* Text */
  --ip-color-text: #111111;
  --ip-color-heading: #0b0d0f;
  --ip-color-text-muted: #6a7282;

  /* Surfaces and lines */
  --ip-color-bg: #ffffff;
  --ip-color-surface: #fafafa;             /* Soft section background */
  --ip-color-surface-2: #f8f8f8;           /* Read-only fields */
  --ip-color-border: #e5e5e5;              /* Default 1px divider */
  --ip-color-border-soft: #f5f5f5;         /* Card border */
  --ip-color-border-mid: #b8b8b8;
  --ip-color-header-line: rgba(0, 0, 0, 0.1);
  /* Input borders are a little darker than the site's #b8b8b8 so form fields
     meet the WCAG 3:1 contrast rule for controls. */
  --ip-color-input-border: #949494;

  /* Roles: what each colour is used for on this form */
  --ip-color-primary: var(--ip-red);
  --ip-color-primary-hover: var(--ip-red-hover);
  --ip-color-primary-text: #ffffff;
  --ip-color-link: var(--ip-green);
  --ip-color-selected: var(--ip-green);    /* Chosen radio options, ticks */
  --ip-color-focus: var(--ip-green);       /* Keyboard focus ring */
  --ip-color-required: var(--ip-red);

  /* Form messages (the main site has no form errors to copy from) */
  --ip-color-error: #b42318;
  --ip-color-error-bg: #fef3f2;

  /* Radii (italiapass.com) */
  --ip-radius-chip: 5.6px;                 /* Highlight chips */
  --ip-radius-sm: 8px;                     /* Inputs, notices */
  --ip-radius-card: 12px;                  /* Hotel cards */
  --ip-radius-lg: 16px;                    /* Sections */
  --ip-radius-button: 36px;                /* Standard buttons */

  --ip-logo-height: 32px;

  /* --- Layout --------------------------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --content-width: 48rem;                  /* The form column */
  --header-top-space: 14px;                /* Space above the logo */
  --logo-gap: 24px;                        /* Logo to content: one 24px line */
  --control-height: 3rem;                  /* Inputs: 48px */
  --button-height: 54px;                   /* Buttons, as on the site */
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ip-color-bg);
  color: var(--ip-color-text);
  font-family: var(--ip-font-body);
  font-size: 1rem;
  line-height: 1.5;                        /* 16px / 24px */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-3);
  color: var(--ip-color-heading);
  font-family: var(--ip-font-heading);
  font-weight: 500;
  line-height: 1.25;
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--ip-color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ip-color-focus);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 30;
  padding: var(--space-2) var(--space-4);
  background: var(--ip-color-bg);
  border: 2px solid var(--ip-color-focus);
  border-radius: var(--ip-radius-sm);
}

.skip-link:focus {
  top: var(--space-2);
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* --------------------------------------------------------------------------
   Header and footer
   Both use the same .container as the form, so the logo and footer line up
   with the left edge of the content on every screen size.
   -------------------------------------------------------------------------- */

/* The header scrolls away with the page (not pinned to the top). */
.site-header {
  background: var(--ip-color-bg);
}

.site-header__inner {
  display: flex;
  align-items: center;
  padding-top: var(--header-top-space);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  color: var(--ip-color-text);
  font-size: 1.25rem;
  font-weight: 500;
  text-decoration: none;
}

.site-logo img {
  display: block;
  height: var(--ip-logo-height);
  width: auto;
}

.site-footer {
  margin-top: var(--space-7);
  padding: 40px 0;
  background: var(--ip-color-bg);
  border-top: 1px solid var(--ip-color-border);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: space-between;
  align-items: center;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  color: var(--ip-color-text);
  font-weight: 500;
}

.site-footer__copy {
  margin: 0;
  color: var(--ip-color-text-muted);
}

/* --------------------------------------------------------------------------
   Page, intro, notices
   -------------------------------------------------------------------------- */

/* The gap between the logo and the first line of content */
.page {
  padding-top: var(--logo-gap);
}

.page-title {
  font-size: clamp(1.875rem, 4vw, 2.625rem);   /* up to 42px, as the site's H1 */
  font-weight: 500;
}

.intro {
  margin-bottom: var(--space-6);
}

/* Styled like the site's highlight chips ("Free", "1st class") */
.intro__eyebrow {
  display: inline-block;
  margin-bottom: var(--space-4);
  padding: 4px 8px;
  background: var(--ip-amber-24);
  border-radius: var(--ip-radius-chip);
  color: var(--ip-color-text);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.intro__title {
  max-width: 22ch;
  font-size: clamp(2rem, 5vw, 2.625rem);       /* 42px / 52.5px on desktop */
  font-weight: 500;
  line-height: 1.25;
}

.intro__lede {
  max-width: 60ch;
  font-size: 1.125rem;                         /* 18px / 28px, like section subtitles */
  line-height: 1.55;
}

.callout {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  background: var(--ip-amber-10);
  border: 1px solid var(--ip-amber-24);
  border-radius: var(--ip-radius-sm);
}

.callout p {
  margin: 0;
}

.intro__points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.intro__points li {
  position: relative;
  padding-left: 1.75rem;
}

.intro__points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ip-green);
  font-weight: 700;
}

.intro__points li + li {
  margin-top: var(--space-2);
}

.notice {
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px solid;
  border-radius: var(--ip-radius-sm);
}

.notice p {
  margin: 0;
}

.notice--warning {
  background: var(--ip-amber-10);
  border-color: var(--ip-amber-24);
}

.notice--error {
  background: var(--ip-color-error-bg);
  border-color: var(--ip-color-error);
  color: var(--ip-color-error);
}

.error-summary {
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--ip-color-error-bg);
  border: 1px solid var(--ip-color-error);
  border-radius: var(--ip-radius-sm);
}

.error-summary__title {
  color: var(--ip-color-error);
  font-size: 1.125rem;
  font-weight: 700;
}

.error-summary__list {
  margin: 0;
  padding-left: 1.25rem;
}

.error-summary__list a {
  color: var(--ip-color-error);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Sections (soft grey cards, like the site's product and comparison areas)
   -------------------------------------------------------------------------- */

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.section {
  margin-bottom: var(--space-5);
  padding: var(--space-6);
  background: var(--ip-color-surface);
  border: 1px solid var(--ip-color-border-soft);
  border-radius: var(--ip-radius-lg);
}

.section__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  float: left;            /* keeps the legend inside the box in all browsers */
  width: 100%;
  margin-bottom: var(--space-5);
  color: var(--ip-color-heading);
  font-family: var(--ip-font-heading);
  font-size: 1.25rem;     /* 20px / 26px / 700, like the site's card titles */
  font-weight: 700;
  line-height: 1.3;
}

.section__title + * {
  clear: both;
}

.section__num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ip-amber-24);
  color: var(--ip-color-text);
  font-size: 0.9375rem;
  font-weight: 500;
}

.section__hint {
  color: var(--ip-color-text-muted);
}

.subgroup {
  margin-top: var(--space-2);
}

.subgroup__title {
  margin-bottom: var(--space-3);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Fields
   -------------------------------------------------------------------------- */

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0 var(--space-4);
}

.row--3 {
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.row--5 {
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
}

.field {
  margin-bottom: var(--space-4);
}

.field > label,
.choice-group > legend {
  display: block;
  margin-bottom: 6px;
  color: var(--ip-color-text);
  font-size: 0.9375rem;     /* 15px */
  font-weight: 500;
}

.req {
  color: var(--ip-color-required);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  min-height: var(--control-height);
  padding: 0.625rem 0.875rem;
  background: var(--ip-color-bg);
  color: var(--ip-color-text);
  border: 1px solid var(--ip-color-input-border);
  border-radius: var(--ip-radius-sm);
  font: inherit;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--ip-color-text-muted);
  opacity: 1;
}

input[readonly] {
  background: var(--ip-color-surface-2);
  border-color: var(--ip-color-border-mid);
  border-style: dashed;
  color: var(--ip-color-text);
  cursor: default;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ip-color-focus);
  outline-offset: 1px;
  border-color: var(--ip-color-focus);
}

.field-hint {
  margin: var(--space-1) 0 0;
  color: var(--ip-color-text-muted);
  font-size: 0.875rem;
}

.field-error {
  margin: var(--space-1) 0 0;
  color: var(--ip-color-error);
  font-size: 0.875rem;
  font-weight: 500;
}

.has-error input:not([type="radio"]):not([type="checkbox"]),
.has-error select,
.has-error textarea {
  border-color: var(--ip-color-error);
  box-shadow: 0 0 0 1px var(--ip-color-error);
}

.field__other {
  margin-top: var(--space-2);
}

/* Checkbox rows */
.field--check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-1) var(--space-3);
  align-items: start;
}

.field--check input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.125rem 0 0;
  accent-color: var(--ip-color-selected);
}

.field--check > label {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.field--check .field-error {
  grid-column: 2;
}

.has-error.field--check input[type="checkbox"] {
  outline: 2px solid var(--ip-color-error);
  outline-offset: 2px;
}

/* Radio options shown as pills */
.choice-group__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;      /* 44px touch target */
  padding: 0 var(--space-4);
  background: var(--ip-color-bg);
  border: 1px solid var(--ip-color-input-border);
  border-radius: 999px;
  font-size: 0.9375rem;
}

.choice:hover span {
  border-color: var(--ip-color-selected);
}

.choice input:checked + span {
  background: var(--ip-color-selected);
  border-color: var(--ip-color-selected);
  color: #ffffff;
  font-weight: 500;
}

.choice input:checked + span::before {
  content: "✓";
  margin-right: var(--space-2);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--ip-color-focus);
  outline-offset: 2px;
}

.has-error .choice span {
  border-color: var(--ip-color-error);
}

/* Spam trap: off-screen, not display:none (some bots skip hidden fields) */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Hotels (white cards inside the grey section)
   -------------------------------------------------------------------------- */

.hotels {
  display: grid;
  gap: var(--space-4);
}

.hotel-card {
  padding: var(--space-5);
  background: var(--ip-color-bg);
  border: 1px solid var(--ip-color-border);
  border-radius: var(--ip-radius-card);
}

.hotel-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.hotel-card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}

.hotel-card .field:last-child {
  margin-bottom: 0;
}

.hotels__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-5);
}

.hotels__footer .field-hint {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Buttons (italiapass.com: 54px tall, 36px radius, 16px / 600)
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--button-height);
  padding: 11px 24px;
  border: 1px solid var(--ip-color-primary);
  border-radius: var(--ip-radius-button);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button--primary {
  background: var(--ip-color-primary);
  color: var(--ip-color-primary-text);
}

.button--primary:hover:not(:disabled) {
  background: var(--ip-color-primary-hover);
  border-color: var(--ip-color-primary-hover);
}

.button--secondary {
  background: var(--ip-color-bg);
  color: var(--ip-color-primary);
}

.button--secondary:hover {
  background: rgba(239, 68, 77, 0.06);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Small text links, like the site's green underlined links */
.link-button {
  min-height: 2.75rem;
  padding: 0 var(--space-2);
  background: none;
  border: 0;
  color: var(--ip-color-link);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.link-button:hover {
  text-decoration-thickness: 2px;
}

.form-footer {
  display: grid;
  justify-items: start;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.form-footer__note,
.form-footer__legend {
  margin: 0;
  color: var(--ip-color-text-muted);
}

.form-footer__legend {
  font-size: 0.875rem;
}

.form-footer .button--primary {
  min-width: 16rem;
}

/* --------------------------------------------------------------------------
   Confirmation (soft green panel)
   -------------------------------------------------------------------------- */

.confirmation {
  margin-top: 0;
  padding: var(--space-6);
  background: var(--ip-green-light);
  border-radius: var(--ip-radius-lg);
}

.confirmation:focus {
  outline: none;
}

.confirmation__lead {
  font-size: 1.25rem;
  font-weight: 500;
}

.confirmation strong {
  display: inline-block;
  padding: 2px 8px;
  background: var(--ip-amber-24);
  border-radius: var(--ip-radius-chip);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.confirmation .button {
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   Small screens (the site's mobile breakpoint is 767px)
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .section {
    padding: var(--space-5) var(--space-4);
    border-radius: var(--ip-radius-card);
  }

  .hotel-card {
    padding: var(--space-4);
  }

  .confirmation {
    padding: var(--space-5) var(--space-4);
  }

  .form-footer .button--primary {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
