/* BRO quality passes (worker W6): phone-width guards, 4.5:1 text contrast, icon sizes 24/32/48/64,
   one set of button states (hover, focus, disabled).
   Load AFTER bro.css. Nothing in here changes layout on desktop; it only fixes faults found by the audits in docs/dbim_quality_report.md.
   Key colour #162F6A; blue ramp #214AAB / #3F65C5 / #D2DFFF; grey #5F5F5F; focus ring #0D6EFD (#FFBF00 on dark blue). */

/* ---------------------------------------------------------------------------
   1. Phone width (320, 375, 768): nothing may push the page wider than the screen
   ------------------------------------------------------------------------- */
.maincontent, .cmsContent { overflow-wrap: break-word; }
.cmsContent img, .cmsContent iframe, .cmsContent video, .cmsContent embed, .cmsContent object, .cmsContent canvas, .cmsContent svg { max-width: 100%; }
.cmsContent img, .cmsContent video { height: auto; }
.cmsContent iframe { border: 0; }
.cmsContent pre, .cmsContent code { white-space: pre-wrap; overflow-wrap: anywhere; }
.cmsContent figure { max-width: 100%; margin-left: 0; margin-right: 0; }
/* Pasted wide tables scroll inside themselves instead of widening the page (tables already in a scroll wrapper are left alone) */
@media (max-width: 767px) {
  .cmsContent :not(.table-responsive):not([class*="tablewrap"]):not(.cms-table-scroll) > table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cmsContent :not(.table-responsive):not([class*="tablewrap"]):not(.cms-table-scroll) > table caption { display: block; }
}
/* long words and URLs in titles, lists and breadcrumbs */
.innerBannerSection h1, .breadcrumb, .maincontent h1, .maincontent h2, .maincontent h3, .maincontent li a { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------------
   2. Contrast (WCAG 1.4.3, 4.5:1). Ratios in brackets are measured against the real background.
   ------------------------------------------------------------------------- */
/* links in running text were Bootstrap blue #0D6EFD: 4.50 on white, 3.75 on the grey #EBEAEA table stripes -> #214AAB (7.98 / 6.64) */
.maincontent :is(p, td, th, dd, dt, caption) a:not([class*="btn"]):not(.page-link):not(.nav-link):not(.viewmore):not(.viewevent):not(.indbtn):not([aria-current]),
.maincontent .cmsContent a:not([class*="btn"]):not(.page-link):not(.viewmore):not(.viewevent):not(.nav-link):not([role="tab"]):not([aria-current]):not(.active) { color: #214AAB; }
.maincontent :is(p, td, th, dd, dt, caption) a:not([class*="btn"]):not(.page-link):not([aria-current]):hover,
.maincontent .cmsContent a:not([class*="btn"]):not(.page-link):not(.viewmore):not(.viewevent):not(.nav-link):not([role="tab"]):not([aria-current]):not(.active):hover { color: #162F6A; }
/* white text on #5279D7 was 4.14 -> #3F65C5 (5.41) */
.cmsContent .orgstruct .orgspine .box, .cmsContent .orgstruct .orgwings > li > .box,
.cmsContent .orgmap .box { background: #3F65C5; }
.cmsContent .orgstruct .orgwings > li > .box { border-color: #3F65C5; }
/* disabled controls: #8E8E8E (2.73-3.28) and #606060 on #C6C6C6 (3.68) -> #5F5F5F (5.32 on #EBEAEA, 6.39 on white) */
.w5-pager .page-item.disabled .page-link, .w6-pagination .page-item.disabled .page-link,
.bro-pagination .page-item.disabled .page-link, .pagination .page-item.disabled .page-link,
.pagination .page-item.disabled span.page-link, .w2-tabs button:disabled { color: #5F5F5F; }
.page-item.disabled .page-link { background: #EBEAEA; }
/* table header cells of the document lists have white text: they always need their navy background, also on pages that do not load the Rajbhasha stylesheet (white on white before) */
.bro-doc-list thead th, .bro-data-table thead th,
.maincontent table.table.bro-doc-list thead tr th, .maincontent table.table.bro-data-table thead tr th { background: #162F6A; color: #fff; }  /* style.css .maincontent table.table thead tr th uses an undefined --bg1 */

/* ---------------------------------------------------------------------------
   3. Icon sizes: 24, 32, 48 or 64 px (DBIM 3.7). Icon buttons use 24; helpers for editors.
   Text-size glyphs (the arrow after "View more", list chevrons, the small external-link mark) stay with the text size.
   ------------------------------------------------------------------------- */
.searchcontainer .searchSubmit, .scroll-to-top, .innerBannerSection .innernavBtn { font-size: 24px; line-height: 1; }
.searchcontainer .searchSubmit i, .scroll-to-top i, .innerBannerSection .innernavBtn i { font-size: 24px; width: 24px; height: 24px; line-height: 24px; text-align: center; }
.announceTicker__pause i, .btnBox .btnPs i { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; font-size: 14px; line-height: 1; }
.mediaIcons li a i, .mediaIcons li a img, .mediaIcons li a svg { font-size: 24px; width: 24px; height: 24px; line-height: 24px; }
.bro-icon-24 { width: 24px; height: 24px; } .bro-icon-32 { width: 32px; height: 32px; }
.bro-icon-48 { width: 48px; height: 48px; } .bro-icon-64 { width: 64px; height: 64px; }
.bro-icon-24, .bro-icon-32, .bro-icon-48, .bro-icon-64 { display: inline-block; flex: 0 0 auto; object-fit: contain; }
/* icons inside content tables and cards (award, document type) */
.cmsContent img.award-icon, .cmsContent th.award-name img { width: 48px; height: 48px; object-fit: contain; }

/* ---------------------------------------------------------------------------
   4. One set of states for buttons and links
   hover: colour change; focus: 3 px ring (amber on navy); disabled: grey, no pointer
   ------------------------------------------------------------------------- */
:where(a, button, input, select, textarea, summary, [role="button"], [tabindex="0"]):focus-visible { outline: 3px solid #0D6EFD; outline-offset: 2px; }
#footer :focus-visible, .innerBannerSection :focus-visible, .mhaNav > li > ul :focus-visible, .announceTicker :focus-visible,
.cookieBanner .btn-03:focus-visible, .scroll-to-top:focus-visible, .homebanner .bx-wrapper a:focus-visible, .homebanner button:focus-visible { outline: 3px solid #FFBF00; outline-offset: 2px; box-shadow: 0 0 0 5px #162F6A; }
/* controls whose own CSS removed the ring */
#languageMenuButton:focus-visible, [role="tab"]:focus-visible, .nav-tabs .nav-link:focus-visible, .searchcontainer .searchSubmit:focus-visible, #headerSearch:focus-visible { outline: 3px solid #0D6EFD !important; outline-offset: 2px; }
.searchcontainer:focus-within { box-shadow: 0 0 0 3px #0D6EFD; }

/* hover where there was no visible change */
.searchcontainer .searchSubmit:hover { background: #D2DFFF; color: #162F6A; }
.scroll-to-top:hover { background: #214AAB !important; }
#languageMenuButton:hover { background: #D2DFFF; border-radius: 4px; }
a#currentTendersBtn:hover, button.bro-btn:hover, .btn-02:hover { text-decoration: none; }
.mhaLogo:hover { opacity: .85; }
.cmsContent a.w7-mail:hover { text-decoration-thickness: 2px; }
.homebanner .bx-wrapper .bx-controls-auto a:hover, .homebanner .bx-wrapper .bx-controls-direction a:hover { opacity: 1; filter: brightness(1.25); }
.btnBox .btnPs:hover { background: rgba(0, 0, 0, .85); }

/* the one BRO button: disabled state at 4.5:1 (was #606060 on #C6C6C6, 3.68) */
.bro-btn[disabled], .bro-btn.disabled, .bro-btn[aria-disabled="true"], .w5-btn[disabled], .w5-btn.disabled, .w7-btn:disabled, .w7-btn[aria-disabled="true"], .project-button[disabled],
.bro-back:disabled, .btn-02:disabled, .btn-02.disabled, .btn-03:disabled, .btn-03.disabled, button:disabled.viewmore, a.viewmore.disabled {
  background: #E1E1E1; border-color: #BDBDBD; color: #4F4F4F; cursor: not-allowed; pointer-events: none; opacity: 1; text-decoration: none;
}
/* secondary (outline) variant keeps the same states */
.bro-btn-outline:focus-visible, .w7-btn-outline:focus-visible { outline: 3px solid #0D6EFD; outline-offset: 2px; }
.btn-02:focus-visible, .btn-03:focus-visible, a.viewmore:focus-visible, .viewevent:focus-visible { outline: 3px solid #0D6EFD; outline-offset: 2px; }
/* touch target of icon buttons */
.searchcontainer .searchSubmit, .innerBannerSection .innernavBtn { min-width: 40px; min-height: 40px; }
@media (prefers-reduced-motion: reduce) { .scroll-to-top, .bro-btn, .viewmore, .viewevent { transition: none !important; } }
