/*
 * aai-o2-pages.css  -  page rules that used to live in <style> blocks inside the views (UI polish 2026-10-29, CSP).
 * A same-origin stylesheet (style-src 'self'): the views no longer need inline <style> for these rules.
 * Loaded after aai-o2-lists.css and before aai-o2-fixes.css in _Layout.cshtml (and in _UserLayout.cshtml for the sign-in pages).
 * Each block names the view it came from. A rule that only applied while that view (or partial) was on the page is scoped with
 * body:has(#<id that only exists in that view>), so it still applies to exactly the same pages as before.
 * Rules that were dropped instead of moved (legacy or now harmful) are listed in documents/UI_POLISH_AUDIT_2026-10-29.md section 6c.
 */

/* ---------- Kendo PDF export page template (ETD, Baggage Check, Pat-down, Shift, SRI Counts, Passenger Counts reports) ----------
   .page-template / .k-pdf-export only exist while Kendo draws a PDF, so these rules are global */
.page-template {
    font-family: "DejaVu Sans", "Arial", sans-serif;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.page-template .header {
    top: 30px;
    left: 30px;
    right: 30px;
    text-align: center;
    font-size: 25px;
}
.page-template .filterdata {
    top: 120px;
    left: 30px;
    right: 30px;
    border-bottom: 1px solid #888;
    text-align: center;
    font-size: 20px;
}
.page-template .footer {
    bottom: 50px;
    left: 30px;
    right: 30px;
    border-top: 1px solid #888;
    text-align: center;
    font-size: 20px;
}
.k-pdf-export .k-loading-mask {
    display: none !important;
}
/* the hidden last column of the CISF report PDFs (was per page) */
body:has(#ViewETDReport) .k-pdf-export colgroup > col:nth-child(26),
body:has(#ViewBaggageCheckReport) .k-pdf-export colgroup > col:nth-child(26),
body:has(#ViewPatdownSearchReport) .k-pdf-export colgroup > col:nth-child(25) {
    width: 0 !important;
}

/* ---------- Issue/Issues.cshtml: the PDF export keeps its Unicode font and wrapped cells ---------- */
body:has(#ViewIssues) kendo-pdf-document .k-grid {
    font-family: "DejaVu Sans", "Arial", sans-serif;
}
body:has(#ViewIssues) kendo-pdf-document .k-grid td {
    height: auto;
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
}

/* ---------- comment boxes that must not be resized (IssueView, IssueCreate, _IssueDetailsPartial, Checklist) ---------- */
body:has(#btnAddComment, #frmCreateIssue, #frmIssuePopup, #ViewSelectedQuestions) textarea {
    resize: none;
}

/* ---------- Role/HierarchyChartPop.cshtml (organisation chart) ---------- */
body:has(#OrgChart) table {
    border-collapse: initial !important;
    border-spacing: 0;
}

/* ---------- Shared/_IssueHistoryPartial.cshtml and _IssueAllHistoryPartial.cshtml (history dialogs) ---------- */
.customClass {
    width: 400px;
}
.customHistoryClass {
    width: 200% !important;
    left: -45%;
}
body:has(.customClass, .customHistoryClass) #dvModalBody {
    position: relative;
    padding: 8px;
}
.modalFooter {
    padding: 0px 15px 0px;
    text-align: right;
    margin-top: 10px !important;
}
.closeButton {
    color: #f7f3f3 !important;
    opacity: 1 !important;
}

/* ---------- Shared/_IdleTimeout.cshtml ---------- */
#idleTimeoutModal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: rgba(0,0,0,.45);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
}
#idleTimeoutModal .idle-box {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    min-width: 300px;
    max-width: 90vw;
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
#idleTimeoutModal .idle-title { margin: 0 0 12px 0; font-weight: 600; }
#idleTimeoutModal .idle-text { margin: 0 0 18px 0; }
#idleTimeoutModal .idle-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Home/Dashboard.cshtml (IMS dashboard cards) ---------- */
.demo-section.k-content {
    box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);
}
.demo-section {
    margin: 0 auto 4.5em;
    padding: 3em;
    border: 1px solid rgba(20,53,80,0.14);
}

/* ---------- User/Login.cshtml and User/MyProfile.cshtml (show / hide password toggle) ---------- */
body:has(#frmLogin, #frmChangePassword) ::-ms-reveal,
body:has(#frmLogin, #frmChangePassword) ::-ms-clear {
    display: none !important;
}
.hideShowPassword-toggle {
    background-color: transparent;
    background-image: url('../images/wink1.png');
    background-position: 0 center;
    background-repeat: no-repeat;
    border: 2px solid #f1f1f1;
    border-radius: 0.25em;
    cursor: pointer;
    font-size: 100%;
    height: 44px;
    margin: 0;
    max-height: 100%;
    padding: 0;
    text-indent: -999em;
    width: 46px;
    -moz-appearance: none;
    -webkit-appearance: none;
}
.hideShowPassword-toggle-hide {
    background-position: -44px center;
}
.hideShowPassword-toggle:hover,
.hideShowPassword-toggle:focus {
    border-color: #0088cc;
    outline: transparent;
}

/* ---------- PhaseTwo/ManifestList.cshtml: Documents column (Manifest link + Versions button), was inline style in the client template ---------- */
.wp06-docs { white-space: nowrap; }
.wp06-docs .wp06-doc-versions.btn { padding: 0 !important; border: 0 !important; vertical-align: baseline; }

/* ---------- Replacements for inline style attributes (UI polish 2026-10-29, CSP) ----------
   One class per former style="" value, with !important where the inline value used to win over the theme, so each element looks exactly as before.
   Not converted on purpose (see the audit, section 6d): style="display:none" start states that scripts show / hide, the Razor-computed
   style on the SMTP credential boxes, widths passed to Kendo widgets in HtmlAttributes, and the manifest print partial. */
.aai-clear { clear: both; }
.aai-u-pb20 { padding-bottom: 20px !important; }
.aai-u-pb15 { padding-bottom: 15px !important; }
.aai-u-pt10 { padding-top: 10px !important; }
.aai-u-pt17 { padding-top: 17px !important; }
.aai-u-pt5 { padding-top: 5px !important; }
.aai-u-pl4 { padding-left: 4px !important; }
.aai-u-pl20 { padding-left: 20px !important; }
.aai-u-pl22 { padding-left: 22px !important; }
.aai-u-pl80 { padding-left: 80px !important; }
.aai-u-pl100 { padding-left: 100px !important; }
.aai-u-mt16 { margin-top: 16px !important; }
.aai-u-mb5 { margin-bottom: 5px !important; }
.aai-u-m-help { margin: 4px 16px 8px !important; }
.aai-u-center { text-align: center !important; }
.aai-u-nowrap { white-space: nowrap !important; }
.aai-u-ml7 { margin-left: 7px !important; }
.aai-u-p4 { padding: 4px !important; }
.aai-u-pointer { cursor: pointer !important; }
.aai-u-black { color: black !important; }
.aai-u-float-right { float: right; }
.aai-u-h260 { height: 260px !important; }
.aai-u-underline { text-decoration: underline !important; }
.aai-u-hint-strong { font-size: 12px !important; font-weight: bold !important; }
.aai-u-offscreen { position: absolute !important; width: 0 !important; height: 0 !important; border: 0 !important; visibility: hidden !important; }

/* ---------- Batch A (2026-10-30, CSP): last inline styles moved here ----------
   Kendo widgets copy the class of their input to the widget wrapper (checked for DropDownList, DatePicker, DateTimePicker, MultiSelect,
   ComboBox, NumericTextBox, AutoComplete), so a class does what the old HtmlAttributes style="" did. !important keeps the inline precedence. */
.aai-w-100 { width: 100% !important; }
.aai-w-60 { width: 60% !important; }
.aai-w-75 { width: 75% !important; }
.aai-h-100 { height: 100% !important; }              /* IMS dashboard charts */
.aai-u-pb8 { padding-bottom: 8px !important; }       /* System Settings tab messages */
/* Manifest List: Versions window content stays hidden until Kendo opens it in its window */
#wp06VersionsWindow { display: none; }
.k-window #wp06VersionsWindow, .k-window-content#wp06VersionsWindow { display: block; }

/* UI polish 2026-10-30 (owner: "font ... standard used across Indian industries"): Noto Sans, self-hosted (SIL OFL, fonts/noto-sans/OFL.txt).
   Loaded by both layouts (this file); Inter stays as the fallback, so a missing font file changes nothing but the face. */
@font-face { font-family: 'Noto Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url('fonts/noto-sans/NotoSans-400.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url('fonts/noto-sans/NotoSans-500.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url('fonts/noto-sans/NotoSans-600.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url('fonts/noto-sans/NotoSans-700.woff2') format('woff2'); }
:root { --aai-font: 'Noto Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; }
