.at-cookie,
.at-cookie *,
.at-cookie *::before,
.at-cookie *::after {
  box-sizing: border-box;
}

.at-cookie[hidden],
.at-cookie__details[hidden] {
  display: none !important;
}

.at-cookie {
  --cookie-bg: #fbfcfd;
  --cookie-surface: #f4f6f8;
  --cookie-surface-hover: #eef1f4;
  --cookie-text: #20242b;
  --cookie-text-soft: #5f6672;
  --cookie-text-muted: #737b87;
  --cookie-border: #d9dee5;
  --cookie-border-strong: #c9d0d9;
  --cookie-accent: #0f766e;
  --cookie-accent-hover: #0b5f59;
  --cookie-focus: rgba(15, 118, 110, 0.18);

  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  color: var(--cookie-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.at-cookie__shell {
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: rgba(251, 252, 253, 0.98);
  border-top: 1px solid var(--cookie-border);
  box-shadow: 0 -4px 16px rgba(25, 31, 40, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.at-cookie__shell::before,
.at-cookie__shell::after,
.at-cookie__main::before,
.at-cookie__main::after,
.at-cookie__card::before,
.at-cookie__card::after {
  display: none !important;
  content: none !important;
}

.at-cookie__main {
  width: min(1440px, 100%);
  min-height: 58px;
  margin: 0 auto;
  padding: 9px clamp(16px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: transparent;
}

.at-cookie__copy,
.at-cookie__content {
  min-width: 0;
}

.at-cookie__copy {
  flex: 1 1 auto;
}

.at-cookie__content {
  color: var(--cookie-text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.at-cookie__title {
  display: inline;
  margin: 0 7px 0 0;
  color: var(--cookie-text);
  font-size: 13px;
  line-height: inherit;
  font-weight: 650;
  letter-spacing: -0.005em;
}

.at-cookie__text {
  display: inline;
  color: var(--cookie-text-soft);
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;
}

.at-cookie__link {
  appearance: none;
  display: inline;
  margin: 0 0 0 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cookie-accent);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.at-cookie__link::after {
  display: none !important;
  content: none !important;
}

.at-cookie__link:hover {
  color: var(--cookie-accent-hover);
}

.at-cookie__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.at-cookie__btn {
  appearance: none;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--cookie-border-strong);
  border-radius: 4px;
  background: #ffffff;
  color: var(--cookie-text);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.at-cookie__btn:hover {
  background: var(--cookie-surface);
  border-color: #b8c0cb;
}

.at-cookie__btn:focus-visible,
.at-cookie__link:focus-visible,
.at-cookie__switch input:focus-visible + span {
  outline: 3px solid var(--cookie-focus);
  outline-offset: 2px;
}

.at-cookie__btn--primary {
  color: #ffffff;
  background: var(--cookie-accent);
  border-color: var(--cookie-accent);
}

.at-cookie__btn--primary:hover {
  color: #ffffff;
  background: var(--cookie-accent-hover);
  border-color: var(--cookie-accent-hover);
}

.at-cookie__btn--secondary {
  color: var(--cookie-text);
  background: #ffffff;
}

.at-cookie__btn--ghost {
  color: var(--cookie-text-soft);
  background: transparent;
  border-color: transparent;
}

.at-cookie__btn--ghost:hover {
  color: var(--cookie-text);
  background: var(--cookie-surface-hover);
  border-color: var(--cookie-border);
}

/* Expanded settings area. The compact banner above remains unchanged. */
.at-cookie__details {
  max-height: min(68vh, 560px);
  overflow-y: auto;
  padding: 16px clamp(16px, 3vw, 42px) 18px;
  background: var(--cookie-surface);
  border-top: 1px solid var(--cookie-border);
}

.at-cookie__details > * {
  width: min(1360px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.at-cookie__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.at-cookie__card {
  min-width: 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--cookie-border);
  border-radius: 4px;
  box-shadow: none;
}

.at-cookie__card--locked {
  background: #fafbfc;
}

.at-cookie__card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.at-cookie__card-kicker {
  display: none !important;
}

.at-cookie__card h3 {
  margin: 0;
  color: var(--cookie-text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.at-cookie__card-head p {
  margin: 3px 0 0;
  color: var(--cookie-text-muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

.at-cookie__desc {
  margin: 0;
  color: var(--cookie-text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.at-cookie__switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.at-cookie__switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.at-cookie__switch span {
  position: relative;
  display: block;
  width: 36px;
  height: 20px;
  border: 1px solid #b9c1cb;
  border-radius: 10px;
  background: #dfe3e8;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.at-cookie__switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border: 1px solid rgba(25, 31, 40, 0.12);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(25, 31, 40, 0.18);
  transition: transform 0.15s ease;
}

.at-cookie__switch input:checked + span {
  background: var(--cookie-accent);
  border-color: var(--cookie-accent);
}

.at-cookie__switch input:checked + span::after {
  transform: translateX(16px);
}

.at-cookie__switch--locked {
  cursor: not-allowed;
}

.at-cookie__switch--locked span {
  background: var(--cookie-accent);
  border-color: var(--cookie-accent);
  opacity: 0.72;
}

.at-cookie__switch--locked span::after {
  transform: translateX(16px);
}

.at-cookie__third {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin-top: 9px;
  padding: 10px 12px;
  color: var(--cookie-text-soft);
  background: #ffffff;
  border: 1px solid var(--cookie-border);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.at-cookie__third strong {
  flex: 0 0 auto;
  color: var(--cookie-text);
  font-weight: 650;
}

.at-cookie__note {
  margin-top: 8px;
  margin-bottom: 0;
  color: var(--cookie-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .at-cookie__main {
    gap: 14px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .at-cookie__content,
  .at-cookie__title,
  .at-cookie__link {
    font-size: 12px;
  }

  .at-cookie__actions {
    gap: 5px;
  }

  .at-cookie__btn {
    min-height: 32px;
    padding-right: 9px;
    padding-left: 9px;
    font-size: 11.5px;
  }

  .at-cookie__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .at-cookie__shell {
    box-shadow: 0 -3px 12px rgba(25, 31, 40, 0.06);
  }

  .at-cookie__main {
    min-height: 0;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
  }

  .at-cookie__copy {
    grid-column: 1 / -1;
  }

  .at-cookie__content {
    display: block;
    font-size: 12px;
    line-height: 1.4;
  }

  .at-cookie__title {
    font-size: 12px;
  }

  .at-cookie__text {
    font-size: 12px;
  }

  .at-cookie__link {
    margin-left: 5px;
    font-size: 12px;
  }

  .at-cookie__actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    white-space: normal;
  }

  .at-cookie__btn {
    width: 100%;
    min-height: 34px;
    padding: 0 7px;
    font-size: 11px;
    line-height: 1.15;
  }

  .at-cookie__details {
    max-height: 62vh;
    padding: 12px;
  }

  .at-cookie__grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .at-cookie__third {
    display: block;
  }

  .at-cookie__third strong {
    display: block;
    margin-bottom: 3px;
  }
}

@media (max-width: 430px) {
  .at-cookie__main {
    padding: 9px 10px 10px;
  }

  .at-cookie__actions {
    grid-template-columns: 1fr 1fr;
  }

  .at-cookie__btn--ghost {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .at-cookie__btn,
  .at-cookie__switch span,
  .at-cookie__switch span::after {
    transition: none;
  }
}
