/*------------------------------------------------------------------------------
Cookie Consent Manager
------------------------------------------------------------------------------*/
:root {
  --lv-consent-surface: rgba(34, 34, 34, 0.96);
  --lv-consent-border: rgba(255, 255, 255, 0.18);
  --lv-consent-text-muted: rgba(255, 255, 255, 0.82);
  --lv-consent-text-strong: rgba(255, 255, 255, 0.86);
  --lv-consent-button-bg: rgba(255, 255, 255, 0.08);
  --lv-consent-button-bg-hover: rgba(255, 255, 255, 0.16);
  --lv-consent-button-border: rgba(255, 255, 255, 0.32);
  --lv-consent-button-border-hover: rgba(255, 255, 255, 0.7);
  --lv-consent-primary-text: rgba(34, 34, 34, 0.96);
  --lv-consent-primary-bg-hover: rgba(255, 255, 255, 0.86);
}

.lv-consent {
  position: fixed;
  inset: auto auto 2rem 2rem;
  width: min(42rem, calc(100vw - 4rem));
  color: var(--lv-color-white);
  font-size: 1.4rem;
  line-height: 1.6;
  z-index: 100000;
}

.lv-consent[hidden] {
  display: none !important;
}

.lv-consent__panel,
.lv-consent__dialog {
  background: var(--lv-consent-surface);
  border: 1px solid var(--lv-consent-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
}

.lv-consent__panel {
  box-sizing: border-box;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2.4rem;
}

.lv-consent__panel,
.lv-consent__dialog {
  scrollbar-width: thin;
  scrollbar-color: var(--lv-color-text-muted) transparent;
}

.lv-consent__panel::-webkit-scrollbar,
.lv-consent__dialog::-webkit-scrollbar {
  width: 6px;
}

.lv-consent__panel::-webkit-scrollbar-track,
.lv-consent__dialog::-webkit-scrollbar-track {
  background: transparent;
}

.lv-consent__panel::-webkit-scrollbar-thumb,
.lv-consent__dialog::-webkit-scrollbar-thumb {
  background: var(--lv-color-text-muted);
  border-radius: var(--lv-radius-soft);
}

.lv-consent__icon {
  display: block;
  width: fit-content;
  margin: 0 auto 1.4rem;
  color: var(--lv-color-white);
  font-size: 5.4rem;
  line-height: 1;
}

.lv-consent__title {
  margin: 0 0 1rem;
  font-size: 1.8rem;
  text-align: center;
}

.lv-consent__body,
.lv-consent__why,
.lv-consent__intro,
.lv-consent__category-description,
.lv-consent__note {
  margin: 0;
  color: var(--lv-consent-text-muted);
}

.lv-consent__why-toggle {
  margin: 1.2rem 0 0;
  padding: 0;
  color: var(--lv-color-white);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
}

.lv-consent__why {
  margin-top: 1.2rem;
}

.lv-consent__why[hidden] {
  display: none;
}

.lv-consent__why p + p {
  margin-top: 0.8rem;
}

.lv-consent__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.lv-consent__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.4rem;
  padding: 0.8rem 1.2rem;
  color: var(--lv-color-white);
  background: var(--lv-consent-button-bg);
  border: 1px solid var(--lv-consent-button-border);
  cursor: pointer;
  text-align: center;
  transition:
    background-color 0.3s,
    border-color 0.3s,
    transform 0.3s;
}

.lv-consent__button:hover,
.lv-consent__button:focus-visible {
  background: var(--lv-consent-button-bg-hover);
  border-color: var(--lv-consent-button-border-hover);
  transform: translateY(-1px);
}

.lv-consent__button--primary {
  color: var(--lv-consent-primary-text);
  background: var(--lv-color-white);
  border-color: var(--lv-color-white);
}

.lv-consent__button--primary:hover,
.lv-consent__button--primary:focus-visible {
  color: var(--lv-consent-primary-text);
  background: var(--lv-consent-primary-bg-hover);
  border-color: var(--lv-consent-primary-bg-hover);
}

.lv-consent__modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100001;
}

.lv-consent__modal[hidden] {
  display: none;
}

.lv-consent__dialog {
  width: min(62rem, 100%);
  max-height: calc(100vh - 4rem);
  padding: 2.4rem;
  overflow: auto;
}

.lv-consent__dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.6rem;
}

.lv-consent__dialog-title {
  margin: 0 0 0.6rem;
  font-size: 2.2rem;
}

.lv-consent__close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  color: var(--lv-color-neutral-700);
  background-color: var(--lv-color-surface-strong);
  border: unset;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 3rem;
  line-height: 3rem;
  transition:
    color 0.5s,
    background-color 0.5s;
}

.lv-consent__close:hover,
.lv-consent__close:focus-visible {
  color: var(--lv-color-white);
  background-color: var(--lv-color-surface-modal-hover);
}

.lv-consent__categories {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.lv-consent__category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  padding: 1.4rem;
  border: 1px solid var(--lv-consent-border);
  background: rgba(255, 255, 255, 0.05);
}

.lv-consent__category-title {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
}

.lv-consent__switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 4.5rem;
  height: 2rem;
}

.lv-consent__switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lv-consent__slider {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

.lv-consent__slider::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.4rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--lv-color-white);
  transition: transform 0.3s;
}

.lv-consent__switch input:checked + .lv-consent__slider {
  background: rgba(255, 255, 255);
  border-color: rgba(255, 255, 255, 0.68);
}

.lv-consent__switch input:checked + .lv-consent__slider::before {
  background: rgb(127 255 88);
  transform: translateX(2.2rem);
}

.lv-consent__switch input:focus-visible + .lv-consent__slider {
  outline: 2px solid var(--lv-color-white);
  outline-offset: 3px;
}

.lv-consent__switch input:disabled + .lv-consent__slider {
  opacity: 0.7;
  cursor: not-allowed;
}

.lv-consent__status {
  min-height: 1.6em;
  margin-top: 1rem;
  color: var(--lv-consent-text-strong);
}

.lv-consent__toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  width: min(48rem, calc(100vw - 4rem));
  padding: 1.2rem 1.6rem;
  color: var(--lv-color-white);
  background: var(--lv-consent-surface);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transform: translateX(-50%);
  z-index: 100002;
}

.lv-consent__toast[hidden] {
  display: none;
}

@media (max-width: 767px) {
  .lv-consent {
    inset: auto 0 0;
    width: 100%;
    font-size: 1.3rem;
  }

  .lv-consent__panel {
    max-height: 70vh;
    padding: 1.6rem;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .lv-consent__icon {
    font-size: 4.4rem;
    margin-bottom: 1rem;
  }

  .lv-consent__actions {
    grid-template-columns: 1fr;
  }

  .lv-consent__button {
    min-height: 4.2rem;
  }

  .lv-consent__modal {
    align-items: flex-end;
    padding: 0;
  }

  .lv-consent__dialog {
    width: 100%;
    max-height: 88vh;
    padding: 1.6rem;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .lv-consent__category {
    grid-template-columns: 1fr;
  }
}
