/*
 * AI conversation page: square, rule-based controls.
 * Scoped with :has(#chat) so shared buttons, dialogs and the support bubble
 * keep their existing shape on every other public page.
 */

body:has(#chat) :is(.chip, .composer, .composer textarea, .composer button, .jump-latest, .start-here-link) {
  border-radius: 0;
}

/* Responsive header rules give these controls 2px or 5px corners. */
body:has(#chat) header.site-sections-header > :is(.ghost, .theme-toggle, #siteAppearance),
body:has(#chat) header.site-sections-header .section-menu > summary,
body:has(#chat) header.site-sections-header .language-control select,
body:has(#chat) .showcase-launch {
  border-radius: 0;
}

/* Daily verse actions, profile card and like-consent controls. */
body:has(#chat) :is(
  .daily-verse-card,
  .daily-verse-like,
  .daily-verse-actions button,
  .daily-verse-card > button,
  .daily-verse-profile,
  .daily-verse-consent-dialog,
  .daily-verse-consent-actions button
) {
  border-radius: 0;
}

/* Reading desk, its disclosure and controls. */
body:has(#chat) .reading-desk,
body:has(#chat) .reading-desk > summary,
body:has(#chat) .reading-desk :is(button, select) {
  border-radius: 0;
}

/* Home-page panels and the mobile dock follow the same square language. */
body:has(#chat) :is(.study-entry, .mobile-navigation) {
  border-radius: 0;
}

/* Footer install prompt and its help dialog. */
body:has(#chat) :is(.install-btn, #installHelp, #installHelp button) {
  border-radius: 0;
}

/* Account and legal dialogs opened from the chat page. */
body:has(#chat) :is(.legal-modal, .account-modal),
body:has(#chat) :is(.legal-modal, .account-modal) :is(button, input, select, textarea, a.ghost, .account-note) {
  border-radius: 0;
}

/* These legacy inline radii are shared with account-only pages. */
body:has(#chat) #accountDown,
body:has(#chat) #profileLink {
  border-radius: 0 !important;
}

/* Chat report dialog and its controls. */
body:has(#chat) .chat-report-dialog,
body:has(#chat) .chat-report-dialog :is(button, input, select, textarea, summary) {
  border-radius: 0;
}

/* Keep the floating support control below an open account or legal dialog. */
body:has(#chat) .lp-support-bubble {
  z-index: 40;
}

/* Support widget: square launcher, panel, controls and message bubbles. */
body:has(#chat) .lp-support-bubble :is(
  button,
  input,
  select,
  textarea,
  .lp-support-panel,
  .lp-support-message,
  .lp-support-badge,
  .lp-support-conv,
  .lp-support-conv-status
) {
  border-radius: 0;
}
