﻿/* ==========================================================================
   ctd-a11y-drawer.css - "Accessibility Tools" dropdown under the top-bar accessibility icon
   3 sections (Colour contrast / Text size / Others), 3-column tiles, purple selected state.
   Load LAST in MasterPage.master (after s3waas-mobile.css).
   Colours: change the two variables below to use the DBIM blue instead (#162F6A / #D2DFFF).
   ========================================================================== */
.a11yd { --a11yd-key: #3b0a6b; --a11yd-sel: #f1e6fd; }

.a11yd {
  position: absolute; z-index: 2000; box-sizing: border-box;
  width: 24.5rem; max-width: calc(100vw - 1rem); padding: 1rem 1rem 1.1rem;
  background: #fff; color: #150202; border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .28);
}
.a11yd[hidden] { display: none !important; }
.a11yd__title { margin: 0 0 .75rem; padding-bottom: .6rem; font-size: 1.05rem !important; font-weight: 700; text-align: center; color: #150202 !important; border-bottom: 1px solid #e6e9ef; }
.a11yd__sec { margin: .85rem 0 .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5b6b86; }
.a11yd__sec:first-of-type { margin-top: 0; }
.a11yd__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0; padding: 0; list-style: none; }

/* #a11yDrawer (an ID) out-ranks the master's "button standardization" rule, so tiles keep their size
   even if MasterPage.master has not been updated. */
#a11yDrawer .a11yd__tile {
  box-sizing: border-box !important; display: flex !important; flex-direction: column !important;
  align-items: center !important; justify-content: center !important; gap: .4rem;
  width: 100% !important; height: auto !important; min-height: 4.75rem !important; padding: .55rem .3rem !important;
  font: inherit; font-size: .8rem; font-weight: 600; line-height: 1.3; text-align: center;
  color: #1b1f27; background: #fff; border: 1px solid #8E8E8E; border-radius: 8px; cursor: pointer;
}
#a11yDrawer .a11yd__tile svg { width: 1.35rem; height: 1.35rem; flex: none; color: var(--a11yd-key); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.a11yd__tile .fill { fill: currentColor; stroke: none; }
.a11yd__tile .txt { font-size: 1.05rem; font-weight: 800; line-height: 1; color: var(--a11yd-key); }
.a11yd__tile span { display: block; max-width: 100%; overflow-wrap: anywhere; }
.a11yd__tile:hover { border-color: var(--a11yd-key); }
#a11yDrawer .a11yd__tile[aria-pressed="true"] { background: var(--a11yd-sel); border: 2px solid var(--a11yd-key); }
.a11yd__tile:focus-visible { outline: 3px solid #0D6EFD; outline-offset: 2px; }
.a11yd__status { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kannada: no capitals / letter-spacing (they break conjuncts), taller lines so nothing is clipped */
.a11yd--kn .a11yd__sec { text-transform: none; letter-spacing: 0; font-size: .85rem; line-height: 1.6; }
#a11yDrawer.a11yd--kn .a11yd__tile { font-size: .85rem; line-height: 1.55; }
.a11yd--kn .a11yd__title { line-height: 1.6; }

@media (max-width: 400px) { #a11yDrawer .a11yd__tile { font-size: .75rem; } #a11yDrawer.a11yd--kn .a11yd__tile { font-size: .78rem; } }

/* ---- effects. Filters go on the page blocks (not <html>) so the panel and fixed buttons stay put ---- */
html.a11y-invert, html.a11y-gray, html.a11y-sat, html.a11y-contrast { filter: none !important; }
html.a11y-invert body > :not(.a11yd):not(script) { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert img, html.a11y-invert video { filter: invert(1) hue-rotate(180deg); }
html.a11y-gray body > :not(.a11yd):not(script) { filter: grayscale(1); }
html.a11y-sat body > :not(.a11yd):not(script) { filter: saturate(2.2); }
html.a11y-links a:not(.a11yd__tile) { color: #000 !important; background: #ffeb3b !important; text-decoration: underline !important; outline: 1px solid #000; }
html.a11y-hideimg img { visibility: hidden !important; }
html.a11y-hideimg [style*="background-image"] { background-image: none !important; }
html.a11y-spacing body :not(.a11yd):not(.a11yd *) { letter-spacing: .12em !important; word-spacing: .16em !important; }
html.a11y-lh body :not(.a11yd):not(.a11yd *) { line-height: 1.9 !important; }
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l16 9-7 2-3 7z' fill='black' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") 4 2, auto !important;
}
@media print { .a11yd { display: none !important; } }