/* Keep the consent panel within one fifth of the mobile viewport.
   Complianz continues to handle consent, category visibility and persistence. */
@media (max-width: 767px), (max-width: 1023px) and (max-height: 500px) {
  html body .cmplz-cookiebanner {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 20vh !important;
    height: 20svh !important;
    max-height: 20vh !important;
    max-height: 20svh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
    border-radius: 10px 10px 0 0 !important;
    flex-direction: column !important;
    gap: 4px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
  html body .cmplz-cookiebanner.cmplz-show { display: flex !important; }
  /* The draft toolbar must not cover the panel being reviewed. Absent on live pages. */
  body:has(.cmplz-cookiebanner.cmplz-show) #wpvibe-preview-banner {
    top: 46px !important;
    bottom: auto !important;
  }
  html body .cmplz-cookiebanner .cmplz-header {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
  }
  html body .cmplz-cookiebanner .cmplz-close,
  html body .cmplz-cookiebanner .cmplz-divider { display: none !important; }
  html body .cmplz-cookiebanner .cmplz-body {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 0 3px 0 0 !important;
    margin: 0 !important;
  }
  html body .cmplz-cookiebanner .cmplz-message,
  html body .cmplz-cookiebanner .cmplz-message p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1.35fr !important;
    gap: 5px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 4px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    margin: 0 !important;
    border-radius: 5px !important;
  }
  html body .cmplz-cookiebanner .cmplz-documents {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
  }
  html body .cmplz-cookiebanner .cmplz-documents ul {
    display: flex !important;
    justify-content: center;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body .cmplz-cookiebanner .cmplz-documents li { margin: 0 !important; padding: 0 !important; }
  html body .cmplz-cookiebanner .cmplz-documents a { font-size: 10px !important; line-height: 1.2 !important; }
  html body .cmplz-cookiebanner .cmplz-information { flex-shrink: 0; }
  html body .cmplz-cookiebanner .cmplz-category { margin-bottom: 4px; }
}
/* On short landscape screens, let the entire 20% panel scroll as well. */
@media (max-width: 1023px) and (max-height: 450px) {
  html body .cmplz-cookiebanner .cmplz-body { flex: 0 0 auto !important; max-height: 60px !important; }
}
