/* Locale picker and legal-disclaimer banner styling (v2.9.7).
 *
 * These rules used to be injected as inline <style> elements by
 * disclaimer-banner.js and locale-picker.js. The site serves a strict
 * Content-Security-Policy with `style-src 'self'`, so the browser refused to
 * apply them and the disclaimer banner rendered unstyled. Serving the CSS as a
 * real stylesheet is the fix; the JS now only sets classes and data
 * attributes.
 */

/* --- Language picker ---------------------------------------------------- */
/* R4: keep the language name visible. Global select rules set width:100%, and
   the crowded desktop nav used to shrink this flex item until only the native
   select arrow remained. */
.rg-locale-picker {
  display: inline-flex; align-items: center; gap: 6px;
  flex: 0 0 auto; min-width: 112px; max-width: 172px;
}
.rg-locale-picker select {
  width: auto !important; min-width: 112px; max-width: 172px;
  min-height: 40px; border-radius: 10px; border: 1px solid #d6e5f9;
  background: #f4f8ff; color: #274465; font: 800 13px system-ui;
  padding: 6px 34px 6px 10px; cursor: pointer;
}
.rg-locale-picker select:focus-visible { outline: 3px solid rgba(116,169,255,.55); outline-offset: 2px; }

/* --- Prevailing-language / preview notice ------------------------------- */
/* R4: the prevailing-language notice is a compact, wrapping card. Previously
   the long translated sentence and its action shared one unbounded inline row,
   so the action was clipped off-screen and the strip looked broken. */
#rg-locale-preview-banner {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 8px 12px; box-sizing: border-box;
  width: min(1180px, calc(100% - 32px)); margin: 10px auto 0; padding: 9px 12px;
  background: #f4f8ff; border: 1px solid #d6e5f9; border-radius: 12px; color: #274465;
  font: 700 12px/1.45 system-ui; text-align: left;
  overflow: hidden;
}
#rg-locale-preview-banner > span {
  flex: 1 1 720px; min-width: 0; max-width: 940px;
  white-space: normal; overflow-wrap: anywhere;
}
#rg-locale-preview-banner[data-kind="preview"] {
  background: #fff5f5; border-color: #e0b4b4; color: #6d3030;
}
#rg-locale-preview-banner[hidden] { display: none; }
#rg-locale-preview-banner button {
  flex: 0 0 auto; margin: 0; border: 1px solid #d6e5f9; background: #fff; color: #345477;
  border-radius: 999px; min-height: 34px; padding: 5px 12px;
  font: 800 12px system-ui; cursor: pointer; white-space: normal;
}

/* --- Section legal disclaimer ------------------------------------------- */
.rg-section-disclaimer {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start;
  margin: 0 0 18px; padding: 11px 12px; border: 1px solid #efd9a2; border-radius: 14px;
  background: #fffaf0; color: #684c24;
  font: 650 12px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.rg-section-disclaimer .rg-note-icon {
  width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center;
  background: #fff0c8; color: #815000; font-weight: 900;
}
.rg-section-disclaimer .rg-note-copy { display: grid; gap: 4px; min-width: 0; }
.rg-section-disclaimer strong { display: block; color: #744500; margin: 0; }
.rg-section-disclaimer .rg-note-copy span { display: block; }
.rg-section-disclaimer button,
.rg-disclaimer-restore {
  border: 1px solid #d6e5f9; background: #f4f8ff; color: #345477; border-radius: 10px;
  min-height: 32px; padding: 6px 9px; font: 800 12px system-ui; cursor: pointer;
}
.rg-disclaimer-restore { margin: 0 0 14px; border-radius: 999px; }
.rg-section-disclaimer button:focus-visible,
.rg-disclaimer-restore:focus-visible { outline: 3px solid rgba(116,169,255,.55); outline-offset: 2px; }

/* A genuine preview locale is flagged in red. A fully translated locale whose
   legal wording is simply not counsel-certified is not an error state. */
.rg-section-disclaimer[data-locale-state="preview"] {
  border-color: #e0b4b4; background: #fff5f5; color: #6d3030;
}
.rg-section-disclaimer[data-locale-state="preview"] .rg-note-icon { background: #ffdcdc; color: #8a2020; }
.rg-locale-preview-warning { display: block; margin-top: 6px; font-weight: 800; }
.rg-locale-preview-warning + button { margin-top: 6px; }

@media (max-width: 700px) {
  .rg-locale-picker { width: 100%; min-width: 0; max-width: none; }
  .rg-locale-picker select { width: 100% !important; min-width: 0; max-width: none; }
  #rg-locale-preview-banner {
    width: calc(100% - 20px); margin-top: 8px; padding: 9px 10px;
    align-items: stretch;
  }
  #rg-locale-preview-banner > span { flex-basis: 100%; max-width: none; }
  #rg-locale-preview-banner button { width: 100%; }
  .rg-section-disclaimer { grid-template-columns: auto 1fr; }
  .rg-section-disclaimer button { grid-column: 2; justify-self: start; }
}
