:root {
  --avmcc-accent: #4E7C63;
  --avmcc-bg: #F5F4F0;
  --avmcc-text: #2F2F2F;
  --avmcc-muted: #575757;
  --avmcc-border: rgba(47, 47, 47, 0.14);
  --avmcc-white: #ffffff;
  --avmcc-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}


.avm-cookie-root,
.avm-cookie-root * {
  box-sizing: border-box;
}

.avm-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 99999;
  width: min(920px, calc(100vw - 32px));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 252, 249, 0.98) 100%);
  color: var(--avmcc-text);
  border: 1px solid rgba(47, 47, 47, 0.12);
  border-radius: 22px;
  box-shadow: var(--avmcc-shadow);
  padding: 24px;
  font-family: inherit;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.avm-cookie-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: var(--avmcc-accent);
}

.avm-cookie-banner__title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--avmcc-text);
}

.avm-cookie-banner__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--avmcc-muted);
  max-width: 60ch;
}

.avm-cookie-banner__content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.avm-cookie-banner__actions,
.avm-cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.avm-cookie-btn {
  appearance: none;
  border: 1px solid var(--avmcc-accent);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 13px 18px;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.avm-cookie-btn:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}

.avm-cookie-btn--primary {
  background: var(--avmcc-accent);
  color: #fff;
}

.avm-cookie-btn--secondary {
  background: transparent;
  color: var(--avmcc-accent);
}

.avm-cookie-btn--ghost {
  background: #fff;
  color: var(--avmcc-text);
  border-color: var(--avmcc-border);
}

.avm-cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.avm-cookie-modal {
  width: min(720px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  background: #fff;
  color: var(--avmcc-text);
  border-radius: 24px;
  box-shadow: var(--avmcc-shadow);
  padding: 28px;
  font-family: inherit;
  border-top: 4px solid var(--avmcc-accent);
}

.avm-cookie-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.avm-cookie-modal__title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 600;
}

.avm-cookie-modal__intro {
  margin: 0 0 20px;
  color: var(--avmcc-muted);
  line-height: 1.55;
  font-size: 15px;
}

.avm-cookie-modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  color: var(--avmcc-muted);
}

.avm-cookie-category {
  border: 1px solid var(--avmcc-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
}

.avm-cookie-category__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.avm-cookie-category__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.avm-cookie-category__desc {
  margin: 0;
  color: var(--avmcc-muted);
  font-size: 14px;
  line-height: 1.45;
}

.avm-cookie-category__always {
  color: var(--avmcc-accent);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.avm-cookie-switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex: 0 0 auto;
}

.avm-cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.avm-cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d9d9d9;
  transition: 0.2s;
  border-radius: 999px;
}

.avm-cookie-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.avm-cookie-switch input:checked + .avm-cookie-slider {
  background: var(--avmcc-accent);
}

.avm-cookie-switch input:checked + .avm-cookie-slider:before {
  transform: translateX(22px);
}

.avm-cookie-modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0 22px;
}

.avm-cookie-modal__links a,
.avm-cookie-footer-link {
  color: var(--avmcc-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.avm-cookie-footer-link-wrapper {
  text-align: center;
  font-size: 13px;
  margin: 8px 0;
}

@media (max-width: 767px) {
  .avm-cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    transform: none;
    width: auto;
    border-radius: 18px;
    padding: 18px;
  }

  .avm-cookie-banner__title {
    font-size: 21px;
  }

  .avm-cookie-banner__content {
    grid-template-columns: 1fr;
  }

  .avm-cookie-banner__actions,
  .avm-cookie-modal__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .avm-cookie-btn {
    width: 100%;
  }

  .avm-cookie-modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .avm-cookie-modal {
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    padding: 22px;
  }
}
