/* =============================================================================
   StylesCriticalApps.css - CriticalApps pages. Loaded by MasterPage.master after
   the standard Styles*.css. All classes are prefixed "ca" to avoid clashing with
   the shared stylesheets.
   ============================================================================= */

.caTitle { color: #1b2a6b; font-weight: bold; font-size: 18px; font-family: Verdana, Arial, sans-serif; margin: 6px 0 14px 0; }
.caHeading { color: #1b2a6b; font-weight: bold; font-size: 14px; font-family: Verdana, Arial, sans-serif; margin: 18px 0 8px 0; }
.caMuted { color: #5b6b78; }
.caSmall { font-size: 11px; }
.caMono { font-family: Consolas, "Courier New", monospace; font-size: 12px; }

/* Boxes, matching the Finder panels in other RDC apps */
.caSection { background-color: #dfe4f1; border: 2px solid #2b3570; padding: 12px 16px; margin: 10px 0 16px 0; }
.caSection h3 { color: #1b2a6b; font-size: 14px; margin: 0 0 8px 0; }
.caSection p { margin: 4px 0 10px 0; }

/* Buttons: every button on the CriticalApps pages uses this class.
   Starts as a copy of .button in StylesClasses.css. */
.caButton {
   font-family: Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
   color: #333333;
   font-size: 11px;
   font-weight: bold;
   background-color: #AABCDF;
   border: 1px solid #000000;
}

/* Messages */
.caMessage { padding: 8px 12px; margin: 8px 0 12px 0; border-left: 4px solid #1f5fa8; background-color: #e9f1fb; }
.caMessage.caOk { border-left-color: #2f7a64; background-color: #e3f1ec; }
.caMessage.caError { border-left-color: #b42318; background-color: #fdecea; }
.caMessage.caWarn { border-left-color: #a8701a; background-color: #fbf3e6; }
.caMessage ul { margin: 4px 0 0 18px; padding: 0; }

/* Grids */
.caGrid { border-collapse: collapse; width: 100%; background-color: #ffffff; }
.caGrid th { text-align: left; font-weight: bold; padding: 6px 8px; border-bottom: 2px solid #c5cbd6; background-color: #f3f5f9; white-space: nowrap; }
.caGrid td { padding: 6px 8px; border-bottom: 1px solid #e3e7ee; vertical-align: top; }
.caGrid tr.caSelected td { background-color: #eef2fb; }

/* Badges */
.caBadge { display: inline-block; padding: 0 7px; border: 1px solid currentColor; border-radius: 10px; font-size: 11px; font-weight: bold; white-space: nowrap; }
.caOutcomeOutOfScope { color: #5b6b78; }
.caOutcomeTier1 { color: #2f7a64; }
.caOutcomeTier2 { color: #a8701a; }
.caOutcomeTier3 { color: #a63a3a; }
.caStatusDraft { color: #1f5fa8; }
.caStatusActive { color: #2f7a64; }
.caStatusRetired { color: #5b6b78; }
.caChip { display: inline-block; padding: 0 6px; margin: 2px 4px 0 0; background-color: #eef1f5; border-radius: 3px; font-size: 11px; color: #1c2a38; }
.caChipFlag { background-color: #fbf3e6; }
.caChipDoc { background-color: #e9f1fb; }

/* Checklist step lists */
.caPhase { margin: 14px 0 4px 0; font-weight: bold; color: #1b2a6b; }
.caSteps { margin: 0 0 6px 0; padding-left: 22px; }
.caSteps li { margin: 0 0 8px 0; }
.caStepText { color: #1c2a38; }

/* Filters / form rows */
.caFormRow { margin: 6px 0; }
.caFormRow label, .caLabel { display: inline-block; min-width: 110px; font-weight: bold; }

/* Confirmation dialogs: server-side panels shown over the page */
.caOverlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(20, 30, 40, 0.45); z-index: 1000; }
/* Dialogs always fit the window: the content scrolls and the buttons stay visible at the bottom. */
.caDialog { position: relative; width: 560px; max-width: 92%; max-height: calc(100vh - 100px); overflow-y: auto; box-sizing: border-box;
            margin: 50px auto 0 auto; background-color: #ffffff; border: 2px solid #2b3570; padding: 16px 20px 0 20px; }
.caDialog h3 { margin: 0 0 10px 0; color: #1b2a6b; }
.caDialogButtons { position: sticky; bottom: 0; margin-top: 14px; padding: 10px 0 14px 0; text-align: right; background-color: #ffffff; border-top: 1px solid #e3e7ee; }

@media print {
   .caNoPrint, .caOverlay { display: none !important; }
}

/* ---- Change page ---- */
.caForm td { padding: 4px 8px 4px 0; vertical-align: top; }
.caFormLabel { font-weight: bold; white-space: nowrap; padding-top: 6px; }
.caRadio label { margin-right: 14px; }

/* The change card: white, with a top border in the outcome's colour */
.caCard { background-color: #ffffff; border: 1px solid #cfd9dc; border-top: 6px solid #5b6b78; margin: 4px 0 16px 0; font-size: 13px; }
.caCardOutOfScope { border-top-color: #5b6b78; }
.caCardTier1 { border-top-color: #2f7a64; }
.caCardTier2 { border-top-color: #a8701a; }
.caCardTier3 { border-top-color: #a63a3a; }
.caCardHead { padding: 14px 18px 6px 18px; }
.caCardBody { padding: 0 18px 8px 18px; }
.caCardFoot { padding: 10px 18px 14px 18px; border-top: 1px solid #e3e7ee; }

.caFactGrid { display: flex; flex-wrap: wrap; }
.caFact { width: 20%; min-width: 160px; padding: 0 14px 10px 0; box-sizing: border-box; }
.caFactWide { width: 100%; }
.caFactLabel { color: #5b6b78; font-size: 11px; margin-bottom: 1px; }

.caMclActive { color: #1f5fa8; }
.caMclClosed { color: #2f7a64; }
.caMclWithdrawn { color: #5b6b78; }
.caChecklistInprogress { color: #1f5fa8; }
.caChecklistCompleted { color: #2f7a64; }
.caChecklistRetriaged, .caChecklistSuperseded, .caChecklistWithdrawn { color: #5b6b78; }

.caChain { padding: 8px 18px; background-color: #fafbfb; border-top: 1px solid #e3e7ee; border-bottom: 1px solid #e3e7ee; }
.caChainItem { display: inline-block; margin: 2px 6px 2px 0; padding: 1px 10px; border: 1px solid #c5cbd6; border-radius: 12px; background-color: #ffffff; text-decoration: none; color: #1c2a38; font-size: 12px; }
.caChainOpen { border-color: #1b2a6b; font-weight: bold; }
.caChainCurrent { background-color: #eef2fb; }

.caChecklistHead { padding: 10px 18px; background-color: #f3f6f6; border-bottom: 1px solid #e3e7ee; }
.caChecklistHead .caMessage { margin: 8px 0 0 0; }
.caProgress { display: flex; align-items: center; margin-top: 8px; font-size: 12px; }
.caProgressTrack { flex: 1; height: 8px; background-color: #e7eef0; border-radius: 4px; overflow: hidden; margin-right: 10px; }
.caProgressFill { height: 100%; background-color: #5b6b78; }
.caFillTier1 { background-color: #2f7a64; }
.caFillTier2 { background-color: #a8701a; }
.caFillTier3 { background-color: #a63a3a; }

.caPhase { display: flex; align-items: center; margin: 16px 0 4px 0; font-weight: bold; font-size: 14px; color: #1b2a6b; }
.caPhaseNo { display: inline-block; width: 22px; height: 22px; line-height: 20px; border: 2px solid #1b2a6b; border-radius: 50%; text-align: center; font-size: 12px; margin-right: 8px; }
.caStepList { list-style: none; margin: 0; padding: 0 0 0 32px; }
.caStep { display: flex; padding: 8px 0; border-bottom: 1px dashed #d5dae3; }
.caStep:last-child { border-bottom: none; }
.caTick { width: 26px; flex-shrink: 0; padding-top: 1px; }
.caTickBox { display: inline-block; width: 15px; height: 15px; line-height: 15px; border: 1.5px solid #8a99a3; border-radius: 3px; text-align: center; font-size: 11px; color: #ffffff; }
.caTickDone { background-color: #2f7a64; border-color: #2f7a64; }
.caStepBody { flex: 1; }
.caStepText { color: #1c2a38; font-size: 13px; }
.caStepSigned .caStepText { color: #5b6b78; }
.caStepSystem { background-color: #fbf3e6; }
.caStamp { color: #2f7a64; font-weight: bold; font-size: 11px; margin-top: 3px; }
.caBlocked { color: #a8701a; font-size: 11px; margin-top: 3px; }
.caOverrideNote { color: #a63a3a; font-size: 11px; margin-top: 2px; }
.caStepButtons { display: block; margin-top: 5px; }
.caChipDocOk { background-color: #e3f1ec; }
.caChipDocMissing { background-color: #fdecea; }
.caActions { padding: 8px 18px; border-bottom: 1px solid #e3e7ee; background-color: #fafbfb; }
.caActions input { margin-right: 6px; }
.caRadioList label { margin-left: 4px; }
.caRadioList input { margin-left: 0; }
.caRadioList span { display: block; margin: 3px 0; }
.caDetailLinks { margin: 0 0 10px 0; }
.caDetailLinks input { margin-right: 6px; }

/* ---- Working indicator (scripts/criticalapps.js) ---- */
.caBusy { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 2000; cursor: wait; }
.caBusy.caBusyOn { display: block; }
.caBusy.caBusyShow { background-color: rgba(255, 255, 255, 0.45); }
.caBusyBox { display: none; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); background-color: #ffffff;
             border: 2px solid #2b3570; padding: 12px 20px; font-weight: bold; color: #1b2a6b; white-space: nowrap; }
.caBusyShow .caBusyBox { display: block; }
.caSpinner { display: inline-block; width: 16px; height: 16px; margin-right: 10px; vertical-align: middle;
             border: 3px solid #c5cbd6; border-top-color: #1b2a6b; border-radius: 50%; animation: caSpin 0.8s linear infinite; }
@keyframes caSpin { to { transform: rotate(360deg); } }
.caOutcomeUntriaged { color: #1f5fa8; }
.caCardUntriaged { border-top-color: #1f5fa8; }
.caGuide p { margin: 4px 0; }
.caGuideHead { font-weight: bold; margin-bottom: 4px; }
.caGuideSub { font-weight: bold; margin: 8px 0 0 0; font-size: 12px; color: #1b2a6b; }
.caGuide ul { margin-top: 2px; }
.caInline { background-color: #f3f6f6; border: 1px solid #e3e7ee; padding: 8px 10px; margin: 6px 0 2px 0; }
.caInlineLabel { font-weight: bold; font-size: 12px; margin: 4px 0 2px 0; }
.caReview { background-color: #f3f6f6; border: 1px solid #e3e7ee; padding: 6px 10px; margin: 6px 0 10px 0; }
.caStepDetails { margin: 4px 0 2px 0; padding-left: 20px; list-style: disc; }
.caStepDetails li { margin: 1px 0; }
.caStepSigned .caStepDetails { color: #5b6b78; }
.caDocs { list-style: none; margin: 4px 0 2px 0; padding: 0; }
.caDocs li { margin: 2px 0; padding-left: 18px; position: relative; }
.caDocs li:before { content: "\1F4C4"; position: absolute; left: 0; font-size: 11px; }
.caTextEntry { margin-top: 6px; }
.caTextEntry summary { cursor: pointer; color: #1f5fa8; font-size: 12px; }
.caTextEntry textarea { margin: 6px 0; }

/* ---- Messages: problems as dialogs, successes as a floating notice ---- */
.caAlertOverlay { z-index: 2100; }
.caAlert { width: 460px; }
.caAlert h3 { color: #b42318; }
.caAlert.caWarn h3 { color: #a8701a; }
.caAlert p { margin: 6px 0 4px 0; }
.caToast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2200; max-width: 80%;
           background-color: #e3f1ec; border: 1px solid #b9d9cd; border-left: 5px solid #2f7a64; padding: 10px 18px;
           box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); font-weight: bold; color: #1c2a38; opacity: 1; transition: opacity 0.6s; }
.caToastHide { opacity: 0; }
.caFieldError, .caFieldError:focus { outline: 2px solid #b42318; outline-offset: 1px; background-color: #fdecea; }
span.caFieldError, .caRadioList.caFieldError { display: inline-block; padding: 4px 6px; }

/* ---- Status page ---- */
.caFilterBar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 16px; padding: 10px 12px; margin: 10px 0 6px 0;
               background-color: #dfe4f1; border: 2px solid #2b3570; }
.caFilter { display: inline-block; }
.caFilterLabel { display: block; font-size: 11px; font-weight: bold; color: #1b2a6b; margin-bottom: 2px; }
.caFilterCheck { padding-bottom: 3px; }
.caStepLink { color: #1c2a38; text-decoration: none; }
.caStepLink:hover { text-decoration: underline; color: #1f5fa8; }
.caWarnText { color: #a8701a; }
.caMiniBar { display: inline-block; width: 70px; height: 6px; background-color: #e7eef0; border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.caMiniFill { height: 100%; background-color: #5b6b78; }
.caMiniFill.caFillTier1 { background-color: #2f7a64; }
.caMiniFill.caFillTier2 { background-color: #a8701a; }
.caMiniFill.caFillTier3 { background-color: #a63a3a; }

/* ---- Registers: sub-tabs and lists in table cells ---- */
.caSubTabs { border-bottom: 2px solid #2b3570; margin: 4px 0 12px 0; }
.caSubTab { display: inline-block; padding: 6px 14px; margin-right: 4px; border: 1px solid #c5cbd6; border-bottom: none;
            background-color: #eef1f5; color: #1b2a6b; text-decoration: none; font-weight: bold; }
.caSubTabOn { background-color: #2b3570; color: #ffffff; border-color: #2b3570; }
.caCellList { margin: 0; padding-left: 16px; }
.caCellList li { margin: 1px 0; }

/* ---- Finder (DocRad layout: identifying fields, "or...", selection lists) ---- */
.caFinder { margin: 6px 0 10px 0; }
.caFinderRow { display: flex; align-items: flex-start; gap: 18px; }
.caFinderBox { background-color: #dfe4f1; border: 2px solid #2b3570; padding: 12px 16px; display: grid; grid-template-columns: auto 230px; gap: 7px 10px; align-items: center; }
.caFinderField { display: contents; }
.caFinderField > span { text-align: right; white-space: nowrap; }
.caFinderField input[type=text], .caFinderField input[type=date], .caFinderField select { width: 100%; box-sizing: border-box; }
.caFinderOr { padding-top: 10px; }
.caFinderActions { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.caBaseline { color: #5b4a8a; }
.caPrintLink { font-size: 12px; margin-left: 10px; }
