/* ULS Cookie Consent (see js/cookie.js) */

.cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  background: #262626;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-banner.is-open {
  transform: translateY(0);
}

.cc-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
}

.cc-banner__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #fff;
}

.cc-banner__text strong {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cc-banner__text a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.cc-banner__text a:hover,
.cc-banner__text a:focus-visible {
  border-bottom-color: #fff;
}

.cc-banner__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cc-banner__actions .cc-btn--manage {
  grid-column: 1 / -1;
}

/* Buttons */

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cc-btn:focus-visible {
  outline: 2px solid #4da3ff;
  outline-offset: 2px;
}

.cc-btn--light {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.cc-btn--light:hover {
  background: #e9e9e9;
}

.cc-btn--dark {
  background: #000;
  color: #fff;
  border-color: #000;
}

.cc-btn--dark:hover {
  background: #1f1f1f;
}

.cc-btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.cc-btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.cc-btn--outline-dark {
  background: transparent;
  color: #111;
  border-color: #111;
}

.cc-btn--outline-dark:hover {
  background: #f2f2f2;
}

.cc-btn--light-dark {
  background: #f2f2f2;
  color: #111;
  border-color: #d6d6d6;
}

.cc-btn--light-dark:hover {
  background: #e6e6e6;
}

.cc-banner .cc-btn--accept {
  min-width: 0;
}

/* Footer link that reopens the preferences */

.cc-settings-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cc-settings-link:hover,
.cc-settings-link:focus-visible {
  color: var(--primary, #032f64);
  text-decoration: underline;
}

/* Preferences dialog */

html.cc-lock {
  overflow: hidden;
}

.cc-modal {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  background: #fff;
  color: #222;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.cc-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.cc-modal--fallback {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100001;
  transform: translate(-50%, -50%);
}

.cc-modal[open] {
  animation: cc-modal-in 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cc-modal--fallback[open] {
  animation: none;
}

.cc-modal__panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
}

.cc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e5e5;
}

.cc-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.cc-modal__close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: #555;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cc-modal__close:hover {
  color: #000;
}

.cc-modal__body {
  padding: 18px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cc-modal__intro {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
}

.cc-modal__intro a {
  color: var(--primary, #032f64);
  font-weight: 600;
}

.cc-category {
  padding: 14px 0;
  border-top: 1px solid #eee;
}

.cc-category__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cc-category__title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
}

.cc-category__badge {
  font-size: 12px;
  font-weight: 600;
  color: #1a7f37;
  white-space: nowrap;
}

.cc-category__desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #555;
}

/* Toggle switch built on a real checkbox */

.cc-switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
}

.cc-switch__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.cc-switch__input:disabled {
  cursor: not-allowed;
}

.cc-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: #c9c9c9;
  transition: background-color 0.2s ease;
}

.cc-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.cc-switch__input:checked + .cc-switch__track {
  background: #111;
}

.cc-switch__input:checked + .cc-switch__track::after {
  transform: translateX(20px);
}

.cc-switch__input:disabled + .cc-switch__track {
  opacity: 0.55;
}

.cc-switch__input:focus-visible + .cc-switch__track {
  outline: 2px solid #4da3ff;
  outline-offset: 2px;
}

.cc-modal__footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e5e5e5;
  background: #fafafa;
}

/* Tablet and up */

@media (min-width: 576px) {
  .cc-banner__inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .cc-banner__actions {
    display: flex;
    flex-wrap: wrap;
  }

  .cc-modal__footer {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop: text left, buttons right, as in the reference design */

@media (min-width: 992px) {
  .cc-banner__inner {
    flex-direction: row;
    align-items: center;
    gap: 40px;
    padding: 20px 32px;
  }

  .cc-banner__text {
    flex: 1 1 auto;
    font-size: 13.5px;
  }

  .cc-banner__actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 16px;
  }

  .cc-banner .cc-btn {
    min-height: 48px;
  }

  .cc-banner .cc-btn--accept {
    min-width: 126px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner,
  .cc-modal[open] {
    transition: none;
    animation: none;
  }
}
