/*
 * ENS Notify Banner - v4
 * CCPA Consent Management
 * consent.irvinecompany.com/irvinemanagementcompany/prod_v4/Bootstrap.js
 * Last Updated: 2026-03-31
 */

/*----------------------------------------------------------------------------
>>> TABLE OF CONTENTS:
------------------------------------------------------------------------------
1.0 # CSS Variables
2.0 # Banner Base Styles
3.0 # Typography
4.0 # Layout & Positioning
5.0 # Interactive Elements
6.0 # Media Queries
------------------------------------------------------------------------------ */

/*============================================================================
1.0 # CSS Variables
============================================================================== */
:root {
  /* Typography */
  --banner-font-family: 'Montserrat', sans-serif;
  --banner-font-size: 0.9375rem; /* 15px */
  --banner-title-size: 1.602rem; /* 25.63px */
  --banner-title-weight: 600;
  --banner-line-height: 1.5;
  --banner-button-font-size: 0.9375rem;
  --banner-button-font-weight: 600;
  --banner-button-line-height: 1.5;

  /* Mobile Typography */
  --banner-font-size-mobile: 0.75rem; /* 12px */
  --banner-line-height-mobile: 1.375;
  --banner-title-size-mobile: 1.375rem; /* 22px */

  /* Colors */
  --banner-background-color: #fff;
  --banner-text-color: #000;
  --ens-brand-color: #DA291C;
  --banner-button-text-color: #fff;
  --banner-reject-background: none;
  --banner-reject-color: inherit;

  /* Layout */
  --banner-z-index: 9999;

  /* Spacing */
  --banner-padding: 1.25em; /* 20px */
  --banner-padding-mobile: 1.2em; /* 19.2px */
  --banner-title-margin-mobile: 0.5em;

  /* Components */
  --banner-border-top: 1px solid #000;
  --banner-box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.54);
  --banner-button-border-radius: 0;
  --banner-button-padding: 0.75em 4em; /* 12px 64px */
  --banner-button-padding-mobile: 1em 3em;
  --banner-link-decoration: underline;
}

/*============================================================================
2.0 # Banner Base Styles
============================================================================== */

.page #ensNotifyBanner {
  position: fixed;
  z-index: var(--banner-z-index);
  bottom: 0;
  left: 0;
  right: 0;

  width: 100%;
  max-width: 100%;
  padding: var(--banner-padding)!important;

  background: var(--banner-background-color);
  color: var(--banner-text-color);

  border-top: var(--banner-border-top);
  border-radius: 0;
  box-shadow: var(--banner-box-shadow);
}

/*============================================================================
3.0 # Typography
============================================================================== */

.page #ensNotifyBanner,
.page #ensNotifyBanner p {
  font-family: var(--banner-font-family);
  font-size: var(--banner-font-size);
  font-weight: 500;
  line-height: var(--banner-line-height);
}

.page #ensNotifyBanner .ensTitle {
  font-family: var(--banner-font-family);
  font-size: var(--banner-title-size)!important;
  font-weight: var(--banner-title-weight);
  text-align: center;
}

.page #ensNotifyBanner .ensToggleLabel {
  margin-bottom: .5rem;
}

.page #ensNotifyBanner button {
  font-weight: var(--banner-button-font-weight);
  line-height: var(--banner-button-line-height);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page #ensNotifyBanner p a {
  font-size: var(--banner-font-size);
  text-decoration: var(--banner-link-decoration);
  color: var(--ens-brand-color);
  cursor: pointer;
}

.page #ensRejectAll {
  font: inherit;
}

/*============================================================================
4.0 # Layout & Positioning
============================================================================== */

.page #ensNotifyBanner .ensButtons {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 0;
  text-align: right;
}

#ensNotifyBanner .ensToggleRow {
  margin-bottom: 0;
}

/*============================================================================
5.0 # Interactive Elements
============================================================================== */

/* Base Button Styles */
.page #ensNotifyBanner button {
  display: flex;
  justify-content: center;
  align-items: center;
  height: unset;
  margin-left: 0;
  padding: var(--banner-button-padding);
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
}

.page #ensNotifyBanner button:hover {
  background: none;
  color: var(--ens-brand-color);
  border-color: var(--ens-brand-color);
}

/* Accept & Close Buttons */
.page #ensNotifyBanner #ensAcceptAll,
.page #ensNotifyBanner #ensCloseBanner {
  background: var(--ens-brand-color);
  color: var(--banner-button-text-color);
  border: 1px solid var(--ens-brand-color);
  border-radius: var(--banner-button-border-radius);
  transition: 0.2s ease-in-out;
}

.page #ensNotifyBanner #ensCloseBanner:hover {
  background: none;
  color: var(--ens-brand-color);
}

/* Reject Button */
.page #ensRejectAll {
  background: var(--banner-reject-background);
  border: none;
  color: var(--banner-reject-color);
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

/*============================================================================
6.0 # Media Queries
============================================================================== */

@media (max-width: 600px) {
  /* Typography */
  .page #ensNotifyBanner,
  .page #ensNotifyBanner p,
  .page #ensNotifyBanner p a {
    font-size: var(--banner-font-size-mobile);
    line-height: var(--banner-line-height-mobile);
  }

  .page #ensNotifyBanner .ensTitle {
    font-size: var(--banner-title-size-mobile)!important;
    margin-bottom: var(--banner-title-margin-mobile);
  }

  /* Layout */
  .page #ensNotifyBanner {
    padding: var(--banner-padding-mobile)!important;
  }

  .page #ensNotifyBanner .ensButtons {
    height: unset;
    margin-top: 0;
    padding-top: var(--banner-button-padding-mobile);
    text-align: center;
  }

  /* Buttons */
  .page #ensNotifyBanner #ensAcceptAll,
  .page #ensNotifyBanner #ensCloseBanner {
    width: max-content;
    height: unset;
    font-size: var(--banner-font-size-mobile);
    padding: var(--banner-button-padding-mobile);
  }

  .page .ensButtons button {
    margin: 0;
  }

  .page #ensAcceptAll {
    display: inline-flex;
    width: auto;
  }
}

/*============================================================================
7.0 # Local overrides — blog 3 / success2 only
------------------------------------------------------------------------------
Everything above this line is the launchcore-child source, verbatim. This
section is the only delta; keep it here so a future vendor/source refresh can
drop in over §1–6 without losing local work.
============================================================================== */

/*
 * Reference render, measured in Chrome at 1440x900 against the live sibling instance:
 * https://success.irvinecompanyoffice.com/lp/performance-ready-spaces/ (blog 1,
 * salient-child). The banner is a shared Irvine Company component and has to read the
 * same on both properties, so prod is the spec and every rule below closes a measured
 * gap against it. Do not "improve" these without re-measuring — each one is a diff.
 *
 * Gutters are deliberately NOT overridden. Prod is full-bleed at a uniform
 * --banner-padding (18.75px) on all four sides, and §2.0/§6.0 already produce exactly
 * that. An earlier revision inset the content to a 1440px column here; that put the
 * copy 56px in against prod's 19px and is what this section replaced.
 */

/*
 * §2.0 sets `width: 100%` and a padding shorthand on the same element, so without
 * border-box the banner measures viewport + 37.5px and overflows to the right. salient
 * supplies this through a global `* { box-sizing: border-box }` reset that
 * twentytwentyfive-child does not have — it is inherited scaffolding on prod and has to
 * be stated explicitly here.
 */
.page #ensNotifyBanner {
  box-sizing: border-box;
}

/*
 * Button metrics, restored to prod by putting the variable back rather than by
 * out-specifying anything.
 *
 * CHEQ's own (cross-origin) stylesheet styles the button as
 * `#ensNotifyBanner #ensCloseBanner { font-size: var(--banner-button-font-size, 16px) }`.
 * Two IDs outrank any `.page #ensNotifyBanner button` rule we can write here, so a local
 * font-size declaration silently loses. prod simply never defines the variable and takes
 * CHEQ's 16px fallback; launchcore-child/dist/ introduced it at 0.9375rem, which is the
 * entire source of the 15px. Setting it to 1rem lets CHEQ's rule resolve to prod's value,
 * and --banner-button-padding is em-based on that same element, so 12px/64px padding and
 * the 228x50 box follow for free.
 */
:root {
  --banner-button-font-size: 1rem;
}

/*
 * Title case, as on prod.
 *
 * This is theme bleed, not a banner-CSS gap. twentytwentyfive-child styles bare
 * `h2 { text-transform: uppercase }` and `h1..h6 { letter-spacing: -0.005em }`, and CHEQ
 * renders its title as <h2 class="ensTitle" id="ensTitle"> — third-party markup the theme
 * never meant to reach. salient-child has no such rule, which is the whole reason the same
 * CMP reads "We Value Your Privacy" on prod and "WE VALUE YOUR PRIVACY" here.
 */
.page #ensNotifyBanner .ensTitle {
  text-transform: none;
  letter-spacing: normal;
}

/*
 * Button type, as on prod.
 *
 * `letter-spacing: .1em` + `text-transform: uppercase` (§3.0) are the only typographic
 * difference between the two vendor sources — launchcore-child/dist/ has them, the older
 * salient-child/css/ copy does not — and prod is the one without. (Size is handled by the
 * --banner-button-font-size override above, not here.)
 */
.page #ensNotifyBanner button {
  letter-spacing: normal;
  text-transform: none;
}

/* Gap between the description and the toggle row — 22.5px (1.5em) on prod, collapsed to 0
   here because the block theme zeroes paragraph padding. */
.page #ensNotifyBanner #ensBannerDescription p {
  padding-bottom: 1.5em;
}

/*
 * Toggle label in brand red, as on prod — with the caveat that prod's red is itself an
 * accident, and the exact mirror of the h2 bleed above.
 *
 * Salient paints `label span` with the theme accent as one entry in a ~40-selector
 * accent-color list, and CHEQ's toggle happens to be
 * `<label class="ensToggleLabel"><span>OK to share…</span></label>`, so it is caught by a
 * rule aimed at Salient's own form markup. Neither CHEQ's stylesheet nor either copy of
 * this one asks for a coloured label; on success2 the span simply inherits the body colour.
 *
 * Reproduced anyway, because the banner is a shared component and has to read the same on
 * both properties. Scoped to `label span` to mirror Salient's rule exactly (that includes
 * the aria-hidden .switch/.toggle spans, as on prod) and pointed at --ens-brand-color so it
 * tracks the token rather than hardcoding #DA291C. If Brand or Legal ever rules that the
 * label should be body-coloured, delete this block — and make the matching change on
 * success, or the two drift apart again.
 */
.page #ensNotifyBanner label span {
  color: var(--ens-brand-color);
}
