:root {
  --ab-consent-navy: #052454;
  --ab-consent-blue: #0a3a7a;
  --ab-consent-blue-deep: #0c1b4c;
  --ab-consent-sky: #1a5c9e;
  --ab-consent-divider: rgba(255, 255, 255, 0.14);
  --ab-consent-green: #56ad56;
  --ab-consent-green-hover: #48a048;
  --ab-consent-shadow: 0 22px 56px rgba(5, 36, 84, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

html.ab-consent-open {
  overflow: hidden;
}

.ab-consent {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.ab-consent[hidden],
.ab-consent.ab-consent--hidden {
  display: none !important;
}

.ab-consent.ab-consent--boot {
  pointer-events: auto;
}

.ab-consent__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 36, 84, 0.48);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  pointer-events: auto;
}

.ab-consent__panel {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 20px));
  border-radius: 18px;
  box-shadow: var(--ab-consent-shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: auto;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--ab-consent-navy);
  background-image:
    url('../image/art-consent-skyline.svg'),
    radial-gradient(ellipse 80% 70% at 88% -12%, rgba(72, 140, 220, 0.32) 0%, transparent 54%),
    radial-gradient(ellipse 55% 45% at 8% 110%, rgba(86, 173, 86, 0.12) 0%, transparent 50%),
    linear-gradient(156deg, var(--ab-consent-blue-deep) 0%, var(--ab-consent-navy) 46%, var(--ab-consent-blue) 100%);
  background-repeat: no-repeat;
  background-size: 92% 58%, auto, auto, auto;
  background-position: right bottom, 0 0, 0 0, 0 0;
}

.ab-consent__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(5, 36, 84, 0.18) 0%, rgba(5, 36, 84, 0.55) 46%, rgba(5, 36, 84, 0.72) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 18%, transparent 42%);
  pointer-events: none;
}

.ab-consent__panel::after {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(86, 173, 86, 0.5) 35%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(86, 173, 86, 0.5) 65%,
    transparent 100%
  );
  pointer-events: none;
}

.ab-consent__bar,
.ab-consent__prefs {
  position: relative;
  z-index: 1;
  padding: 22px 24px 18px;
}

.ab-consent__bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ab-consent__copy {
  padding-right: 8px;
}

.ab-consent__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.ab-consent__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.ab-consent__link {
  color: #b8e6b8;
  font-weight: 600;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s ease;
}

.ab-consent__link:hover {
  color: #fff;
}

.ab-consent__actions,
.ab-consent__prefs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid var(--ab-consent-divider);
}

.ab-consent__btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.ab-consent__btn:active {
  transform: translateY(1px);
}

.ab-consent__btn:focus-visible {
  outline: 2px solid var(--ab-consent-green);
  outline-offset: 2px;
}

.ab-consent__btn--reject {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.42);
}

.ab-consent__btn--reject:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.ab-consent__btn--primary {
  background: var(--ab-consent-green);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 10px rgba(86, 173, 86, 0.35);
}

.ab-consent__btn--primary:hover {
  background: var(--ab-consent-green-hover);
  box-shadow: 0 6px 18px rgba(86, 173, 86, 0.4);
  transform: translateY(-1px);
}

.ab-consent__btn--outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.ab-consent__btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.62);
  transform: translateY(-1px);
}

.ab-consent__prefs-head {
  margin-bottom: 14px;
}

.ab-consent__prefs-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.ab-consent__prefs-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.68);
}

.ab-consent__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ab-consent__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.ab-consent__option--locked {
  cursor: default;
  opacity: 0.88;
}

.ab-consent__option-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ab-consent__option-name {
  font-size: 13px;
  font-weight: 650;
  color: #fff;
  line-height: 1.25;
}

.ab-consent__option-hint {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
}

.ab-consent__toggle {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 24px;
}

.ab-consent__toggle input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ab-consent__toggle input:disabled {
  cursor: default;
}

.ab-consent__toggle-ui {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background 0.18s ease;
}

.ab-consent__toggle-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}

.ab-consent__toggle input:checked + .ab-consent__toggle-ui {
  background: var(--ab-consent-green);
}

.ab-consent__toggle input:checked + .ab-consent__toggle-ui::after {
  transform: translateX(20px);
}

.ab-consent__toggle input:focus-visible + .ab-consent__toggle-ui {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ab-consent__prefs-actions {
  justify-content: flex-end;
}

.ab-consent__fab {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, var(--ab-consent-blue) 0%, var(--ab-consent-navy) 100%);
  color: #fff;
  box-shadow: var(--ab-consent-shadow);
  pointer-events: auto;
  cursor: pointer;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ab-consent__fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(5, 36, 84, 0.5);
}

.ab-consent__fab[hidden] {
  display: none !important;
}

@media (min-width: 768px) {
  .ab-consent__panel {
    bottom: 24px;
    border-radius: 20px;
  }

  .ab-consent__bar,
  .ab-consent__prefs {
    padding: 26px 28px 22px;
  }

  .ab-consent__bar {
    gap: 0;
  }

  .ab-consent__copy {
    padding-bottom: 4px;
  }

  .ab-consent__actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    padding-top: 16px;
    margin-top: 4px;
  }

  .ab-consent__btn {
    padding: 10px 18px;
    white-space: nowrap;
  }
}

@media (max-width: 479px) {
  .ab-consent__bar,
  .ab-consent__prefs {
    padding: 18px 18px 16px;
  }

  .ab-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 14px;
  }

  .ab-consent__actions .ab-consent__btn--primary {
    grid-column: 1 / -1;
    order: -1;
  }

  .ab-consent__actions .ab-consent__btn--reject {
    grid-column: 1;
  }

  .ab-consent__actions .ab-consent__btn--outline {
    grid-column: 2;
  }
}
