/* Preserve Field's light theme, Figtree typography and #5432eb brand accent. */
.field-consent {
  --consent-purple: #5432eb;
  color: #2e2d34;
  background: #fff;
  font-family: Figtree, Arial, sans-serif;
  width: min(760px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  margin: auto;
  border: 1px solid #dedbe9;
  border-radius: 12px;
  box-shadow: 0 20px 70px #16112633;
  overflow: hidden;
}
.field-consent[open] { display: flex; flex-direction: column; }
.field-consent::backdrop { background: #17122473; }
.field-consent [hidden], .trion-model-viewer > [hidden] { display: none !important; }
body.field-consent-open { overflow: hidden; }
.field-consent-scroll { min-height: 0; padding: 28px 32px 30px; overflow-y: auto; overscroll-behavior: contain; }
.field-consent-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.field-consent-brand { color: var(--consent-purple); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.field-consent-close { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -8px -12px -8px 0; padding: 0; border: 0; border-radius: 6px; color: #565663; background: transparent; font: 32px/1 Arial, sans-serif; cursor: pointer; flex-shrink: 0; }
.field-consent-close:hover { background: #f1edff; color: var(--consent-purple); }
.field-consent h2 { color: #2e2d34; font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: 0; margin: 0 0 20px; }
.field-consent p { margin: 0; color: #565663; font-size: 16px; line-height: 1.65; }
.field-consent-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; }
.field-consent a { color: var(--consent-purple); font-size: 15px; line-height: 1.5; text-decoration: underline; text-underline-offset: 4px; }
.field-consent-links a { display: inline-flex; align-items: center; min-height: 36px; }
.field-consent-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex-shrink: 0; gap: 12px; padding: 20px 32px; border-top: 1px solid #e4e2ed; background: #fff; }
.field-consent-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px; border: 1px solid var(--consent-purple); border-radius: 6px; font: 600 15px/1.4 Figtree, Arial, sans-serif; white-space: nowrap; color: var(--consent-purple); background: #fff; cursor: pointer; }
.field-consent-button:hover { background: #f1edff; }
.field-consent-primary { background: var(--consent-purple); color: #fff; }
.field-consent-primary:hover { background: #4326c8; }
.field-consent-button:active { transform: translateY(1px); }
.field-consent a:focus-visible, .field-consent button:focus-visible, .field-consent input:focus-visible, .trion-cookie-preferences:focus-visible, .field-embed-placeholder button:focus-visible, .field-embed-placeholder a:focus-visible { outline: 3px solid #5432eb; outline-offset: 4px; }
.field-consent-categories { margin-top: 24px; }
.field-consent-category { border-top: 1px solid #e4e2ed; padding: 20px 0; }
.field-consent-category-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.field-consent-category h3, .field-consent-category label { color: #2e2d34; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.5; }
.field-consent-category label { cursor: pointer; flex: 1; }
.field-consent-always { color: var(--consent-purple); font-size: 14px; white-space: nowrap; }
.field-consent-category input { width: 24px; height: 24px; margin: 6px; accent-color: var(--consent-purple); cursor: pointer; flex-shrink: 0; }
.field-consent-category-title:has(input) { min-height: 44px; }
.field-consent .field-consent-note { font-size: 14px; border-top: 1px solid #e4e2ed; padding-top: 18px; }
.trion-preview-footer .trion-cookie-preferences { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: inherit; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; line-height: 1.5; }
.trion-preview-footer .trion-cookie-preferences:hover { color: #5432eb; text-decoration: underline; text-underline-offset: 3px; }
.trion-cookie-preferences:disabled { cursor: default; opacity: .65; }
.field-consent-status { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.field-embed-placeholder { --consent-purple: #5432eb; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; width: 100%; height: 100%; padding: 28px; text-align: center; background: #f7f6fb; color: #303039; }
.trion-odoo .field-embed-placeholder h3 { font-size: 24px; line-height: 1.3; margin: 0; }
.trion-odoo .field-embed-placeholder p { font-size: 16px; line-height: 1.6; max-width: 38ch; margin: 0; }
.field-embed-placeholder a { color: #5432eb; text-underline-offset: 3px; }
@media (max-width: 575.98px) {
  .field-consent { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 10px; }
  .field-consent-scroll { padding: 22px; }
  .field-consent h2 { font-size: 28px; }
  .field-consent-actions { grid-template-columns: 1fr; gap: 8px; padding: 16px 22px; }
  .field-consent-button { min-height: 44px; padding: 10px 12px; }
  .field-consent-category-title { gap: 8px; }
  .field-embed-placeholder { padding: 20px; }
}

/* Loading feedback belongs to the Field shell, outside the external viewer. */
.trion-model-viewer { position: relative; }
.field-viewer-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; background: #f7f6fb; color: #303039; text-align: center; pointer-events: none; }
.field-viewer-loading p { margin: 0; }
.field-viewer-spinner { width: 30px; height: 30px; border: 3px solid #dfd8ff; border-top-color: #5432eb; border-radius: 50%; animation: field-viewer-spin 1s linear infinite; }
.field-viewer-help[hidden] { display: none; }
.trion-odoo .field-viewer-help p { color: #565663; font-size: 13px; line-height: 1.5; }
.field-viewer-retry { min-height: 44px; padding: 0; border: 0; color: #5432eb; background: transparent; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.field-viewer-retry:focus-visible { outline: 3px solid #5432eb; outline-offset: 3px; }
@keyframes field-viewer-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .field-viewer-spinner { animation: none; } }
