.vm-consent-panel[hidden],
.vm-consent-panel [hidden] {
  display: none !important;
}

.vm-consent-panel {
  position: fixed;
  right: 20px;
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  z-index: 10000;

  width: min(460px, calc(100vw - 40px));
  max-height: min(680px, calc(100vh - 100px));
  max-height: min(
    680px,
    calc(100dvh - 100px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))
  );
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;

  padding: 24px;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  color: #171717;
  box-shadow: 0 12px 40px rgb(0 0 0 / 14%);

  font-family: Inter, Arial, sans-serif;
}

.vm-consent-panel h2 {
  margin: 0 30px 12px 0;
  font-size: 18px;
  line-height: 1.4;
}

.vm-consent-panel p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
}

.vm-consent-panel a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.vm-consent-category {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0;
  cursor: pointer;
}

.vm-consent-category input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: #171717;
}

.vm-consent-category strong,
.vm-consent-category small {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}

.vm-consent-category small {
  margin-top: 4px;
  color: #525252;
}

.vm-consent-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 26px;
}

.vm-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vm-consent-actions button {
  flex: 1 1 120px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #000;
  border-radius: 8px;
  background: #000;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.vm-consent-actions button:hover {
  background: #262626;
  border-color: #262626;
}

.vm-consent-actions button:active {
  background: #404040;
  border-color: #404040;
}

.vm-consent-actions button:focus-visible {
  outline: 3px solid #b8860b;
  outline-offset: 3px;
}

.vm-consent-settings {
  position: fixed;
  right: 20px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #fff;
  color: #171717;
  cursor: pointer;
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
}

.vm-consent-error {
  color: #b91c1c;
}

.vm-consent-panel button:focus-visible,
.vm-consent-panel input:focus-visible,
.vm-consent-panel a:focus-visible,
.vm-consent-settings:focus-visible {
  outline: 3px solid #b8860b;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .vm-consent-panel {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(64px, calc(64px + env(safe-area-inset-bottom, 0px)));
    width: auto;
    left: max(12px, env(safe-area-inset-left, 0px));
    max-height: calc(100vh - 88px);
    max-height: calc(
      100dvh - 88px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
    );
    padding: 20px;
  }

  .vm-consent-settings {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, calc(12px + env(safe-area-inset-bottom, 0px)));
  }

  .vm-consent-actions {
    flex-wrap: nowrap;
  }

  .vm-consent-actions button {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 8px;
  }
}
