/* =========================================================
   TAGULAR COOKIE / PRIVACY CONSENT
   ========================================================= */

.footer-cookie-link {
  display: block;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0 8px;
  color: rgba(255,255,255,.88);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.footer-cookie-link:hover {
  color: #fff;
}

.tgr-cookie-banner[hidden],
.tgr-cookie-modal[hidden],
.tgr-cookie-backdrop[hidden] {
  display: none;
}

.tgr-cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(0,0,0,.13);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  color: var(--tgr-black);
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
  backdrop-filter: blur(18px);
}

.tgr-cookie-banner-copy {
  min-width: 0;
}

.tgr-cookie-kicker {
  margin-bottom: 7px;
  color: var(--tgr-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.tgr-cookie-banner h2,
.tgr-cookie-modal h2 {
  margin: 0;
  color: var(--tgr-black);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.tgr-cookie-banner p,
.tgr-cookie-modal p {
  margin: 9px 0 0;
  color: var(--tgr-muted);
  font-size: 14px;
  line-height: 1.55;
}

.tgr-cookie-banner p a,
.tgr-cookie-modal-links a {
  color: var(--tgr-blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tgr-cookie-banner-actions,
.tgr-cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tgr-cookie-banner-actions {
  justify-content: flex-end;
}

.tgr-consent-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--tgr-border);
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.tgr-consent-btn:hover {
  transform: translateY(-1px);
}

.tgr-consent-btn-primary {
  border-color: var(--tgr-blue);
  background: var(--tgr-blue);
  color: #fff;
}

.tgr-consent-btn-primary:hover {
  background: #2859bb;
}

.tgr-consent-btn-secondary {
  background: #fff;
  color: var(--tgr-black);
}

.tgr-consent-btn-secondary:hover {
  border-color: rgba(51,102,204,.35);
  background: #f8faff;
}

.tgr-cookie-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(10,18,35,.42);
  backdrop-filter: blur(5px);
}

.tgr-cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 10020;
  width: min(620px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 28px;
  border: 1px solid var(--tgr-border);
  border-radius: 26px;
  background: rgba(255,255,255,.98);
  color: var(--tgr-black);
  box-shadow: 0 30px 100px rgba(0,0,0,.28);
}

.tgr-cookie-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.tgr-cookie-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--tgr-border);
  border-radius: 12px;
  background: #fff;
  color: var(--tgr-black);
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.tgr-cookie-modal-intro {
  margin-bottom: 20px !important;
}

.tgr-cookie-option {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 12px;
  padding: 17px;
  border: 1px solid var(--tgr-border);
  border-radius: 17px;
  background: rgba(248,250,255,.78);
}

.tgr-cookie-option strong {
  display: block;
  font-size: 15px;
}

.tgr-cookie-option p {
  margin-top: 4px;
  font-size: 13px;
}

.tgr-cookie-always {
  flex: 0 0 auto;
  color: var(--tgr-green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tgr-switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
}

.tgr-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tgr-switch-ui {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c8cdd6;
  cursor: pointer;
  transition: background .18s ease;
}

.tgr-switch-ui::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: transform .18s ease;
}

.tgr-switch input:checked + .tgr-switch-ui {
  background: var(--tgr-blue);
}

.tgr-switch input:checked + .tgr-switch-ui::after {
  transform: translateX(20px);
}

.tgr-switch input:focus-visible + .tgr-switch-ui {
  outline: 3px solid rgba(51,102,204,.25);
  outline-offset: 3px;
}

.tgr-cookie-modal-links {
  margin-top: 18px;
  font-size: 13px;
}

.tgr-cookie-modal-actions {
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--tgr-border);
}

body.tgr-cookie-modal-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .tgr-cookie-banner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tgr-cookie-banner-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .tgr-cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 18px;
    border-radius: 20px;
  }

  .tgr-cookie-banner-actions,
  .tgr-cookie-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .tgr-consent-btn {
    width: 100%;
  }

  .tgr-cookie-modal {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    padding: 20px;
    border-radius: 22px;
  }

  .tgr-cookie-option {
    gap: 14px;
  }

  .tgr-cookie-always {
    white-space: normal;
    text-align: right;
  }
}

/* Small reset so consent controls never inherit browser/default form styling */
.footer-cookie-link,
.tgr-consent-btn,
.tgr-cookie-close {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

#tgr-consent-root {
  font-family: Inter, Arial, sans-serif;
}

#tgr-consent-root button {
  box-sizing: border-box;
}


/* Dark theme: consent banner and preference dialog */
html[data-theme="dark"] .tgr-cookie-banner,
html[data-theme="dark"] .tgr-cookie-modal {
  background: rgba(27,32,47,.98);
  color: #e5eaf5;
  border-color: #434c63;
}
html[data-theme="dark"] .tgr-cookie-banner h2,
html[data-theme="dark"] .tgr-cookie-modal h2,
html[data-theme="dark"] .tgr-cookie-option strong { color: #f7f8ff; }
html[data-theme="dark"] .tgr-cookie-banner p,
html[data-theme="dark"] .tgr-cookie-modal p { color: #c4cee1; }
html[data-theme="dark"] .tgr-cookie-kicker,
html[data-theme="dark"] .tgr-cookie-banner p a,
html[data-theme="dark"] .tgr-cookie-modal-links a { color: #9dbdff; }
html[data-theme="dark"] .tgr-cookie-option {
  background: rgba(20,25,39,.85);
  border-color: #434c63;
  color: #e5eaf5;
}
html[data-theme="dark"] .tgr-consent-btn-secondary,
html[data-theme="dark"] .tgr-cookie-close {
  background: #303a51;
  color: #f7f8ff;
  border-color: #56617a;
}
html[data-theme="dark"] .tgr-consent-btn-secondary:hover,
html[data-theme="dark"] .tgr-cookie-close:hover {
  background: #414f6b;
  border-color: #8395b9;
}
html[data-theme="dark"] .tgr-consent-btn-primary { color: #fff; }
html[data-theme="dark"] .tgr-cookie-modal-actions { border-color: #434c63; }
html[data-theme="dark"] .tgr-cookie-always { color: #8ce0b0; }
html[data-theme="dark"] .tgr-switch-ui { background: #657087; }
html[data-theme="dark"] .tgr-switch input:checked + .tgr-switch-ui { background: #407bfa; }
html[data-theme="dark"] .tgr-cookie-backdrop { background: rgba(0,0,0,.68); }
