/* =====================================================================
   V84 — UI refinements
   ---------------------------------------------------------------------
   Loaded LAST so these rules win over earlier stylesheets.
     A) Full-screen toggle becomes a standalone circle parallel to (X),
        and the zoom cluster shifts left so nothing overlaps.
     B) "MANDATORY EXTRACTION" register headings match the summary
        "Bid Security / EMD" clause heading.
     C) Action buttons sit inline / parallel with "CLEAN OFFICIAL DETAIL".
     E) The top pagination bar is shrunk to sit neatly beside "Filters".
   ===================================================================== */

/* ---------- A) Window controls: full-screen parallel to the (X) ---------- */
/* The zoom pill moves left of both the full-screen button and the close. */
.modal .card-tools{right:101px!important}
@media(max-width:760px){.modal .card-tools{right:92px!important}}

/* Standalone full-screen circle — matches the (X) close button, sits just
   to its left on the same row (X is at right:15px, 35x35). */
.modal .fs-standalone{
  position:absolute!important;right:58px;top:15px;width:35px;height:35px;
  border-radius:50%;border:1px solid #cfe0f6;background:#eef4fc;color:#1769d2;
  display:grid;place-items:center;font-size:12px;z-index:7;cursor:pointer;
  transition:background .16s ease,color .16s ease}
.modal .fs-standalone:hover{background:#1769d2;color:#fff;border-color:#1769d2}
.dark .modal .fs-standalone{background:#12325c;color:#8cc3ff;border-color:#22406a}
@media(max-width:560px){.modal .fs-standalone{right:54px;width:32px;height:32px}}

/* ---------- B) Register headings match "Bid Security / EMD" ---------- */
/* Target style (from .summary-clause): icon 28px blue tile, heading
   800 / 10px "Plus Jakarta Sans", subtle bottom rule. */
.ts-register .boq-comp-card>header{
  display:flex;align-items:center;gap:8px;margin-bottom:11px;
  padding-bottom:7px;border-bottom:1px solid #edf1f5}
.ts-register .boq-comp-card>header i{
  width:28px;height:28px;border-radius:8px;background:#edf5ff;color:#1769d2;
  display:grid;place-items:center;font-size:13px}
.ts-register .boq-comp-card>header h4{
  margin:0;font:800 10px "Plus Jakarta Sans",sans-serif;color:#0b2f66;line-height:1.35}
/* Panel title ("MANDATORY EXTRACTION" kicker + heading) in the same family */
.ts-register .boq-fti-title .section-kicker{color:#1769d2;letter-spacing:.06em}
.ts-register .boq-fti-title h3{font:800 13px "Plus Jakarta Sans",sans-serif;color:#0b2f66;margin:2px 0 0}
.dark .ts-register .boq-comp-card>header h4,
.dark .ts-register .boq-fti-title h3{color:#dbe8fb}
.dark .ts-register .boq-comp-card>header i{background:#12325c;color:#8cc3ff}

/* ---------- C) Action buttons inline / parallel with the section title ---------- */
/* Keep the title block and the button row on one line; only the buttons
   wrap among themselves if the viewport is genuinely narrow. */
.detail-analysis-head{flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between}
.detail-analysis-head>div:first-child{flex:0 0 auto}
.detail-analysis-head .proc-analysis-actions{flex:1 1 auto;justify-content:flex-end;flex-wrap:wrap}
@media(max-width:900px){
  .detail-analysis-head{flex-wrap:wrap!important}
  .detail-analysis-head .proc-analysis-actions{justify-content:flex-start}
}

/* ---------- E) Compact top pagination, aligned with the Filters toolbar ---------- */
.pagination-top{margin:2px 0 12px!important;min-height:0!important}
.pagination-top .epads-pagination{padding:7px 12px;border-radius:14px;gap:14px}
.pagination-top .epads-pages{gap:5px}
.pagination-top .ep-page{width:30px;height:30px;font:600 12px Inter,sans-serif;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.10)}
.pagination-top .ep-page.active{box-shadow:0 5px 12px rgba(81,97,255,.26)}
.pagination-top .ep-page:hover:not(:disabled){transform:none}
.pagination-top .ep-nav{font-size:15px}
.pagination-top .ep-dots{width:22px;height:30px;font-size:14px}
.pagination-top .epads-page-meta{gap:2px}
.pagination-top .epads-page-meta strong{font:600 12px Inter,sans-serif}
.pagination-top .epads-origin{font-size:8.5px}
@media(max-width:760px){
  .pagination-top .ep-page{width:27px;height:27px;font-size:11px}
  .pagination-top .epads-origin{display:none}
}

/* =====================================================================
   V84.1 — card zoom scope, compact action buttons, chips, attachment icon,
   and the single overall "Read more" for Freight/Transport/Installation.
   ===================================================================== */

/* ---------- (3)(4) Zoom only the readable body text ---------- */
/* The readable regions scale with the zoom control … */
.modal.card-zoomed #officialFocusedContent,
.modal.card-zoomed #boqAnalysisBody,
.modal.card-zoomed #contractRiskBody,
.modal.card-zoomed #tenderSummaryBody,
.modal.card-zoomed #modalContent .official-detail-text{zoom:var(--cardzoom,1)}
/* … while titles, meta strips, reference cards and action buttons stay put
   (counter-zoom cancels the parent scale so they never grow/shrink). */
.modal.card-zoomed #boqAnalysisBody .analysis-result-head,
.modal.card-zoomed #boqAnalysisBody .boq-summary-strip,
.modal.card-zoomed #tenderSummaryBody .analysis-result-head,
.modal.card-zoomed #tenderSummaryBody .summary-meta-row,
.modal.card-zoomed #contractRiskBody .analysis-result-head{zoom:calc(1 / var(--cardzoom,1))}

/* ---------- (5) Action buttons: compact, uniform, like "EPADS Notice" ---------- */
.detail-analysis-head .proc-analysis-actions .analysis-action{
  min-height:32px!important;padding:6px 12px!important;font-size:10px!important;
  border-radius:9px;line-height:1.1}
.detail-analysis-head .proc-analysis-actions .analysis-action i{font-size:11px!important}

/* ---------- (6) No PDF / quota chips on the Procurement Detail card ---------- */
/* Buttons still open their cards; download stays available INSIDE each card. */
#modalContent .proc-analysis-actions .ai-ready-chip,
#modalContent .proc-analysis-actions .dl-quota-badge{display:none!important}
#modalContent .proc-analysis-actions .analysis-action.ai-ready{padding-right:12px!important}

/* ---------- (7) Aesthetic download icon on attachments ---------- */
.premium-attachment-download .download-icon-wrap{
  width:34px;height:34px;flex:0 0 34px;border-radius:10px;
  background:rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);
  display:grid;place-items:center;font-size:15px;transition:background .16s ease}
.premium-attachment-download .download-icon-wrap i{color:#fff}
.premium-attachment-download:hover .download-icon-wrap{background:rgba(255,255,255,.30)}

/* ---------- (2) Single overall Read more for Freight/Transport/Install ---------- */
.boq-fti-grid.fti-clamp{max-height:220px;overflow:hidden;position:relative}
.boq-fti-grid.fti-clamp::after{content:"";position:absolute;left:0;right:0;bottom:0;
  height:46px;background:linear-gradient(to bottom,rgba(255,255,255,0),#fff);pointer-events:none}
.boq-fti-grid.fti-clamp.is-open{max-height:none}
.boq-fti-grid.fti-clamp.is-open::after{display:none}
.fti-readmore{display:block;margin:10px auto 0;border:1px solid #cfe0f6;background:#eef4fc;
  color:#1769d2;font:800 10px "Plus Jakarta Sans",sans-serif;letter-spacing:.02em;
  padding:6px 18px;border-radius:999px;cursor:pointer;transition:background .16s ease,color .16s ease}
.fti-readmore:hover{background:#1769d2;color:#fff;border-color:#1769d2}
.dark .boq-fti-grid.fti-clamp::after{background:linear-gradient(to bottom,rgba(15,39,72,0),#0f2748)}
.dark .fti-readmore{background:#12325c;color:#8cc3ff;border-color:#22406a}
