
/* ==========================================================================
   CANONICAL WIDTH OVERRIDE (CTE)
   - Drives Kadence container sizing
   - cte-vars.css maps --cte-site-width from --global-content-width
   ========================================================================== */
:root{
  --global-content-width: 1109px;
}
/* ==========================================================================
   CTE Overrides — LAST (CANONICAL)
   Loaded last via schemas/themes.schema.json

   Purpose:
   - Global overflow safety (prevent horizontal scroll)
   - Footer width containment via .cte-footer-box
   - Header full-bleed under 1300 (project breakpoint) WITHOUT changing Kadence globals
   - Sticky sidebar + overflow fixes needed for sticky behavior
   ========================================================================== */

html{
  overflow-x: hidden !important;
  overflow-y: scroll !important;
}

body{
  overflow-x: hidden !important;
}

/* Do not fight Kadence drawer lock */
body.show-drawer[class*="showing-popup-drawer-"]{
  overflow: hidden !important;
}

/* ============================================================
   FOOTER WIDTH — MATCH HEADER VISUAL WIDTH
   ============================================================ */
.cte-footer-box{
  max-width: var(--cte-site-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
  width: 100%;
}

/* <1300px: footer full-bleed (match Kadence “fullwidth” row behavior) */
@media (max-width:1299px){
  .cte-footer-box{
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ==========================================================================
   HEADER FULL-BLEED UNDER 1300 (project breakpoint)
   Facts from live DOM:
   - Kadence header rows are now: .site-header-row-layout-fullwidth
   - Kadence still caps .site-container via max-width: var(--global-content-width)
   Goal:
   - Under 1300, header slab is full-bleed (like footer slab)
   - Do NOT change global Kadence content width; only uncap masthead container
   ========================================================================== */

@media (max-width:1299px){
  /* Uncap the header row’s inner site-container */
  #masthead .site-header-row-layout-fullwidth > .site-header-row-container-inner > .site-container{
    max-width: none !important;
    width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    /* Kadence edge padding is often 0 already, but keep explicit */
    padding-left: 0 !important;
    padding-right: 0 !important;

    box-sizing: border-box !important;
  }

  /* Safety: if Kadence changes DOM nesting, still uncap any masthead site-container */
  #masthead .site-container{
    max-width: none !important;
  }
}

/* ==========================================================================
   Sidebar transform containment nuke (desktop)
   ========================================================================== */

@media (min-width:1025px){
  #secondary,
  #secondary *{
    transform: none !important;
    contain: none !important;
  }
}

/* ==========================================================================
   CANONICAL: Do NOT set overflow-x/y on #wrapper/#inner-wrap.
   Kadence sets overflow:hidden/clip on #wrapper which breaks sticky.
   Fix with SHORTHAND ONLY so browsers don't normalize visible->auto.
   Desktop only; do not fight drawer open state.
   ========================================================================== */

@media (min-width:1025px){
  body:not([class*="showing-popup-drawer-"]) #wrapper,
  body:not([class*="showing-popup-drawer-"]) #inner-wrap{
    overflow: visible !important;
  }
}

/* ==========================================================================
   Tighten content ↔ sidebar gap (desktop)
   Kadence sets grid-gap: var(--global-xl-spacing)
   ========================================================================== */

@media (min-width:1025px){
  body.has-sidebar .content-container{
    grid-gap: 14px !important;
  }
}

/* ==========================================================================
   KADENCE STICKY SUPPORT (legacy)
   Kadence sticky sidebar breaks if body becomes a scroll container
   or if key ancestors clip overflow.
   Desktop only; do not fight popup drawer.
   ========================================================================== */

@media (min-width:1025px){
  body.has-sidebar:not([class*="showing-popup-drawer-"]){
    overflow: visible !important; /* shorthand only */
  }

  body.has-sidebar:not([class*="showing-popup-drawer-"]) .site,
  body.has-sidebar:not([class*="showing-popup-drawer-"]) .site-content,
  body.has-sidebar:not([class*="showing-popup-drawer-"]) .content-area,
  body.has-sidebar:not([class*="showing-popup-drawer-"]) .content-container,
  body.has-sidebar:not([class*="showing-popup-drawer-"]) #secondary,
  body.has-sidebar:not([class*="showing-popup-drawer-"]) #secondary .sidebar-inner-wrap{
    overflow: visible !important;
  }
}

/* Kadence default spacing: remove bottom margin on primary content area */
#primary.content-area{
  margin-bottom: 0 !important;
}

.cte-imported-content{
  overflow: hidden;
}
.cte-imported-content__inner{
  max-width: 100%;
}
.cte-imported-content img{
  max-width: 100%;
  height: auto;
}

/* CTE ADMIN BAR OVERLAY FIX */
/*
  Keep layout flush (no WP html margin-top push), but DO reserve space
  so the admin bar does not cover the header.
*/
html { margin-top: 0 !important; }

/* Reserve space for the fixed admin bar (32px desktop, 46px mobile) */
body.admin-bar { padding-top: var(--wp-admin--admin-bar--height, 32px) !important; margin-top: 0 !important; }

/* Keep admin bar fixed at top */
#wpadminbar { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; }

/* Ensure masthead stays at the top of the page flow (below the reserved padding) */
body.admin-bar #masthead { margin-top: 0 !important; top: 0 !important; }


/* ============================================================
   CTE Profile Panel (WPUM) — card + buttons
   Applies to: [cte_wpum_account_plus] + related shortcodes
   ============================================================ */
.cte-profile-plus__card{
  margin-top: 18px;
}
.cte-profile-plus__title{
  margin: 0 0 10px 0;
  font: 900 18px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  letter-spacing: -0.01em;
}
.cte-profile-plus__sub{
  margin: 0 0 14px 0;
  color: rgba(0,0,0,.65);
  font: 600 14px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* Shared button */
.cte-profbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: var(--cte-accent);
  color: #fff !important;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none !important;
}
.cte-profbtn:hover{
  background: var(--cte-accent-deep);
}
.cte-profbtn:disabled{
  opacity: .55;
  cursor: not-allowed;
}


/* ============================================================
   CTE WPUM Account + Additional Fields — card layout polish
   ============================================================ */
.cte-profile-plus__card{
  padding: 16px 18px;
}
.cte-profile-plus__card + .cte-profile-plus__card{
  margin-top: 14px;
}

/* WPUM panel has its own spacing; don't let it feel cramped */
.cte-profile-plus__card--wpum{
  padding-top: 18px;
}

/* Flatten nested shortcode boxes inside Additional Fields */
.cte-profile-plus__card--extra .cte-profslug,
.cte-profile-plus__card--extra .cte-usf{
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* Tighten slug row */
.cte-profile-plus__card--extra .cte-profslug__row{
  margin: 0 0 12px 0;
}

/* Make inputs/buttons feel consistent */
.cte-profile-plus__card--extra input[type="text"]{
  max-width: 720px;
}



/* === CTE Privacy / Cookie Consent — Mobile One-Column (Full Width, Bottom Anchored) === */
@media (max-width: 768px){

  #cte-privacy-sheet{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)) 12px !important;
    box-sizing: border-box !important;
  }

  #cte-privacy-card{
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
  }

  #cte-privacy-left{
    width: 100% !important;
    max-width: 100% !important;
  }

  #cte-privacy-right{
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
  }

  #cte-privacy-right .cte-btn{
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

}

/* === CTE Privacy Sheet — Mobile overrides for inline CSS constraints (cte-cookieyes.php) === */
@media (max-width: 768px){

  /* Inline CSS forces height:220px + center alignment; that clips on phones */
  #cte-privacy-sheet{
    height: auto !important;
    min-height: 0 !important;
    align-items: flex-end !important; /* sit at bottom instead of center */
    bottom: 0px !important;          /* lift slightly */
  }

  /* Inline CSS sets min-width:220px on .cte-btn (causes mobile weirdness) */
  #cte-privacy-sheet .cte-btn{
    min-width: 0 !important;
  }

}

/* === CTE Privacy Sheet — Mobile: force bottom docking (override inline flex centering) === */
@media (max-width: 768px){
  #cte-privacy-sheet{
    justify-content: stretch !important;
    align-items: flex-end !important;
  }
}
