/* V3 reports: screen styles for this work package only. Built on css/odoo.css classes (see its header and docs/V3_A_REPORT.md); no new colours or sizes outside the Odoo tokens. */

/* ---- control panel: title, search box with facets (+ popover), entry count, Tables / Charts switch ---- */
@media screen {
  .rp-cp { margin: 0 -16px; }
  main > .rp-cp:first-child { margin: -8px -16px 0; }
  .rp-cp .o_cp_top { align-items: center; }
  .rp-sw { position: relative; flex: 0 1 396px; min-width: 0; }
  .rp-sw .o_searchview { width: 100%; max-width: 100%; }
  .rp-mag { display: inline-flex; align-items: center; color: var(--odoo-gray-700); }
  .rp-ph { flex: 1 1 60px; min-width: 40px; height: 23px; padding: 0; border: 0; background: transparent; text-align: left;
    font: inherit; font-size: var(--odoo-fs-base); line-height: 23px; color: var(--o-muted); cursor: text; }
  .rp-ph:focus-visible, .rp-cp .o_searchview_dropdown_toggler:focus-visible { outline: 0; box-shadow: var(--odoo-focus-ring); border-radius: 800px; }
  .dropdown-menu.o_search_bar_menu.rp-panel { position: absolute; top: 100%; left: 0; width: auto; max-width: calc(100vw - 32px); }
  .dropdown-menu.o_search_bar_menu.rp-panel[hidden] { display: none; }
  .rp-panel .o-sp-col { flex: 0 0 200px; max-height: 60vh; overflow-y: auto; }
  .rp-panel .o_menu_item { white-space: normal; }
  .rp-fi { display: inline-flex; color: var(--odoo-primary); }
  .rp-info { color: var(--o-muted); }
  .rp-cp .o_switch_view { display: inline-flex; align-items: center; justify-content: center; }
}
@media screen and (max-width: 991.98px) {
  /* Odoo small-screen control panel: the search box takes its own row under the title */
  .rp-sw { order: 3; flex: 1 1 100%; }
  .dropdown-menu.o_search_bar_menu.rp-panel { flex-direction: column; width: 100%; max-height: 70vh; overflow-y: auto; }
  .rp-panel .o-sp-col { flex: 0 0 auto; width: auto; max-height: none; overflow: visible; border-right: 0; }
}

/* ---- list cards ---- */
@media screen {
  .rp-c .card-b { padding: 0; }
  .rp-c .card-h { flex-wrap: wrap; row-gap: 8px; }
  .rp-c .card-h > span:first-child { flex: 1 1 auto; min-width: 0; }
  .rp-h-r { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 12px; margin-left: auto; min-width: 0; }
  .rp-note { font-size: var(--odoo-fs-small); font-weight: 400; color: var(--o-muted); }
  .rp-show { flex: 0 0 auto; }
  /* Charts view: the chart is the card body; the table stays in the page for printing only */
  .rp-tbl { display: none; }
  .rp-chart-b { padding: 16px; }
  .rp-chart { min-width: 0; }
  .rp-chart > svg { display: block; max-width: 100%; }
  .rp-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
  .rp-key-n { margin-left: 4px; font-size: var(--odoo-fs-small); color: var(--o-muted); }
  /* Funnel: stage, count, rate against its benchmark and the Above / On Par / Below badge beside the chart */
  .rp-bl { list-style: none; margin: 12px 0 0; padding: 0; border-top: .67px solid var(--odoo-gray-300); }
  .rp-bl li { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 0; border-bottom: .67px solid var(--odoo-gray-300); font-size: var(--odoo-fs-base); }
  .rp-bl-n { flex: 1 1 auto; min-width: 0; font-weight: 500; color: var(--odoo-heading-color); }
  .rp-bl-c { margin-left: 6px; font-weight: 400; color: var(--o-muted); }
  .rp-bl-v { flex: 0 0 auto; color: var(--odoo-body-color); font-variant-numeric: tabular-nums; }
}
@media print {
  .rp-tbl { display: block !important; }
  .rp-chart-b { padding: 8px 0; }
  .rp-chart > svg { max-width: 100%; }
  .rp-chart-b { break-inside: avoid; }
}
