/* Evidilya skin for TermsFeed Cookie Consent 4.2.0.
   Mirrors the previous in-house banner: white card, indigo text, teal
   eyebrow, pill buttons; compact bottom-right card on phones. */

:root {
  --evi-cc-navy: #2a1a66;
  --evi-cc-teal: #00a19a;
  --evi-cc-teal-text: #007a75;
  --evi-cc-ice: #f2f4fb;
}

/* ---------- Notice banner ---------- */
.termsfeed-com---nb {
  position: fixed !important;
  inset: auto auto 1.5rem 1.5rem !important;
  z-index: 60 !important;
  max-width: 28rem !important;
  width: calc(100vw - 3rem) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 1rem !important;
  background: #fff !important;
  box-shadow: 0 25px 50px -12px rgba(42, 26, 102, 0.25) !important;
  color: var(--evi-cc-navy) !important;
  font-family: inherit !important;
}

.termsfeed-com---nb .cc-nb-main-container {
  padding: 1.25rem !important;
}

.termsfeed-com---nb .cc-nb-title {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  color: var(--evi-cc-teal-text) !important;
  margin-bottom: 0.5rem !important;
}

.termsfeed-com---nb .cc-nb-text {
  font-size: 0.875rem !important;
  line-height: 1.6 !important;
  color: rgba(42, 26, 102, 0.85) !important;
}

.termsfeed-com---nb .cc-nb-text a,
.termsfeed-com---nb .cc-nb-text-urls a {
  color: var(--evi-cc-navy) !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

.termsfeed-com---nb .cc-nb-buttons-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  margin-top: 1rem !important;
}

.termsfeed-com---palette-light .cc-nb-okagree,
.termsfeed-com---palette-light .cc-nb-reject,
.termsfeed-com---palette-light .cc-nb-changep {
  margin: 0 !important;
  border-radius: 9999px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease !important;
}

.termsfeed-com---palette-light .cc-nb-okagree {
  background: var(--evi-cc-navy) !important;
  color: #fff !important;
}

.termsfeed-com---palette-light .cc-nb-okagree:hover {
  background: var(--evi-cc-navy) !important;
  transform: translateY(-2px) !important;
}

.termsfeed-com---palette-light .cc-nb-reject,
.termsfeed-com---palette-light .cc-nb-changep {
  background: #fff !important;
  color: var(--evi-cc-navy) !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.termsfeed-com---palette-light .cc-nb-reject:hover,
.termsfeed-com---palette-light .cc-nb-changep:hover {
  background: var(--evi-cc-ice) !important;
}

/* ---------- Preferences centre ---------- */
.termsfeed-com---pc-dialog .cc-pc-container {
  border-radius: 1rem !important;
  color: var(--evi-cc-navy) !important;
  font-family: inherit !important;
  overflow: hidden !important;
}

.termsfeed-com---pc-dialog .cc-pc-head-title-headline {
  color: var(--evi-cc-navy) !important;
  font-weight: 700 !important;
}

/* The site name is replaced by the Evidilya logo. */
.termsfeed-com---pc-dialog .cc-pc-head-title-text {
  display: block !important;
  width: 132px !important;
  height: 34px !important;
  margin: 0 0 6px !important;
  overflow: hidden !important;
  text-indent: -9999px !important;
  background: url("/assets/evidilya-logo-header-colour.png") left center / contain no-repeat !important;
}

.termsfeed-com---pc-dialog .cc-cp-body-tabs-item-link {
  color: var(--evi-cc-navy) !important;
}

.termsfeed-com---pc-dialog .cc-cp-body-tabs-item[active="true"] {
  background: var(--evi-cc-ice) !important;
}

.termsfeed-com---pc-dialog .cc-cp-body-content-entry-title {
  color: var(--evi-cc-navy) !important;
}

.termsfeed-com---pc-dialog .cc-cp-foot-save {
  background: var(--evi-cc-navy) !important;
  color: #fff !important;
  border-radius: 9999px !important;
  border: none !important;
  font-weight: 600 !important;
}

.termsfeed-com---pc-dialog .cc-cp-foot-byline {
  display: none !important;
}

/* ---------- Brand toggles ---------- */
.termsfeed-com---pc-dialog .cc-custom-checkbox + label:before {
  background: rgba(42, 26, 102, 0.12) !important;
  border-color: rgba(42, 26, 102, 0.2) !important;
}

.termsfeed-com---pc-dialog .cc-custom-checkbox + label:after {
  background: #fff !important;
  border-color: rgba(42, 26, 102, 0.2) !important;
  box-shadow: 0 1px 3px rgba(42, 26, 102, 0.25) !important;
}

.termsfeed-com---pc-dialog .cc-custom-checkbox:checked + label:before {
  background: var(--evi-cc-teal) !important;
  border-color: var(--evi-cc-teal) !important;
}

.termsfeed-com---pc-dialog .cc-custom-checkbox:checked + label:after {
  border-color: var(--evi-cc-teal) !important;
}

.termsfeed-com---pc-dialog .cc-custom-checkbox:focus + label:before {
  box-shadow: 0 0 0 3px rgba(0, 161, 154, 0.3) !important;
}

.termsfeed-com---pc-dialog .cc-custom-checkbox:disabled + label:before {
  background: rgba(42, 26, 102, 0.25) !important;
  border-color: rgba(42, 26, 102, 0.25) !important;
}

/* ---------- Language selector ---------- */
.termsfeed-com---pc-dialog .cc-pc-head-lang-select {
  border: 1px solid rgba(42, 26, 102, 0.25) !important;
  border-radius: 9999px !important;
  padding: 0.25rem 0.6rem !important;
  font-size: 0.8125rem !important;
  color: var(--evi-cc-navy) !important;
  background: #fff !important;
}

/* ---------- Bottom rail: cookie badge left, chatbot right ---------- */
#evi-cookie-prefs {
  position: fixed;
  left: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 55;
  display: none;
  height: 2.5rem;
  width: 2.5rem;
  padding: 0.375rem;
  border: 1px solid rgba(42, 26, 102, 0.18);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px -6px rgba(42, 26, 102, 0.25);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    opacity 0.3s ease;
}

/* The badge stays on screen after accept or decline, on every public page. */
#evi-cookie-prefs.is-visible {
  display: block;
  animation: evi-cc-in 0.35s ease both;
}

#evi-cookie-prefs:hover {
  transform: translateY(-2px);
  border-color: rgba(42, 26, 102, 0.4);
}

#evi-cookie-prefs img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 9999px;
}

/* Past the hero the rail fades out: badge cookie and the AI chat button
   leave the page free, and come back when the visitor returns to the top.
   The consent banner and the preferences centre are never affected. */
#wayq-fab,
#wayq-tip {
  transition: opacity 0.3s ease !important;
}

body.evi-rail-hidden #evi-cookie-prefs,
body.evi-rail-hidden #wayq-fab,
body.evi-rail-hidden #wayq-tip {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* While the rails are hidden they reserve no space: the floating RFP /
   demo pill drops to its normal bottom offset instead of floating above
   an invisible chat button. */
body.evi-rail-hidden {
  --evi-chatbot-h: 0px;
}

@keyframes evi-cc-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.termsfeed-com---nb {
  animation: evi-cc-in 0.35s ease both;
}

/* ---------- Phones: compact card, above the bottom rail ---------- */
@media (max-width: 639px) {
  .termsfeed-com---nb {
    inset: auto 0.75rem calc(5.5rem + env(safe-area-inset-bottom)) auto !important;
    left: auto !important;
    width: min(17.5rem, calc(100vw - 1.5rem)) !important;
    max-width: min(17.5rem, calc(100vw - 1.5rem)) !important;
    border-radius: 0.75rem !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(6px) !important;
    box-shadow: 0 10px 15px -3px rgba(42, 26, 102, 0.2) !important;
  }

  .termsfeed-com---nb .cc-nb-main-container {
    padding: 0.75rem !important;
  }

  .termsfeed-com---nb .cc-nb-title {
    font-size: 0.625rem !important;
    margin-bottom: 0.25rem !important;
  }

  .termsfeed-com---nb .cc-nb-text {
    font-size: 0.6875rem !important;
    line-height: 1.35 !important;
  }

  .termsfeed-com---nb .cc-nb-buttons-container {
    margin-top: 0.5rem !important;
    gap: 0.375rem !important;
    flex-wrap: wrap !important;
  }

  .termsfeed-com---palette-light .cc-nb-okagree,
  .termsfeed-com---palette-light .cc-nb-reject {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 2.25rem !important;
    padding: 0.375rem 0.5rem !important;
    font-size: 0.6875rem !important;
    border-radius: 0.5rem !important;
    text-align: center !important;
  }

  .termsfeed-com---palette-light .cc-nb-changep {
    flex: 1 1 100% !important;
    min-height: 2.25rem !important;
    padding: 0.375rem 0.5rem !important;
    font-size: 0.6875rem !important;
    border-radius: 0.5rem !important;
    text-align: center !important;
  }

  /* Same bottom line as the chat button on the opposite corner. */
  #evi-cookie-prefs {
    height: 2.5rem;
    width: 2.5rem;
    left: 0.75rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .termsfeed-com---palette-light .cc-nb-okagree:hover,
  #evi-cookie-prefs:hover {
    transform: none !important;
  }

  .termsfeed-com---nb,
  #evi-cookie-prefs.is-visible {
    animation: none !important;
  }

  #evi-cookie-prefs,
  #wayq-fab,
  #wayq-tip {
    transition: none !important;
  }
}

/* The language selector stays available: it defaults to the page language
   and follows it when the visitor switches site language, but can be
   changed by hand at any time. */
