@import url('/css/bonita-tokens.css?v=20261102studio1');

/* Tenant-selected at the server, including the empty canvas before JS starts. */
html[data-bonita-theme="studio"],
html[data-bonita-theme="studio"] body {
  background: var(--bs-paper);
  color: var(--bs-ink);
  color-scheme: light;
}

/* The course document paints before the Studio runtime mounts. */
html[data-bonita-theme="studio"] .training-page:has(#courseTreeRoot:empty)
  :is(.training-topbar, .course-panel) {
  background: var(--bs-white);
  border-color: var(--bs-line);
  color: var(--bs-ink);
}
html[data-bonita-theme="studio"] .training-page:has(#courseTreeRoot:empty)
  :is(.training-back, .training-label, .lesson-empty) {
  color: var(--bs-muted);
}

/* Pricing uses white heading text on its legacy orange canvas. */
html[data-bonita-theme="studio"] .pricing-header :is(#page-title, #page-subtitle) {
  color: var(--bs-ink);
  text-shadow: none;
}

html[data-bonita-theme="studio"] {
  --text: var(--bs-ink);
  --muted: var(--bs-muted);
  --chat-bg-solid: var(--bs-paper);
  --chat-bg-start: var(--bs-paper);
  --chat-bg-end: var(--bs-paper);
  --chat-wallpaper-image: none;
  --chat-card: var(--bs-white);
  --chat-border: var(--bs-line);
  --chat-muted: var(--bs-muted);
  --chat-composer-input-bg: var(--bs-paper);
  --chat-bubble-own-bg: var(--bs-wine);
  --chat-bubble-other-bg: var(--bs-rose);
  --chat-bubble-other-border: var(--bs-line);
  --chat-thread-item-bg: var(--bs-white);
  --chat-thread-item-bg-hover: var(--bs-paper);
  --chat-thread-item-bg-active: var(--bs-rose);
  --chat-thread-item-border: var(--bs-line);
  --chat-thread-item-border-hover: var(--bs-wine);
  --chat-thread-item-border-active: var(--bs-wine);
  --chat-thread-name: var(--bs-ink);
  --chat-thread-secondary: var(--bs-muted);
  --chat-thread-shadow: none;
  --chat-thread-shadow-active: none;
  --chat-danger: #a3323d;
  --chat-success: #41633a;
}
html[data-bonita-theme="studio"] :is(.app-shell-view-host, .app-shell-view-stack,
  .app-shell-view-frame, .app-shell-tab-frame, .app-shell-view-loading,
  .app-shell-loading, .app-shell-loading-overlay, .page-loader) {
  background: var(--bs-paper);
  color: var(--bs-ink);
}
html[data-bonita-theme="studio"] #shared-burger-menu-root :is(.sbm-shell, .sbm-tabbar) {
  background: var(--bs-paper);
  border-color: var(--bs-line);
  box-shadow: 0 1px 0 var(--bs-line);
  backdrop-filter: none;
}
html[data-bonita-theme="studio"] #shared-burger-menu-root .sbm-tab-item {
  color: var(--bs-muted);
  background: transparent;
  box-shadow: none;
}
html[data-bonita-theme="studio"] #shared-burger-menu-root .sbm-tab-item:is(:hover, :active, .is-active) {
  background: var(--bs-rose);
  color: var(--bs-wine);
  box-shadow: none;
}
html[data-bonita-theme="studio"] #shared-burger-menu-root .sbm-tab-item:focus-visible {
  outline: 2px solid var(--bs-wine);
  outline-offset: -3px;
}
html[data-bonita-theme="studio"] :is(.markdown-content, .lesson-description, .assignment-prompt) {
  color: var(--bs-ink);
}
html[data-bonita-theme="studio"] :is(.markdown-content, .lesson-description, .assignment-prompt)
  :is(p, li, h1, h2, h3, h4, strong, em, span, blockquote) {
  color: inherit;
}
html[data-bonita-theme="studio"] :is(.markdown-content a, .back-link, .lesson-description-toggle) {
  color: var(--bs-wine);
}
html[data-bonita-theme="studio"] :is(.profile-card, .profile-section, .purchase-card, .empty-state) {
  background: var(--bs-white);
  color: var(--bs-ink);
  border-color: var(--bs-line);
  box-shadow: none;
}
html[data-bonita-theme="studio"] :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  background: var(--bs-white);
  color: var(--bs-ink);
  border-color: var(--bs-line);
}
html[data-bonita-theme="studio"] :is(input, textarea)::placeholder { color: var(--bs-muted); opacity: 1; }
html[data-bonita-theme="studio"] :is(footer, .protected-legal-footer) {
  color: var(--bs-muted);
  background: var(--bs-paper);
  border-color: var(--bs-line);
}
html[data-bonita-theme="studio"] :is(footer, .protected-legal-footer) :is(a, .cookie-consent-footer-settings-link) {
  color: var(--bs-wine);
}

html[data-bonita-theme="studio"] :is(.app-shell-view-loading-spinner, .loader, .page-loader-spinner) {
  border-color: var(--bs-line);
  border-top-color: var(--bs-wine);
}
html[data-bonita-theme="studio"] :is(.loading-text, .loader-dot) { color: var(--bs-wine); }
html[data-bonita-theme="studio"] :is(.loader-dot, .page-loader-dot) { background: var(--bs-wine); }
html[data-bonita-theme="studio"] .page-loader-text { color: var(--bs-ink); }

/* Existing profile, purchases and messenger components keep their interactions. */
html[data-bonita-theme="studio"] :is(.profile-label, .profile-value, .profile-purchases-link,
  .purchase-meta, .purchase-details, .thread-title, .thread-subtitle, .empty-text,
  .mobile-back, .all-assignments-btn, .attach-btn, .composer-text, .search-input) {
  color: var(--bs-ink);
}
html[data-bonita-theme="studio"] :is(.profile-value, .profile-purchases-link,
  .profile-avatar, .mobile-back, .all-assignments-btn, .attach-btn, .btn-secondary) {
  background: var(--bs-rose);
  color: var(--bs-wine);
  border-color: var(--bs-line);
}
html[data-bonita-theme="studio"] :is(.btn-primary, .send-btn.active) {
  background: var(--bs-wine);
  color: var(--bs-white);
  border-color: var(--bs-wine);
  box-shadow: none;
}
html[data-bonita-theme="studio"] :is(.btn-primary:hover, .btn-primary:focus-visible) {
  background: var(--bs-wine);
  color: var(--bs-white);
  outline-color: var(--bs-wine);
}
html[data-bonita-theme="studio"] :is(.btn-danger, .error-message) {
  color: #982f3a;
  background: #f8e5e6;
  border-color: #e5b9be;
}
html[data-bonita-theme="studio"] :is(.message-bubble:not(.own), .chat-panel, .threads-panel) {
  color: var(--bs-ink);
}
html[data-bonita-theme="studio"] .pwa-modal-content {
  background: var(--bs-paper);
  color: var(--bs-ink);
  box-shadow: 0 -4px 24px #382b2b24;
}
html[data-bonita-theme="studio"] :is(.pwa-modal-title, .pwa-modal-text,
  .pwa-instructions-title, .pwa-step-text, .pwa-modal-hint) { color: var(--bs-ink); }
html[data-bonita-theme="studio"] :is(.pwa-modal-instructions, .pwa-modal-close,
  .pwa-step-number, .pwa-step-icon) {
  background: var(--bs-rose);
  color: var(--bs-wine);
}
html[data-bonita-theme="studio"] .pwa-modal-btn {
  background: var(--bs-wine);
  color: var(--bs-white);
}
@media (prefers-reduced-motion: reduce) {
  html[data-bonita-theme="studio"] :is(.pwa-modal-backdrop, .pwa-modal-content) { animation: none; }
}
html[data-bonita-theme="studio"] .pwa-step-text strong { color: var(--bs-ink); }
html[data-bonita-theme="studio"] :is(.pwa-step-icon, .pwa-step-icon-text) { color: var(--bs-wine); }
html[data-bonita-theme="studio"] .chat-unavailable-card {
  background: var(--bs-white);
  border-color: var(--bs-line);
  color: var(--bs-ink);
  box-shadow: 0 8px 24px #382b2b12;
}
html[data-bonita-theme="studio"] {
  --color-white: var(--bs-ink);
  --chat-surface-alpha-08: var(--bs-white);
  --chat-surface-alpha-12: var(--bs-rose);
  --chat-surface-alpha-14: var(--bs-rose);
  --chat-toast-bg: var(--bs-white);
  --chat-accent: var(--bs-wine);
}
html[data-bonita-theme="studio"] .chat-v2-message--own .chat-v2-message-bubble {
  --chat-muted: var(--bs-white);
  --color-white: var(--bs-white);
  color: var(--bs-white);
}
html[data-bonita-theme="studio"] .chat-v2-avatar-viewer { --color-white: var(--bs-white); }
html[data-bonita-theme="studio"] :is(.app-shell-purchases-overlay-surface,
  .app-shell-curator-assignments-overlay-surface, .app-shell-purchases-overlay-chrome,
  .app-shell-curator-assignments-overlay-chrome, .app-shell-purchases-overlay-frame,
  .app-shell-curator-assignments-overlay-frame) {
  background: var(--bs-paper);
  color: var(--bs-ink);
  border-color: var(--bs-line);
}
html[data-bonita-theme="studio"] :is(.purchase-info-label, .action-hint) { color: var(--bs-muted); }
html[data-bonita-theme="studio"] :is(.curator-badge, .chat-v2-header-subtitle.curator-badge) {
  color: var(--bs-wine);
  background: var(--bs-rose);
  border-color: var(--bs-line);
}

/* Marathon stays in the existing shell; cover explicit legacy white text/states. */
html[data-bonita-theme="studio"][data-app-shell-mode="host"] > body > .container {
  background: var(--bs-paper);
  border-color: var(--bs-line);
  box-shadow: 0 8px 24px #382b2b12;
  backdrop-filter: none;
}
html[data-bonita-theme="studio"] :is(.funnel-card, .step-card) {
  background: var(--bs-white);
  color: var(--bs-ink);
  border-color: var(--bs-line);
  box-shadow: none;
}
html[data-bonita-theme="studio"] :is(.funnel-title, .step-title, .now-indicator,
  .webinar-time, .step-status-item) { color: var(--bs-ink); }
html[data-bonita-theme="studio"] :is(.funnel-description, .step-type-badge) { color: var(--bs-muted); }
html[data-bonita-theme="studio"] .step-type-badge { background: var(--bs-paper); }
html[data-bonita-theme="studio"] .step-card.disabled {
  background: var(--bs-paper);
  opacity: 1;
}
html[data-bonita-theme="studio"] .step-card.failed {
  background: #f8e5e6;
  border-color: #e5b9be;
  opacity: 1;
}
html[data-bonita-theme="studio"] .step-card:is(.success, .live) {
  background: #edf3e8;
  border-color: #b6c8aa;
}
html[data-bonita-theme="studio"] :is(.live-indicator, .replay-label, .status-checkmark) { color: #41633a; }
html[data-bonita-theme="studio"] :is(.success-badge, .live-dot, .status-dot) { background: #41633a; }
html[data-bonita-theme="studio"] .success-badge { color: var(--bs-white); box-shadow: none; }
html[data-bonita-theme="studio"] :is(.failed-badge, .status-cross) { color: #982f3a; }
html[data-bonita-theme="studio"] .failed-badge { background: #f8e5e6; box-shadow: none; }
html[data-bonita-theme="studio"] .step-card.next-webinar {
  background: var(--bs-rose);
  border-color: var(--bs-wine);
  box-shadow: none;
}
html[data-bonita-theme="studio"] .step-card .webinar-timer { color: var(--bs-wine); }
html[data-bonita-theme="studio"] :is(.step-card.clickable, .funnel-card):hover {
  background: var(--bs-rose);
  border-color: var(--bs-wine);
  box-shadow: 0 4px 12px #382b2b12;
}
html[data-bonita-theme="studio"] .step-card.clickable::after { color: var(--bs-wine); }
html[data-bonita-theme="studio"] :is(.step-card.clickable, .funnel-card, .funnel-button, .btn):focus-visible {
  outline: 2px solid var(--bs-wine);
  outline-offset: 3px;
}
html[data-bonita-theme="studio"] :is(.funnel-button, .replay-modal-cancel) {
  background: var(--bs-rose);
  color: var(--bs-wine);
  border-color: var(--bs-line);
}
html[data-bonita-theme="studio"] .replay-modal {
  background: var(--bs-white);
  color: var(--bs-ink);
  border-color: var(--bs-line);
}
html[data-bonita-theme="studio"] :is(.replay-modal-title, .replay-modal-text) { color: var(--bs-ink); }
html[data-bonita-theme="studio"] .replay-modal-text strong { color: var(--bs-wine); }
html[data-bonita-theme="studio"] .replay-modal-confirm {
  background: var(--bs-wine);
  color: var(--bs-white);
  box-shadow: none;
}

/* Profile warning, feedback and dialogs have explicit colors in legacy CSS. */
html[data-bonita-theme="studio"] :is(.password-change-section, .logout-section) {
  background: var(--bs-white);
  color: var(--bs-ink);
  border-color: var(--bs-line);
}
html[data-bonita-theme="studio"] .delete-section {
  background: #f8e5e6;
  border-color: #e5b9be;
}
html[data-bonita-theme="studio"] .delete-text { color: var(--bs-ink); }
html[data-bonita-theme="studio"] :is(#deleteModal, #avatarCropModal) .modal-content {
  background: var(--bs-white);
  color: var(--bs-ink);
  border-color: var(--bs-line);
  box-shadow: 0 8px 24px #382b2b24;
}
html[data-bonita-theme="studio"] :is(#deleteModal, #avatarCropModal) :is(.modal-title, .modal-text, label) {
  color: var(--bs-ink);
}
html[data-bonita-theme="studio"] input:is(.profile-input, .modal-input):focus {
  border-color: var(--bs-wine);
  outline: 2px solid var(--bs-wine);
  outline-offset: 2px;
}
html[data-bonita-theme="studio"] .profile-error-message {
  background: #f8e5e6;
  border-color: #e5b9be;
  color: #982f3a;
}
html[data-bonita-theme="studio"] .success-message {
  background: #edf3e8;
  border-color: #b6c8aa;
  color: #41633a;
}
html[data-bonita-theme="studio"] #avatarCropModal .avatar-crop-size-range { accent-color: var(--bs-wine); }

/* Login can be shown by the cabinet shell or by either shared authentication dialog. */
html[data-bonita-theme="studio"] #cabinetAppleAuth,
html[data-bonita-theme="studio"] :is(.login-modal, .auth-gate-overlay, .protected-auth-overlay) {
  background: #3f2d2a77;
  backdrop-filter: blur(5px);
}
html[data-bonita-theme="studio"] #cabinetAppleAuth .cabinet-apple-dialog,
html[data-bonita-theme="studio"] :is(.login-modal-content, .auth-gate-card, .protected-auth-card) {
  background: var(--bs-white);
  color: var(--bs-ink);
  border-color: var(--bs-line);
  box-shadow: 0 25px 100px #35262930;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overflow-wrap: anywhere;
}
html[data-bonita-theme="studio"] .login-modal-title { color: var(--bs-ink); }
html[data-bonita-theme="studio"] :is(.auth-gate-text, .protected-auth-subtitle, .protected-auth-attempts) {
  color: var(--bs-muted);
  opacity: 1;
}
html[data-bonita-theme="studio"] :is(.login-button, .auth-gate-button, .protected-auth-submit) {
  background: var(--bs-wine);
  color: var(--bs-white);
  box-shadow: none;
}
html[data-bonita-theme="studio"] :is(.protected-auth-reset, .protected-auth-switch-account, .auth-gate-consent-label a) {
  color: var(--bs-wine);
}
html[data-bonita-theme="studio"] .auth-gate-consent-label input { accent-color: var(--bs-wine); }
html[data-bonita-theme="studio"] #cabinetAppleAuth button:focus-visible,
html[data-bonita-theme="studio"] :is(.login-input, .auth-gate-input, .protected-auth-input):focus,
html[data-bonita-theme="studio"] :is(.login-modal-content, .auth-gate-card, .protected-auth-card)
  :is(button, a, input[type="checkbox"]):focus-visible {
  outline: 2px solid var(--bs-wine);
  outline-offset: 2px;
}
html[data-bonita-theme="studio"] #cabinetAppleAuth #cabinetAppleError,
html[data-bonita-theme="studio"] :is(.login-error, .auth-gate-error, .protected-auth-error) { color: #982f3a; }
html[data-bonita-theme="studio"] .login-error { background: #f8e5e6; }
html[data-bonita-theme="studio"] .protected-auth-info { color: #41633a; }
html[data-bonita-theme="studio"] :is(.auth-gate-error, .protected-auth-attempts, .protected-auth-info, .protected-auth-error):empty {
  display: none;
}
html[data-bonita-theme="studio"] #cabinetAppleAuth #cabinetAppleContinue {
  background: #000;
  color: #fff;
  border-color: #000;
}
html[data-bonita-theme="studio"] #cabinetAppleAuth #cabinetAppleLogout {
  background: transparent;
  color: var(--bs-wine);
  border-color: var(--bs-line);
}
