/* Keep CookieYes' controls and consent behavior; only compact the layout. */
.cky-consent-container .cky-consent-bar .cky-notice-content-wrapper {
  padding: 16px 0 10px;
}

.cky-consent-container .cky-consent-bar .cky-title {
  margin: 0 0 6px;
  padding-inline: 16px;
  font-size: 1rem;
  line-height: 1.35;
}

.cky-consent-container .cky-consent-bar .cky-notice-des {
  padding-inline: 16px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.cky-consent-container .cky-consent-bar .cky-notice-btn-wrapper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-inline: 16px;
  margin: 10px 0 0;
}

.cky-consent-container .cky-consent-bar .cky-notice-btn-wrapper .cky-btn {
  order: 0;
  min-inline-size: 0;
  inline-size: 100%;
  min-block-size: 44px;
  block-size: auto;
  margin: 0;
  padding: 6px 4px;
  font-size: 0.875rem;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.cky-consent-container .cky-consent-bar .cky-btn:focus-visible,
.cky-modal button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .cky-consent-container .cky-consent-bar {
    max-block-size: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-block-end: env(safe-area-inset-bottom, 0px);
  }

  .cky-consent-container .cky-consent-bar .cky-notice-content-wrapper {
    padding-block: 12px 8px;
  }

  .cky-consent-container .cky-consent-bar .cky-title,
  .cky-consent-container .cky-consent-bar .cky-notice-des,
  .cky-consent-container .cky-consent-bar .cky-notice-btn-wrapper {
    padding-inline: 12px;
  }

  /* Keep the detailed choices in a scrollable sheet instead of a full page. */
  .cky-modal.cky-modal-open {
    inset: auto auto max(8px, env(safe-area-inset-bottom, 0px)) 50%;
    width: calc(100% - 16px);
    height: auto;
    max-height: 84dvh;
    transform: translateX(-50%);
    border-radius: 12px;
    overflow: hidden;
  }

  .cky-modal.cky-modal-open .cky-preference-center {
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: 84dvh;
  }

  .cky-modal.cky-modal-open .cky-preference-header {
    padding: 8px 12px;
    align-items: center;
  }

  .cky-modal.cky-modal-open .cky-btn-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .cky-modal.cky-modal-open .cky-preference-body-wrapper {
    min-height: 0;
    padding-inline: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .cky-modal.cky-modal-open .cky-prefrence-btn-wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 12px;
  }

  .cky-modal.cky-modal-open .cky-prefrence-btn-wrapper .cky-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: auto;
    margin: 0;
    padding: 6px 3px;
    font-size: 0.875rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
