/*
 * odeModernMap.css - contemporary refresh for the map search page (map/ode_map.aspx), 10/8/2026.
 * Kept apart from odeModern.css on purpose: the map page also hosts ArcGIS / Calcite widgets, so nothing here is global.
 * Every rule is scoped to the two ODE panels: #tabMapLayers ("Select Footprint Layers & Basemaps") and #tabSearchCriteria
 * ("Features - Select Area or Zoom To" + "Set Map Layer Filtering Criteria"). Same look as odeModern.css sections 1-2.
 * Removing the <link> rolls the page back. Load after the ArcGIS/Calcite CSS. !important only against inline styles
 * (the buttons' inline style is also re-set by deselect-layer JS).
 * Uses the --ode-* variables from odeCommon.css.
 */

/* ---------- buttons (inline "font: bolder 12px Arial; background-color: #dcdcdc" on each input) ---------- */
#tabMapLayers input[type="button"], #tabSearchCriteria input[type="button"] {
    font: 600 12px/16px var(--ode-font-ui) !important;
    padding: 4px 10px !important;
    border: 1px solid #b9c0ca;
    border-radius: 6px;
    background-color: #fff !important;
    color: #1f2a3c !important;
    cursor: pointer !important;
}
#tabMapLayers input[type="button"]:hover:enabled, #tabSearchCriteria input[type="button"]:hover:enabled { background-color: #f2f5f9 !important; border-color: #8f99a8; }
#tabMapLayers input[type="button"]:focus-visible, #tabSearchCriteria input[type="button"]:focus-visible { outline: 3px solid rgba(47, 111, 214, .35); outline-offset: 1px; }
#tabMapLayers input[type="button"]:disabled, #tabSearchCriteria input[type="button"]:disabled {
    background-color: #eef0f2 !important;
    border-color: #dde1e6;
    color: #8a929c !important;
    cursor: default !important;
}
/* the panel's main action */
#tabSearchCriteria #btnApplyFilter:enabled { background-color: var(--ode-accent) !important; border-color: var(--ode-accent); color: #fff !important; }
#tabSearchCriteria #btnApplyFilter:hover:enabled { background-color: var(--ode-accent-dark) !important; border-color: var(--ode-accent-dark); }

/* ---------- text fields, drop-downs, product id box (sizes kept) ---------- */
#tabSearchCriteria input[type="text"], #tabSearchCriteria select, #tabSearchCriteria textarea {
    border: 1px solid #b9c0ca;
    border-radius: 4px;
    background-color: #fff;
}
#tabSearchCriteria input[type="text"]:focus, #tabSearchCriteria select:focus, #tabSearchCriteria textarea:focus {
    outline: 2px solid transparent;   /* invisible here; Windows High Contrast paints it (it drops the box-shadow) */
    border-color: var(--ode-accent);
    box-shadow: 0 0 0 3px rgba(47, 111, 214, .2);
}
#tabSearchCriteria hr, #tabMapLayers hr { border: 0; border-top: 1px solid #dde1e6; }

/* ---------- panel padding (10/9/2026): headings and help icons sat right on the panel edges ---------- */
#tabMapLayers, #tabSearchCriteria { box-sizing: border-box; padding: 0 8px 12px 12px; }
/* the two inline width:400px wrappers in the filter panel would now overflow it by 7px (sideways scrollbar) */
#tabSearchCriteria > div[open] { width: auto !important; }
/* results panel: the list iframe (inline margin:0) moves off the panel edge; it is 400px in a 420px panel */
#resultsIFrame { margin-left: 8px !important; }

/* ---------- headings ---------- */
/* panel titles: the same on all three panels (Layers h2 replaces the Calcite panel heading; the Results iframe's titles
   use h2.odeMapPanelTitle in odeModern.css with the same font) */
#tabMapLayers h2, #tabSearchCriteria h2 { font: 600 16px/1.3 var(--ode-font-ui); color: #111; text-transform: none; margin: 10px 0 8px 0; }
/* "Coverage Display Options", "Feature Layer", "Available Map Layers with footprints", "Available Base Maps":
   underlined bold spans -> sub-headings in the heading font (the blue "Help" spans have an onclick and stay links) */
#tabMapLayers span[style*="text-decoration:underline"][style*="font-weight:bold"]:not([onclick]),
#DndItem_BaseMapHeader u {
    font: 600 13px/18px var(--ode-font-ui);
    color: #111;
    text-decoration: none !important;
}

/* ---------- Help / More Details / Types / Name List / View Map Legend (spans that open the help modal) ---------- */
/* inline style was color:Blue + underline (+ bold on the panel "Help" links); now the site link color, no underline until
   hover, with a small outlined "?" so it reads as "opens help" */
#tabMapLayers span[onclick^="showHelp"], #tabSearchCriteria span[onclick^="showHelp"] {
    color: var(--ode-link) !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    white-space: nowrap;
}
/* not on the help spans that already show an icon image (CRISM TRDR "Combined Map Layer" / "Slow Loading Map Layer") */
#tabMapLayers span[onclick^="showHelp"]:not(:has(> img))::before, #tabSearchCriteria span[onclick^="showHelp"]:not(:has(> img))::before {
    content: "";
    display: inline-block;
    width: 13px; height: 13px;
    margin-right: 3px;
    vertical-align: -2px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10.5'/%3E%3Cpath d='M9.1 9.3a2.95 2.95 0 1 1 4.4 2.6c-.95.55-1.5 1.15-1.5 2.2v.6'/%3E%3Ccircle cx='12' cy='17.5' r='.7' fill='black'/%3E%3C/svg%3E") no-repeat 0 0 / 13px 13px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10.5'/%3E%3Cpath d='M9.1 9.3a2.95 2.95 0 1 1 4.4 2.6c-.95.55-1.5 1.15-1.5 2.2v.6'/%3E%3Ccircle cx='12' cy='17.5' r='.7' fill='black'/%3E%3C/svg%3E") no-repeat 0 0 / 13px 13px;
}
/* Windows High Contrast (forced colors) replaces background colors: draw the masked "?" in the text color */
@media (forced-colors: active) {
    #tabMapLayers span[onclick^="showHelp"]:not(:has(> img))::before, #tabSearchCriteria span[onclick^="showHelp"]:not(:has(> img))::before { forced-color-adjust: none; background-color: CanvasText; }
}
#tabMapLayers span[onclick^="showHelp"]:hover, #tabSearchCriteria span[onclick^="showHelp"]:hover {
    color: var(--ode-accent) !important;
    text-decoration: underline !important;
}
/* icon-only panel "Help" links (the word is sr-only text; the span's title says which help it opens): same size as the
   "?" help icons on the other pages */
#tabMapLayers span[onclick^="showHelp"]:has(> .sr-only)::before, #tabSearchCriteria span[onclick^="showHelp"]:has(> .sr-only)::before {
    width: 17px; height: 17px; margin-right: 0; vertical-align: -3px;
    -webkit-mask-size: 17px 17px; mask-size: 17px 17px;
}
#tabMapLayers span[onclick^="showHelp"]:has(> .sr-only), #tabSearchCriteria span[onclick^="showHelp"]:has(> .sr-only) { color: var(--ode-accent-dark) !important; }
#tabMapLayers span[onclick^="showHelp"]:has(> .sr-only):hover, #tabSearchCriteria span[onclick^="showHelp"]:has(> .sr-only):hover { color: var(--ode-accent) !important; }
/* "show details" / "hide details" toggles under each layer (miToggle rewrites the <u><i> markup) */
#tabMapLayers span[onclick^="miToggle"] { color: var(--ode-link); }
#tabMapLayers span[onclick^="miToggle"] u { text-decoration: none; }
#tabMapLayers span[onclick^="miToggle"] i { font-style: normal; }
#tabMapLayers span[onclick^="miToggle"]:hover u { text-decoration: underline; }

/* ---------- footprint layer tree (divs built in ode_map.aspx.cs with inline #C7C7C7 / #D9D9D9) ---------- */
/* same shades as the product search tree: mission darkest, instrument lighter, processing level white */
#tabMapLayers div[id^="rcb__"][onclick^="hideShowMissionInstruments"] {
    background-color: #d3dbe6 !important;
    border-top: 1px solid #aab4c3 !important;
}
#tabMapLayers div[id^="rcb__"][onclick^="hideShowMissionInstruments"]:hover { background-color: #c5cfdd !important; }
#tabMapLayers div[id^="rcb__"][onclick^="hideShowMissionInstrProcessingLevels"] { background-color: #e6ebf2 !important; }
#tabMapLayers div[id^="rcb__"][onclick^="hideShowMissionInstrProcessingLevels"]:hover { background-color: #dbe2eb !important; }
#tabMapLayers div[id^="rcb__"] .fa-chevron-down, #tabMapLayers div[id^="rcb__"] .fa-chevron-up { color: #4a5260 !important; }

/* Accessibility (Task 2, 10/8/2026): tree rows and help spans made keyboard-operable by Scripts/odeA11y.js */
[data-ode-kb]:focus { outline: 0; }
[data-ode-kb]:focus-visible { outline: 2px solid var(--ode-accent); outline-offset: -2px; }
/* the header's "Skip to main content" focuses the page's main landmark (calcite-shell): no ring around the whole page */
[role="main"][tabindex="-1"]:focus { outline: none; }
