:root {
  --consent-navy: #081a30;
  --consent-blue: #2864f0;
  --consent-blue-dark: #174ac0;
  --consent-muted: #526175;
  --consent-line: #dbe3ed;
}

.cookie-consent[hidden] { display: block !important; visibility: hidden; }
.cookie-consent {
  position: fixed;
  right: clamp(.75rem, 3vw, 2rem);
  bottom: clamp(.75rem, 3vw, 2rem);
  left: clamp(.75rem, 3vw, 2rem);
  z-index: 1050;
  max-width: 1380px;
  margin-inline: auto;
  overflow: hidden;
  color: var(--consent-navy);
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(8,26,48,.1);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(8,26,48,.24), 0 4px 16px rgba(8,26,48,.08);
  opacity: 0;
  transform: translate3d(0, calc(100% + 3rem), 0);
  transition: opacity .35s ease, transform .55s cubic-bezier(.22,1,.36,1), visibility 0s linear .55s;
}
.cookie-consent.is-visible { visibility: visible; opacity: 1; transform: translate3d(0,0,0); transition-delay: 0s; }
.cookie-consent__accent { height: 4px; background: linear-gradient(90deg,var(--consent-blue),#43d5c5); }
.cookie-consent__content { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(220px,auto); gap: 1.25rem; align-items: start; padding: 1.5rem; }
.cookie-consent__icon { display: grid; width: 48px; height: 48px; place-items: center; color: var(--consent-blue); background: #edf3ff; border-radius: 14px; }
.cookie-consent__icon svg { width: 27px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.cookie-consent__copy h2 { margin: 0 0 .45rem; font-size: clamp(1.15rem,2vw,1.4rem); font-weight: 800; letter-spacing: -.025em; }
.cookie-consent__copy p { max-width: 820px; margin: 0; color: var(--consent-muted); font-size: .88rem; line-height: 1.6; }
.cookie-consent__copy .cookie-consent__detail { margin-top: .35rem; font-size: .8125rem; }
.cookie-consent__copy a { color: var(--consent-blue-dark); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.cookie-consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; width: min(100%,450px); }
.cookie-button { display: inline-flex; min-height: 44px; padding: .68rem 1rem; align-items: center; justify-content: center; color: var(--consent-navy); background: transparent; border: 1px solid transparent; border-radius: 9px; font-size: .875rem; font-weight: 750; line-height: 1.3; text-align: center; transition: background-color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.cookie-button:hover { color: var(--consent-navy); transform: translateY(-1px); }
.cookie-button:focus-visible, .cookie-preferences .form-check-input:focus-visible { outline: 3px solid rgba(40,100,240,.32); outline-offset: 2px; box-shadow: none; }
.cookie-button--primary { color: white; background: var(--consent-blue); box-shadow: 0 8px 22px rgba(40,100,240,.2); }
.cookie-button--primary:hover { color: white; background: var(--consent-blue-dark); }
.cookie-button--secondary { background: #f2f5f9; border-color: #d9e1eb; }
.cookie-button--secondary:hover { background: #e7edf5; border-color: #c8d3e1; }
.cookie-button--ghost { border-color: #bdc9d8; }
.cookie-button--ghost:hover { color: var(--consent-blue-dark); border-color: var(--consent-blue); }
.cookie-button--link { color: var(--consent-blue-dark); text-decoration: underline; text-underline-offset: 3px; }

.cookie-preferences .modal-dialog { max-width: 650px; }
.cookie-preferences .modal-content { overflow: hidden; border: 0; border-radius: 20px; box-shadow: 0 28px 80px rgba(8,26,48,.3); }
.cookie-preferences .modal-header { padding: 1.5rem 1.6rem 1.1rem; align-items: flex-start; border-bottom: 1px solid var(--consent-line); }
.cookie-preferences__eyebrow { display: block; margin-bottom: .25rem; color: var(--consent-blue-dark); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cookie-preferences .modal-title { color: var(--consent-navy); font-size: 1.5rem; font-weight: 800; letter-spacing: -.025em; }
.cookie-preferences .btn-close:focus { box-shadow: 0 0 0 3px rgba(40,100,240,.25); }
.cookie-preferences .modal-body { padding: 1.35rem 1.6rem; }
.cookie-preferences__intro { margin: 0 0 .7rem; color: var(--consent-muted); font-size: .88rem; line-height: 1.6; }
.cookie-category { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1.25rem; align-items: center; padding: 1.15rem 0; border-bottom: 1px solid var(--consent-line); }
.cookie-category:last-child { border-bottom: 0; }
.cookie-category__copy h3 { margin: 0 0 .3rem; color: var(--consent-navy); font-size: .94rem; font-weight: 800; }
.cookie-category__copy h3 span { display: inline-block; margin-left: .35rem; padding: .2rem .45rem; color: #11685f; background: #e2f7f4; border-radius: 100px; font-size: .6875rem; letter-spacing: .03em; text-transform: uppercase; vertical-align: 2px; }
.cookie-category__copy p { margin: 0; color: var(--consent-muted); font-size: .8125rem; line-height: 1.6; }
.cookie-preferences .form-switch { margin: 0; padding-left: 0; }
.cookie-preferences .form-switch .form-check-input { width: 2.75rem; height: 1.45rem; margin: 0; cursor: pointer; }
.cookie-preferences .form-check-input:checked { background-color: var(--consent-blue); border-color: var(--consent-blue); }
.cookie-preferences .form-check-input:disabled { background-color: #198f82; border-color: #198f82; opacity: .72; cursor: not-allowed; }
.cookie-preferences .modal-footer { gap: .6rem; padding: 1rem 1.6rem 1.4rem; border-top: 1px solid var(--consent-line); }

@media (max-width: 991.98px) {
  .cookie-consent__content { grid-template-columns: auto minmax(0,1fr); }
  .cookie-consent__actions { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 575.98px) {
  .cookie-consent { right: .6rem; bottom: .6rem; left: .6rem; max-height: calc(100dvh - 1.2rem); overflow-y: auto; border-radius: 15px; }
  .cookie-consent__content { display: block; padding: 1.15rem; }
  .cookie-consent__icon { width: 40px; height: 40px; margin-bottom: .75rem; border-radius: 11px; }
  .cookie-consent__copy p { font-size: .875rem; }
  .cookie-consent__actions { grid-template-columns: 1fr; margin-top: 1rem; }
  .cookie-button { width: 100%; }
  .cookie-preferences .modal-dialog { margin: .6rem; }
  .cookie-preferences .modal-header,.cookie-preferences .modal-body { padding-right: 1.1rem; padding-left: 1.1rem; }
  .cookie-preferences .modal-footer { padding: 1rem 1.1rem 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-consent,.cookie-button { transition-duration: .01ms !important; }
}
