/* =========================================================
   Foresight Sports Europe: Termly cookie consent
   Banner + Preferences window + copy overrides
   Paste into Elementor › Site Settings › Custom CSS
   ========================================================= */


/* =========================================================
   0. TERMLY THEME VARIABLES
   Termly sets these inline on a wrapper around every view.
   Overriding them recolours any Termly screen, styled or not.
   ========================================================= */

div[style*="--termly-theme-background-color"]{
  --termly-theme-background-color:#ffffff !important;
  --termly-theme-color:#1d1d1f !important;
  --termly-theme-button-background-color:#0071e3 !important;
  --termly-theme-button-text-color:#ffffff !important;
  --termly-theme-font-family:Inter,-apple-system,'Helvetica Neue',sans-serif !important;
  --termly-theme-font-size:14px !important;
}


/* =========================================================
   1. BANNER
   ========================================================= */

[data-termly-part="consent-banner"]{
  --ck-blue:#0071e3;
  --ck-text:#1d1d1f;
  --ck-body:#424245;
  --ck-muted:#6e6e73;
  --ck-link:#0066cc;
  width:440px !important;
  max-width:calc(100vw - 32px) !important;
  left:24px !important;
  bottom:24px !important;
  box-sizing:border-box !important;
  padding:24px !important;
  border:0 !important;
  border-radius:24px !important;
  background:#ffffff !important;
  color:var(--ck-text) !important;
  box-shadow:0 1px 2px rgba(0,0,0,.06),0 24px 60px rgba(0,0,0,.18) !important;
  font-family:Inter,-apple-system,'Helvetica Neue',sans-serif !important;
  -webkit-font-smoothing:antialiased;
}
[data-termly-part="consent-banner"] > div,
[data-termly-part="consent-banner"] > div > div{
  display:flex !important;
  flex-direction:column !important;
  gap:16px !important;
  padding:0 !important;
  margin:0 !important;
  background:transparent !important;
}

/* ---------- Message: original text hidden, new copy added ---------- */
[data-termly-part="banner-message"]{
  display:flex !important;
  flex-wrap:wrap;
  align-items:baseline;
  margin:0 !important;
  padding:0 !important;
  font-family:inherit !important;
  font-size:0 !important;
  line-height:1.55 !important;
  color:var(--ck-body) !important;
  text-align:left !important;
}

/* title with cookie icon */
[data-termly-part="banner-message"]::before{
  content:"Cookies on Foresight Sports Europe";
  order:-2;
  flex:0 0 100%;
  display:flex;
  align-items:center;
  min-height:40px;
  margin-bottom:14px;
  padding-left:52px;
  box-sizing:border-box;
  font-size:18px;
  line-height:1.25;
  font-weight:700;
  letter-spacing:-.01em;
  color:var(--ck-text);
}

/* icon tile, drawn on the banner itself so it can have rounded corners */
[data-termly-part="consent-banner"]::before{
  content:"";
  position:absolute;
  top:24px;
  left:24px;
  width:40px;
  height:40px;
  border-radius:12px;
  background:#e8f2fd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%230071e3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.2A9 9 0 1 1 11.8 3a3 3 0 0 0 3.7 3.7 3 3 0 0 0 3.6 3.6A3 3 0 0 0 21 12.2z'/%3E%3Ccircle cx='8.5' cy='10.5' r='1'/%3E%3Ccircle cx='15' cy='15' r='1'/%3E%3Ccircle cx='9.5' cy='15.5' r='1'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
  pointer-events:none;
}

/* body copy */
[data-termly-part="banner-message"]::after{
  content:"We use cookies to make our site work and, with your permission, to understand how it is used and show you relevant content. You can change your choice at any time.";
  order:-1;
  flex:0 0 100%;
  margin-bottom:10px;
  font-size:14px;
  line-height:1.55;
  color:var(--ck-body);
}

/* links on their own line: Privacy policy · Cookie policy */
[data-termly-part="banner-message"] [data-testid="privacy-policy-link"],
[data-termly-part="banner-message"] [data-testid="cookie-policy-link"]{
  font-size:13px !important;
  font-weight:500 !important;
  color:var(--ck-link) !important;
  text-decoration:none !important;
  cursor:pointer;
}
[data-termly-part="banner-message"] [data-testid="privacy-policy-link"]{ order:1; }
[data-termly-part="banner-message"] [data-testid="cookie-policy-link"]{ order:2; }
[data-termly-part="banner-message"] [data-testid="cookie-policy-link"]::before{
  content:"·";
  margin:0 8px;
  color:var(--ck-muted);
}
[data-termly-part="banner-message"] [data-testid]:hover{
  text-decoration:underline !important;
}
/* Preferences link hidden: there's a button for it */
[data-termly-part="banner-message"] [data-testid="preferences-link"]{
  display:none !important;
}

/* ---------- Banner buttons ---------- */
[data-termly-part="banner-actions"]{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px !important;
  margin:4px 0 0 !important;
  padding:0 !important;
  background:transparent !important;
}
[data-termly-part="banner-actions"] button{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:none !important;
  width:100% !important;
  min-width:100% !important;
  max-width:none !important;
  white-space:nowrap !important;
  overflow:visible !important;
  height:48px !important;
  margin:0 !important;
  padding:0 16px !important;
  border-radius:14px !important;
  font-family:inherit !important;
  font-size:0 !important;
  line-height:1 !important;
  text-transform:none !important;
  letter-spacing:0 !important;
  cursor:pointer;
  transition:transform .15s ease,box-shadow .2s ease,filter .15s ease,background-color .2s ease;
}
[data-termly-part="banner-actions"] button::after{
  font-size:15px;
  font-weight:600;
}
[data-termly-part="banner-actions"] button:active{ transform:translateY(1px); }
[data-termly-part="banner-actions"] button:focus-visible{
  outline:2px solid var(--ck-blue) !important;
  outline-offset:2px;
}

/* Reject all and Accept all: identical primary */
[data-termly-part="banner-actions"] .t-declineButton{ order:1; }
[data-termly-part="banner-actions"] .t-acceptAllButton{ order:2; }
[data-termly-part="banner-actions"] .t-declineButton::after{ content:"Reject all"; }
[data-termly-part="banner-actions"] .t-acceptAllButton::after{ content:"Accept all"; }
[data-termly-part="banner-actions"] :is(.t-declineButton,.t-acceptAllButton){
  border:0 !important;
  color:#ffffff !important;
  background-color:var(--ck-blue) !important;
  background-image:linear-gradient(180deg,rgba(255,255,255,.14) 0%,rgba(255,255,255,0) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 1px 2px rgba(0,40,100,.25),
    0 6px 16px rgba(0,113,227,.28) !important;
}
[data-termly-part="banner-actions"] :is(.t-declineButton,.t-acceptAllButton):hover{
  filter:brightness(1.06);
}

/* Manage preferences: full-width text button underneath */
[data-termly-part="banner-actions"] .t-preference-button{
  order:3;
  grid-column:1 / -1;
  height:44px !important;
  margin-top:-4px !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:var(--ck-link) !important;
}
[data-termly-part="banner-actions"] .t-preference-button::after{ content:"Manage preferences"; }
[data-termly-part="banner-actions"] .t-preference-button:hover{
  background:#f0f0f3 !important;
}


/* =========================================================
   2. PREFERENCES WINDOW
   ========================================================= */

[class*="termly-styles-modal-"]:is(:has(.t-preference-modal),:has(.t-backButton)){
  position:relative;
  width:560px !important;
  max-width:calc(100vw - 32px) !important;
  max-height:calc(100vh - 48px) !important;
  margin:24px auto !important;
  box-sizing:border-box;
  padding:32px !important;
  border:0 !important;
  border-radius:28px !important;
  background:#ffffff !important;
  box-shadow:0 30px 80px rgba(0,0,0,.35) !important;
  font-family:Inter,-apple-system,'Helvetica Neue',sans-serif !important;
  -webkit-font-smoothing:antialiased;
  color:#1d1d1f !important;
  display:flex !important;
  flex-direction:column;
  gap:20px;
  overflow:hidden;
}
[class*="termly-styles-modal-"]:is(:has(.t-preference-modal),:has(.t-backButton)) > div,
[class*="termly-styles-modal-"]:is(:has(.t-preference-modal),:has(.t-backButton)) > div > div{
  background:transparent !important;
  padding:0 !important;
  margin:0 !important;
}
/* scrolling middle */
[class*="termly-styles-modal-"]:is(:has(.t-preference-modal),:has(.t-backButton)) > div:has(.t-preference-modal),
[class*="termly-styles-modal-"]:is(:has(.t-preference-modal),:has(.t-backButton)) > div:has(.t-backButton){
  flex:1 1 auto;
  min-height:0;
  max-height:none !important;
  overflow-y:auto !important;
}
.t-preference-modal,
.t-preference-modal *{
  font-family:inherit !important;
  letter-spacing:0 !important;
}

/* ---------- Close button ---------- */
div:has(> .t-closeModal){
  position:absolute !important;
  top:18px !important;
  right:18px !important;
  z-index:2;
}
.t-closeModal{
  width:40px !important;
  height:40px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:#f0f0f3 !important;
  display:flex !important;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background-color .15s ease;
}
.t-closeModal:hover{ background:#e8e8ed !important; }
.t-closeModal svg{ width:12px; height:12px; }
.t-closeModal svg g{ fill:#1d1d1f !important; }
.t-closeModal:focus-visible{ outline:2px solid #0071e3; outline-offset:2px; }

/* ---------- Title: original hidden, new title added ---------- */
.t-preference-modal h2{
  margin:0 0 8px !important;
  padding-right:48px;
  font-size:0 !important;
  line-height:1.2 !important;
  color:#1d1d1f !important;
  text-transform:none !important;
}
.t-preference-modal h2::before{
  content:"Cookie preferences";
  font-size:24px;
  font-weight:700;
  letter-spacing:-.02em;
}

/* ---------- Intro: original hidden, new copy added ---------- */
.t-preference-modal h2 + div{
  margin:0 0 16px !important;
  padding:0 !important;
}
.t-preference-modal h2 + div p:first-of-type{
  display:flex !important;
  flex-wrap:wrap;
  align-items:baseline;
  margin:0 !important;
  font-size:0 !important;
  line-height:1.55 !important;
  color:#6e6e73 !important;
}
.t-preference-modal h2 + div p:first-of-type::before{
  content:"Choose which cookies we can use. Essential cookies are always on, as the site cannot work without them.";
  flex:0 0 100%;
  margin-bottom:10px;
  font-size:14px;
  line-height:1.55;
  color:#6e6e73;
}
.t-preference-modal .t-privacyPolicyLink,
.t-preference-modal .t-cookiePolicyLink{
  font-size:13px !important;
  font-weight:500 !important;
  color:#0066cc !important;
  text-decoration:none !important;
  cursor:pointer;
}
.t-preference-modal .t-privacyPolicyLink{ order:1; }
.t-preference-modal .t-cookiePolicyLink{ order:2; }
.t-preference-modal .t-cookiePolicyLink::before{
  content:"·";
  margin:0 8px;
  color:#6e6e73;
}
.t-preference-modal .t-privacyPolicyLink:hover,
.t-preference-modal .t-cookiePolicyLink:hover{
  text-decoration:underline !important;
}
/* storage note, Google Consent Mode note and empty block hidden */
.t-preference-modal h2 + div p:nth-of-type(n+2),
.t-preference-modal [class*="doNotSell"]{
  display:none !important;
}

/* ---------- Category rows ---------- */
/* every row full width (Termly sizes each row to its content) */
.t-preference-modal,
.t-preference-modal > div,
.t-preference-modal div:has(> .consentSettingsRowContainer),
.t-preference-modal .consentSettingsRowContainer{
  width:100% !important;
  max-width:none !important;
  box-sizing:border-box !important;
  align-self:stretch !important;
}
/* remove Termly's outer wrapper so there's one line per category */
.t-preference-modal div:has(> .consentSettingsRowContainer){
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.t-preference-modal .consentSettingsRowContainer{
  display:grid !important;
  grid-template-columns:minmax(0,1fr);
  row-gap:6px;
  padding:16px 0 !important;
  margin:0 !important;
  border:0 !important;
  border-top:1px solid #e5e5ea !important;
  border-radius:0 !important;
  background:transparent !important;
}
/* flatten wrappers so name, description and Details can be ordered */
.t-preference-modal [data-tracking^="accordion-"],
.t-preference-modal [data-tracking^="accordion-"] > div{
  display:contents !important;
}

/* row 1: name on the left, toggle on the right */
.t-preference-modal [class*="t-checkBox--"]{
  order:1;
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  width:100%;
  margin:0 !important;
  padding:0 !important;
  cursor:pointer;
}
.t-preference-modal [class*="t-checkBox--"] > span{
  order:1;
  flex:1;
  min-width:0;
  margin:0 !important;
  padding:0 !important;
}

/* category names: original hidden, new names added */
.t-preference-modal [class*="cbLabel"]{
  display:flex !important;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  font-size:0 !important;
  line-height:1.3 !important;
  color:#1d1d1f !important;
}
.t-preference-modal [class*="cbLabel"]::before{
  font-size:16px;
  font-weight:600;
  color:#1d1d1f;
}
.t-preference-modal .t-checkBox--essential [class*="cbLabel"]::before{ content:"Essential"; }
.t-preference-modal .t-checkBox--performance [class*="cbLabel"]::before{ content:"Functional"; }
.t-preference-modal .t-checkBox--analytics [class*="cbLabel"]::before{ content:"Analytics"; }
.t-preference-modal .t-checkBox--advertising [class*="cbLabel"]::before{ content:"Marketing"; }
.t-preference-modal .t-checkBox--social_networking [class*="cbLabel"]::before{ content:"Social media"; }
.t-preference-modal .t-checkBox--unclassified [class*="cbLabel"]::before{ content:"Unclassified"; }

/* cookie count badge */
.t-preference-modal [class*="cookieCount"]{
  display:inline-flex !important;
  align-items:center;
  height:20px;
  padding:0 8px !important;
  margin:0 !important;
  border:0 !important;
  border-radius:999px !important;
  background:#f0f0f3 !important;
  color:#424245 !important;
  font-size:12px !important;
  font-weight:600 !important;
}

/* row 2: descriptions, original hidden, new copy added */
.t-preference-modal [data-tracking^="accordion-"] + div{
  order:2;
  margin:0 !important;
  padding:0 !important;
  font-size:0 !important;
  color:#6e6e73 !important;
}
.t-preference-modal [data-tracking^="accordion-"] + div::before{
  font-size:14px;
  line-height:1.5;
  color:#6e6e73;
}
.t-preference-modal [data-tracking="accordion-essential"] + div::before{
  content:"Needed for the site to work, such as your basket, checkout and security.";
}
.t-preference-modal [data-tracking="accordion-performance"] + div::before{
  content:"Remember your choices and keep features such as videos working.";
}
.t-preference-modal [data-tracking="accordion-analytics"] + div::before{
  content:"Help us understand how the site is used so we can improve it.";
}
.t-preference-modal [data-tracking="accordion-advertising"] + div::before{
  content:"Used to show you relevant adverts on other sites and measure how they perform.";
}
.t-preference-modal [data-tracking="accordion-social_networking"] + div::before{
  content:"Let you share our content on social networks, which may also use it for advertising.";
}
.t-preference-modal [data-tracking="accordion-unclassified"] + div::before{
  content:"Cookies we are still classifying with their providers.";
}

/* row 3: Details link */
.t-preference-modal .t-detailsLink{
  order:3;
  justify-self:start;
  margin:2px 0 0 !important;
  font-size:13px !important;
  font-weight:500 !important;
  color:#0066cc !important;
  text-decoration:none !important;
  cursor:pointer;
}
.t-preference-modal .t-detailsLink:hover{ text-decoration:underline !important; }

/* ---------- Toggle switch (Termly's checkbox, restyled) ---------- */
.t-preference-modal [class*="t-checkBox--"] [data-testid="cb-ui"]{
  order:2;
  position:relative !important;
  flex:0 0 44px !important;
  width:44px !important;
  height:26px !important;
  margin:0 !important;
  border:0 !important;
  border-radius:999px !important;
  background:#8e8e93 !important;
  box-shadow:none !important;
  transition:background-color .2s ease;
}
.t-preference-modal [class*="t-checkBox--"] [data-testid="cb-ui"]::before{
  content:none !important;
  display:none !important;
}
.t-preference-modal [class*="t-checkBox--"] [data-testid="cb-ui"]::after{
  content:"" !important;
  position:absolute !important;
  top:3px !important;
  left:3px !important;
  width:20px !important;
  height:20px !important;
  border:0 !important;
  border-radius:50% !important;
  background:#ffffff !important;
  box-shadow:0 1px 3px rgba(0,0,0,.25);
  transform:none !important;
  transition:transform .2s ease;
}
.t-preference-modal [class*="t-checkBox--"][aria-checked="true"] [data-testid="cb-ui"]{
  background:#0071e3 !important;
}
.t-preference-modal [class*="t-checkBox--"][aria-checked="true"] [data-testid="cb-ui"]::after{
  transform:translateX(18px) !important;
}
.t-preference-modal [class*="t-checkBox--"]:focus-visible [data-testid="cb-ui"]{
  outline:2px solid #0071e3;
  outline-offset:2px;
}

/* Essential: Always on chip instead of a locked toggle, at full strength */
.t-preference-modal .t-checkBox--essential [data-testid="cb-ui"]{
  display:none !important;
}
.t-preference-modal .t-checkBox--essential{
  cursor:default;
}
.t-preference-modal .t-checkBox--essential::after{
  content:"Always on";
  order:2;
  flex:none;
  padding:6px 12px;
  border-radius:999px;
  background:#f0f0f3;
  color:#424245;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}
.t-preference-modal .t-checkBox--essential,
.t-preference-modal .t-checkBox--essential *,
.t-preference-modal .consentSettingsRowContainer:has(.t-checkBox--essential) *{
  opacity:1 !important;
  filter:none !important;
}

/* ---------- Footer buttons ---------- */
div:has(> .t-allowAllButton){
  flex-shrink:0;
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px !important;
  padding:16px 0 0 !important;
  margin:0 !important;
  border-top:1px solid #e5e5ea;
  background:transparent !important;
}
.t-declineAllButton,
.t-allowAllButton{
  width:100% !important;
  height:48px !important;
  margin:0 !important;
  padding:0 16px !important;
  border:0 !important;
  border-radius:14px !important;
  color:#ffffff !important;
  background-color:#0071e3 !important;
  background-image:linear-gradient(180deg,rgba(255,255,255,.14) 0%,rgba(255,255,255,0) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 1px 2px rgba(0,40,100,.25),
    0 6px 16px rgba(0,113,227,.28) !important;
  font-family:Inter,-apple-system,'Helvetica Neue',sans-serif !important;
  font-size:0 !important;
  line-height:1 !important;
  text-transform:none !important;
  letter-spacing:0 !important;
  cursor:pointer;
  transition:transform .15s ease,filter .15s ease;
}
.t-declineAllButton::after,
.t-allowAllButton::after{
  font-size:15px;
  font-weight:600;
}
.t-declineAllButton::after{ content:"Reject all"; }
.t-allowAllButton::after{ content:"Accept all"; }
.t-declineAllButton:hover,
.t-allowAllButton:hover{ filter:brightness(1.06); }
.t-declineAllButton:active,
.t-allowAllButton:active{ transform:translateY(1px); }
.t-declineAllButton:focus-visible,
.t-allowAllButton:focus-visible{ outline:2px solid #0071e3; outline-offset:2px; }


/* =========================================================
   2b. COOKIE DETAILS VIEW (after tapping Details)
   ========================================================= */

/* header: Back link above the category title */
div:has(> .t-backButton){
  display:flex !important;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  margin:0 0 8px !important;
  padding:0 48px 0 0 !important;
  background:transparent !important;
}
.t-backButton{
  display:inline-flex !important;
  align-items:center;
  gap:8px;
  height:36px !important;
  margin:0 0 0 -10px !important;
  padding:0 10px !important;
  border:0 !important;
  border-radius:10px !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#0066cc !important;
  font-family:Inter,-apple-system,'Helvetica Neue',sans-serif !important;
  font-size:14px !important;
  font-weight:600 !important;
  text-transform:none !important;
  cursor:pointer;
}
button.t-backButton.t-backButton,
button.t-backButton.t-backButton *{
  color:#0066cc !important;
  -webkit-text-fill-color:#0066cc !important;
  background-color:transparent !important;
  border-color:transparent !important;
}
button.t-backButton.t-backButton:hover{ background-color:#f0f0f3 !important; }
.t-backButton:focus-visible{ outline:2px solid #0071e3; outline-offset:2px; }
.t-backButton svg{ width:7px; height:11px; }
.t-backButton svg path{ fill:#0066cc !important; }
div:has(> .t-backButton) h2{
  margin:0 !important;
  font-family:Inter,-apple-system,'Helvetica Neue',sans-serif !important;
  font-size:22px !important;
  line-height:1.2 !important;
  font-weight:700 !important;
  letter-spacing:-.02em !important;
  color:#1d1d1f !important;
  text-transform:none !important;
}

/* any other text in the details view, e.g. "We don't serve any cookies of this type." */
div:has(> .t-backButton) ~ *,
div:has(> .t-backButton) ~ * *{
  font-family:Inter,-apple-system,'Helvetica Neue',sans-serif !important;
}
div:has(> .t-backButton) ~ div:not([class*="termly-styles-container-"]){
  padding:24px 0 8px !important;
  background:transparent !important;
  color:#6e6e73 !important;
  font-size:14px !important;
  text-align:left !important;
}
div:has(> .t-backButton) ~ div:not([class*="termly-styles-container-"]) *{
  color:#6e6e73 !important;
  background:transparent !important;
}

/* one block per provider */
div:has(> .t-backButton) ~ [class*="termly-styles-container-"]{
  margin:0 0 20px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  font-family:Inter,-apple-system,'Helvetica Neue',sans-serif !important;
  color:#1d1d1f !important;
}
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] h3{
  margin:0 0 8px !important;
  padding:0 !important;
  font-size:13px !important;
  line-height:1.3 !important;
  font-weight:600 !important;
  color:#6e6e73 !important;
  text-transform:none !important;
}

/* table */
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] table{
  width:100% !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
  border:0 !important;
  border-radius:14px !important;
  overflow:hidden;
  background:#f5f5f7 !important;
  table-layout:fixed;
}
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] th{
  padding:10px 12px !important;
  border:0 !important;
  background:transparent !important;
  color:#6e6e73 !important;
  font-size:11px !important;
  font-weight:600 !important;
  letter-spacing:.04em !important;
  text-transform:uppercase !important;
  text-align:left !important;
}
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] th:nth-child(1){ width:32%; }
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] th:nth-child(2){ width:48%; }
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] th:nth-child(4){ width:20%; }
/* Type (http_cookie, server_cookie) means nothing to customers */
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] :is(th,td):nth-child(3){
  display:none !important;
}
/* Expires: wrap between words, not mid-word */
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] td:nth-child(4){
  word-break:normal !important;
}
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] td{
  padding:12px !important;
  border:0 !important;
  border-top:1px solid #e5e5ea !important;
  background:transparent !important;
  color:#424245 !important;
  font-size:13px !important;
  line-height:1.45 !important;
  vertical-align:top !important;
  word-break:break-word;
}
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] [class*="nameCell"]{
  display:flex !important;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  font-weight:600 !important;
  color:#1d1d1f !important;
}
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] [class*="nameCell"] a{
  display:inline-flex !important;
  align-items:center;
  gap:4px;
  font-size:12px !important;
  font-weight:500 !important;
  color:#0066cc !important;
  text-decoration:none !important;
}
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] [class*="nameCell"] a:hover{
  text-decoration:underline !important;
}
div:has(> .t-backButton) ~ [class*="termly-styles-container-"] [class*="nameCell"] a img{
  width:10px;
  height:10px;
  margin:0 !important;
}


/* =========================================================
   3. MOBILE
   ========================================================= */

@media (max-width:767px){

  /* banner: bottom sheet */
  [data-termly-part="consent-banner"]{
    position:fixed !important;
    inset:auto 0 0 0 !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    transform:none !important;
    padding:24px 20px calc(24px + env(safe-area-inset-bottom)) !important;
    border-radius:24px 24px 0 0 !important;
  }
  [data-termly-part="consent-banner"]::before{ left:20px; }

  /* preferences window */
  [class*="termly-styles-modal-"]:is(:has(.t-preference-modal),:has(.t-backButton)){
    width:calc(100vw - 24px) !important;
    max-height:calc(100dvh - 24px) !important;
    margin:12px auto !important;
    padding:28px 20px calc(24px + env(safe-area-inset-bottom)) !important;
    border-radius:24px !important;
    gap:16px;
  }
  div:has(> .t-closeModal){
    top:14px !important;
    right:14px !important;
  }
  .t-preference-modal h2::before{ font-size:22px; }
  .t-preference-modal [class*="t-checkBox--"]{ gap:14px; }

  /* details view: each cookie becomes a stacked card, labels added with ::before */
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] thead{
    display:none !important;
  }
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] table,
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] tbody,
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] tr,
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] td{
    display:block !important;
    width:100% !important;
    box-sizing:border-box;
  }
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] tr{
    padding:12px 14px !important;
    border-top:1px solid #e5e5ea;
  }
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] tr:first-child{
    border-top:0;
  }
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] td{
    padding:4px 0 !important;
    border:0 !important;
  }
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] td:nth-child(n+2)::before{
    display:block;
    margin-bottom:2px;
    color:#6e6e73;
    font-size:11px;
    font-weight:600;
    letter-spacing:.04em;
    text-transform:uppercase;
  }
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] td:nth-child(2)::before{ content:"Purpose"; }
  div:has(> .t-backButton) ~ [class*="termly-styles-container-"] td:nth-child(4)::before{ content:"Expires"; }
}



/* =========================================================
   4. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion:reduce){
  [data-termly-part="consent-banner"] *,
  .t-preference-modal *,
  .t-backButton,
  .t-declineAllButton,
  .t-allowAllButton,
  .t-closeModal{
    transition:none !important;
  }
}
