/* R55: consent is a document, while the Teamo workspace owns its chat scrollers. */
html:has(body #app > .shell[data-app="teamo"] .legal-consent-card),
html body:has(#app > .shell[data-app="teamo"] .legal-consent-card),
html body #app:has(> .shell[data-app="teamo"] .legal-consent-card),
html body #app > .shell[data-app="teamo"]:has(.legal-consent-card),
html body #app > .shell[data-app="teamo"]:has(.legal-consent-card) > .main {
  touch-action: auto !important;
}
html body #app > .shell[data-app="teamo"] > .main > .content:has(> .legal-consent-card) {
  display: block !important;
  box-sizing: border-box;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  touch-action: pan-x pan-y pinch-zoom !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-behavior: auto !important;
  scroll-padding-block: 16px max(24px, env(safe-area-inset-bottom));
  padding: clamp(12px, 3vw, 24px) !important;
  padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
}
.shell[data-app="teamo"] .content > .legal-consent-card,
.shell[data-app="teamo"] .content:has(> .legal-consent-card) > .hero {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.shell[data-app="teamo"] .legal-consent-card {
  width: 100%;
  padding: clamp(14px, 3vw, 24px);
}
.shell[data-app="teamo"] .legal-consent-card :is(.legal-brand, .legal-brand > div, .legal-sections, article, .form-grid, .field, .check-row) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.shell[data-app="teamo"] .legal-brand {
  flex-wrap: wrap;
  gap: 16px;
}
.shell[data-app="teamo"] .legal-brand img {
  flex: 0 0 auto;
  width: min(180px, 100%);
  max-width: 180px;
  height: auto;
  max-height: 64px;
  object-fit: contain;
}
.shell[data-app="teamo"] .legal-brand > div {
  flex: 1 1 220px;
}
.shell[data-app="teamo"] .legal-consent-card :is(h3, h4, p, .eyebrow, label, .hint, button) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.shell[data-app="teamo"] .legal-consent-card :is(input:not([type="checkbox"]), canvas) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.shell[data-app="teamo"] .legal-consent-card .check-row input {
  flex: 0 0 auto;
}
.shell[data-app="teamo"] .legal-signature-pad {
  touch-action: none;
}
@media (max-width: 600px) {
  .shell[data-app="teamo"] .legal-brand {
    flex-direction: column;
    align-items: flex-start;
  }
  .shell[data-app="teamo"] .legal-brand > div {
    flex: 0 1 auto;
    width: 100%;
  }
  .shell[data-app="teamo"] .legal-consent-card .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .shell[data-app="teamo"] .legal-consent-card .span-2 {
    grid-column: 1 / -1;
  }
  .shell[data-app="teamo"] .legal-consent-card input:not([type="checkbox"]) {
    font-size: 16px;
  }
}
