.dg-cookie,
.dg-pd-consent,
.dg-external-content {
  box-sizing: border-box;
  font-family: "Involve", Arial, sans-serif;
}

.dg-cookie *,
.dg-pd-consent *,
.dg-external-content * {
  box-sizing: border-box;
}

.dg-cookie[hidden],
.dg-pd-consent__error[hidden],
.dg-cookie [hidden] {
  display: none !important;
}

.dg-cookie {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40000;
  width: min(800px, calc(100% - 48px));
  padding: 20px;
  color: #252a2d;
  background: #fbfaf6;
  border: 1px solid rgba(37, 42, 45, 0.2);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(30, 35, 38, 0.12);
}

.dg-cookie.is-customizing {
  width: min(860px, calc(100% - 48px));
}

.dg-cookie__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.dg-cookie.is-customizing .dg-cookie__summary {
  display: none;
}

.dg-cookie__title {
  margin: 0 0 7px;
  color: #252a2d;
  font-family: "Haval", "Involve", Arial, sans-serif;
  font-size: clamp(23px, 2vw, 26px);
  font-weight: 300;
  line-height: 1.1;
}

.dg-cookie__text {
  max-width: 58ch;
  margin: 0;
  color: rgba(37, 42, 45, 0.72);
  font-size: 14px;
  line-height: 1.45;
}

.dg-cookie__text a,
.dg-pd-consent__text a {
  color: #670009;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dg-cookie__customize,
.dg-cookie__back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0;
  color: #670009;
  background: transparent;
  border: 0;
  font: 600 14px/1.2 "Involve", Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.dg-cookie__customize:hover,
.dg-cookie__back:hover {
  color: #7a0110;
}

.dg-cookie__custom {
  min-width: 0;
}

.dg-cookie__custom-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.dg-cookie__custom-title {
  margin: 0;
  color: #252a2d;
  font-family: "Haval", "Involve", Arial, sans-serif;
  font-size: clamp(24px, 2vw, 28px);
  font-weight: 300;
  line-height: 1.1;
}

.dg-cookie__custom-text {
  max-width: 58ch;
  margin: 7px 0 0;
  color: rgba(37, 42, 45, 0.72);
  font-size: 14px;
  line-height: 1.45;
}

.dg-cookie__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.dg-cookie__preferences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.dg-cookie__preference {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  min-height: 88px;
  padding: 14px;
  background: #f4f4f1;
  border: 1px solid rgba(37, 42, 45, 0.13);
  border-radius: 20px;
  cursor: pointer;
}

.dg-cookie__preference input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #670009;
}

.dg-cookie__preference span,
.dg-cookie__preference strong,
.dg-cookie__preference small {
  display: block;
  min-width: 0;
}

.dg-cookie__preference strong {
  color: #252a2d;
  font-size: 14px;
  line-height: 1.25;
}

.dg-cookie__preference small {
  margin-top: 3px;
  color: rgba(37, 42, 45, 0.7);
  font-size: 12px;
  line-height: 1.35;
}

.dg-cookie__preference.is-required,
.dg-cookie__preference.is-unavailable {
  background: #e5e7e4;
  cursor: default;
}

.dg-cookie__preference.is-unavailable {
  opacity: 0.76;
}

.dg-cookie__error {
  margin: 14px 0 0;
  color: #8f1320;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.dg-cookie__error[hidden] {
  display: none !important;
}

.dg-cookie__button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.dg-cookie__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
  min-width: 310px;
}

.dg-cookie__actions--custom {
  width: min(100%, 390px);
  margin: 18px 0 0 auto;
}

.dg-cookie__button,
.dg-external-content__button {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid rgba(37, 42, 45, 0.2);
  border-radius: 999px;
  font: 600 14px/1.2 "Involve", Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.dg-cookie__button--primary,
.dg-external-content__button {
  color: #fffdf9;
  background: #670009;
  border-color: #670009;
}

.dg-cookie__button--primary:hover,
.dg-external-content__button:hover {
  background: #7a0110;
  border-color: #7a0110;
}

.dg-cookie__button--secondary {
  color: #252a2d;
  background: #fbfaf6;
}

.dg-cookie__button--secondary:hover {
  color: #670009;
  border-color: rgba(103, 0, 9, 0.4);
}

.dg-cookie__button:focus-visible,
.dg-external-content__button:focus-visible,
.dg-cookie__customize:focus-visible,
.dg-cookie__back:focus-visible,
.dg-cookie__preference input:focus-visible,
.dg-pd-consent__input:focus-visible {
  outline: 3px solid rgba(103, 0, 9, 0.28);
  outline-offset: 3px;
}

.dg-pd-consent {
  display: block;
  width: 100%;
  padding: 14px 16px;
  color: #252a2d;
  background: #fbfaf6;
  border: 1px solid rgba(37, 42, 45, 0.13);
  border-radius: 20px;
}

.dg-pd-consent__label {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0 !important;
  padding: 0 !important;
  color: #252a2d !important;
  cursor: pointer;
}

.wpcf7-form .dg-pd-consent .dg-pd-consent__input,
#popup .wpcf7-form .dg-pd-consent .dg-pd-consent__input {
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  margin: 1px 0 0 !important;
  padding: 0 !important;
  accent-color: #670009;
  box-shadow: none !important;
}

.dg-pd-consent__text {
  color: #252a2d !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
}

.dg-pd-consent__error {
  display: block;
  margin: 8px 0 0 32px;
  color: #8f1320;
  font-size: 13px;
  line-height: 1.35;
}

.dg-external-content {
  position: relative;
  display: grid;
  place-items: stretch;
  width: 100%;
  min-height: 240px;
  overflow: hidden;
  color: #252a2d;
  background: #e5e7e4;
  border: 1px solid rgba(37, 42, 45, 0.13);
  border-radius: 20px;
}

.dg-external-content > iframe,
.dg-external-content__notice {
  grid-area: 1 / 1;
}

.dg-external-content > iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 240px;
  border: 0;
}

.dg-external-content__notice {
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: #e5e7e4;
}

.dg-external-content__notice strong {
  font-size: 18px;
  line-height: 1.25;
}

.dg-external-content__notice span {
  max-width: 48ch;
  color: rgba(37, 42, 45, 0.72);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 767px) {
  .dg-cookie {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100svh - 24px);
    padding: 16px;
    overflow: auto;
  }

  .dg-cookie.is-customizing {
    width: auto;
  }

  .dg-cookie__summary {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dg-cookie__title,
  .dg-cookie__custom-title {
    font-size: 22px;
  }

  .dg-cookie__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .dg-cookie__preferences {
    grid-template-columns: 1fr;
  }

  .dg-cookie__button {
    width: 100%;
  }

  .dg-cookie__custom-head {
    gap: 14px;
  }

  .dg-cookie__actions--custom {
    width: 100%;
  }

}

@media (max-width: 359px) {
  .dg-cookie__title {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dg-cookie__button,
  .dg-external-content__button {
    transition: none;
  }
}
