/* ==========================================================================
   Our Operations in Oman — interactive map
   Markup: generated Blade partials from resources/js/oman-map/
   Behaviour: public/site/js/oman-map.js  ·  this file is hand-authored.
   ========================================================================== */

.omx {
  --om-blue: #015A8D;
  --om-blue-l: #0a6ea6;
  --om-navy: #0B2E4F;
  --om-navy-d: #013a5c;
  --om-gold: #F1C42B;
  --om-ink: #232323;
  --om-muted: #6f6f6f;
  --om-canvas: #F6F9FB;
  --om-card: #ffffff;   /* panels and map frame; dark.css remaps it */
  --om-line: #E3E9EE;
  --om-land: #E8EEF3;
  --om-land-edge: #CBD8E2;
  --om-region: #015A8D;
  --om-block: #F1C42B;
  --om-block-2: #D97706;
  --om-office: #1E7D46;
  --om-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --om-ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --om-t: 260ms;
  --om-t-fast: 140ms;
  font-family: 'Roboto', sans-serif;
  color: var(--om-ink);
}
.omx *, .omx *:before, .omx *:after { box-sizing: border-box; }
.omx .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- hero ---------------------------------------------------------- */
.omx-hero { position: relative; overflow: hidden; min-height: 420px; display: flex; align-items: center; padding: 260px 0 96px; text-align: center; color: #fff; }
.omx-hero__bg { position: absolute; inset: 0; z-index: 0; background: radial-gradient(120% 90% at 78% 8%, var(--om-blue-l) 0%, var(--om-blue) 42%, var(--om-navy-d) 100%); }
.omx-hero__bg:after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1,58,92,.35) 0%, rgba(1,58,92,0) 30%), linear-gradient(0deg, rgba(1,58,92,.55) 0%, rgba(1,58,92,0) 26%); }
.omx-hero__mark { position: absolute; right: 3%; bottom: -30px; font-size: 220px; color: #fff; opacity: .05; z-index: 0; transform: rotate(-6deg); }
.omx-hero__inner { position: relative; z-index: 1; width: 100%; }
.omx-eyebrow { display: inline-block; font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--om-gold); margin-bottom: 14px; }
.omx-hero h1 { font-family: 'Montserrat', sans-serif; font-size: 44px; font-weight: 600; line-height: 1.12; margin: 0 auto; letter-spacing: -.5px; max-width: 20ch; color: #fff; }
.omx-hero h1:after { content: ""; display: block; width: 60px; height: 4px; background: var(--om-gold); border-radius: 3px; margin: 16px auto 0; }
.omx-hero__sub { font-size: 17px; font-weight: 300; line-height: 1.75; opacity: .92; margin: 18px auto 0; max-width: 64ch; }

/* ---------- section shell ------------------------------------------------- */
.omx-section { background: var(--om-canvas); padding: 46px 0 84px; }
.om-hint { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 15px; color: var(--om-muted); margin: 0 0 18px; }
.om-hint .fas { color: var(--om-blue); }

.om-stage { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.om-canvas { position: relative; background: var(--om-card); border: 1px solid var(--om-line); border-radius: 16px; box-shadow: 0 22px 50px rgba(1,58,92,.10); padding: 18px; overflow: hidden; }
.om-svg { display: block; width: 100%; height: auto; max-height: 76vh; margin: 0 auto; }
.om-svg text { font-family: 'Montserrat', 'Roboto', sans-serif; }

/* ---------- land + governorates ------------------------------------------ */
.om-gov { fill: var(--om-land); stroke: var(--om-land-edge); stroke-width: 1.1; transition: fill var(--om-t) var(--om-ease-io), opacity var(--om-t) var(--om-ease-io); }
.om-gov.is-focus { fill: #DCE7EF; }
.om-govs { filter: drop-shadow(0 8px 18px rgba(1,58,92,.10)); }

/* Al Dhahirah highlight (its own hotspot layer, over the base governorates) */
.om-hot-region .om-region { fill: rgba(1,90,141,.14); stroke: var(--om-region); stroke-width: 2; stroke-dasharray: 6 5; transition: fill var(--om-t) var(--om-ease-io), stroke-width var(--om-t-fast); }
.om-hot-region:hover .om-region, .om-hot-region.is-hover .om-region { fill: rgba(1,90,141,.22); }
.om-hot-region.is-active .om-region { fill: rgba(1,90,141,.28); stroke-width: 3; stroke-dasharray: none; }
.om-live .om-hot-region .om-region { animation: om-dash 26s linear infinite; }
@keyframes om-dash { to { stroke-dashoffset: -110; } }

/* ---------- concession blocks -------------------------------------------- */
.om-hot { cursor: pointer; }
.om-hot:focus { outline: none; }
.om-block { fill: var(--om-block); fill-opacity: .85; stroke: #A8801A; stroke-width: 1.4; transition: fill-opacity var(--om-t-fast), transform var(--om-t) var(--om-ease); transform-box: fill-box; transform-origin: center; }
.om-block-halo { fill: var(--om-block); fill-opacity: 0; transform-box: fill-box; transform-origin: center; transition: fill-opacity var(--om-t); }
[data-hotspot="block_15"] .om-block { fill: var(--om-block-2); stroke: #8C4E05; }
[data-hotspot="block_15"] .om-block-halo { fill: var(--om-block-2); }
.om-hot-block:hover .om-block, .om-hot-block.is-hover .om-block { fill-opacity: 1; transform: scale(1.06); }
.om-hot-block:hover .om-block-halo, .om-hot-block.is-hover .om-block-halo { fill-opacity: .22; transform: scale(1.5); }
.om-hot-block.is-active .om-block { fill-opacity: 1; stroke-width: 2.2; }
.om-hot-block.is-active .om-block-halo { fill-opacity: .3; transform: scale(1.75); }
.om-block-tagdot { fill: var(--om-navy); }
.om-block-tag { fill: #fff; font-size: 13px; font-weight: 700; }
.om-hot:focus-visible .om-block, .om-hot:focus-visible .om-region, .om-hot:focus-visible .om-pin-ring { stroke: var(--om-gold); stroke-width: 3.5; }

/* ---------- head-office pin ---------------------------------------------- */
.om-pin { fill: #fff; stroke: none; }
.om-pin-ring { fill: var(--om-office); stroke: #fff; stroke-width: 2.5; transition: r var(--om-t) var(--om-ease); }
.om-pin-pulse { fill: var(--om-office); opacity: 0; }
.om-live .om-pin-pulse { animation: om-pulse 2.8s var(--om-ease-io) infinite; }
@keyframes om-pulse { 0% { opacity: .35; transform: scale(.7); } 70% { opacity: 0; transform: scale(1.9); } 100% { opacity: 0; transform: scale(1.9); } }
.om-hot-office { transform-box: view-box; }
.om-hot-office .om-pin-pulse, .om-hot-office .om-pin-ring { transform-box: fill-box; transform-origin: center; }
.om-hot-office:hover .om-pin-ring, .om-hot-office.is-hover .om-pin-ring, .om-hot-office.is-active .om-pin-ring { r: 13.5; }

/* ---------- Muscat -> Block 5 connector ---------------------------------- */
.om-link-base { fill: none; stroke: var(--om-navy); stroke-opacity: .22; stroke-width: 2; stroke-linecap: round; }
.om-link-flow { fill: none; stroke: var(--om-gold); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 8 12; }
.om-live .om-link-flow { animation: om-flow 1.6s linear infinite; }
@keyframes om-flow { to { stroke-dashoffset: -20; } }

/* ---------- city labels --------------------------------------------------- */
.om-city-dot { fill: var(--om-navy); }
.om-city { font-size: 15px; font-weight: 600; fill: var(--om-navy); }
.om-city-end { text-anchor: end; }

/* ---------- dim unrelated content while exploring ------------------------ */
.om-has-sel .om-hot:not(.is-active) { opacity: .38; }
.om-hot { transition: opacity var(--om-t) var(--om-ease-io); }
.om-has-sel .om-link { opacity: .35; }
.om-has-sel[data-selected="block_5"] .om-link, .om-has-sel[data-selected="ho"] .om-link { opacity: 1; }

/* ---------- entrance ------------------------------------------------------ */
.om-js:not(.om-in) .om-hot, .om-js:not(.om-in) .om-link, .om-js:not(.om-in) .om-cities { opacity: 0; }
.om-js.om-in .om-hot-region { animation: om-fade 500ms var(--om-ease) both 120ms; }
.om-js.om-in .om-link { animation: om-fade 500ms var(--om-ease) both 320ms; }
.om-js.om-in .om-cities { animation: om-fade 500ms var(--om-ease) both 420ms; }
.om-js.om-in [data-hotspot="block_5"] { animation: om-pop 520ms var(--om-ease) both 480ms; }
.om-js.om-in [data-hotspot="block_15"] { animation: om-pop 520ms var(--om-ease) both 600ms; }
.om-js.om-in .om-hot-office .om-pin-wrap { animation: om-pop 520ms var(--om-ease) both 720ms; }
@keyframes om-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes om-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- distance chip + tooltip -------------------------------------- */
.om-distance { position: absolute; left: 18px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; background: var(--om-card); border: 1px solid var(--om-line); border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 500; color: var(--om-ink); box-shadow: 0 8px 20px rgba(1,58,92,.12); }
.om-distance .fas { color: var(--om-gold); }
.om-tip { position: absolute; z-index: 20; transform: translate(-50%, -100%); background: rgba(11,46,79,.96); color: #fff; border-radius: 10px; padding: 9px 14px; font-size: 14px; line-height: 1.45; pointer-events: none; box-shadow: 0 12px 26px rgba(1,42,66,.3); max-width: 260px; text-align: center; }
.om-tip--below { transform: translate(-50%, 0); }
.om-tip strong { display: block; font-family: 'Montserrat', sans-serif; font-size: 13px; margin-bottom: 2px; }
.om-tip span { opacity: .85; font-size: 12.5px; }

/* ---------- legend -------------------------------------------------------- */
.om-side { display: flex; flex-direction: column; gap: 16px; }
.om-legend { background: var(--om-card); border: 1px solid var(--om-line); border-radius: 14px; padding: 16px 18px; box-shadow: 0 10px 26px rgba(1,58,92,.07); }
.om-legend h3 { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--om-muted); margin: 0 0 12px; }
.om-legend ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.om-legend-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: start; background: var(--om-canvas); border: 1px solid var(--om-line); border-radius: 11px; padding: 11px 13px; cursor: pointer; transition: border-color var(--om-t-fast), background var(--om-t-fast), transform var(--om-t-fast) var(--om-ease); }
.om-legend-item:hover { transform: translateY(-2px); border-color: #9fc4da; background: var(--om-card); }
.om-legend-item[aria-pressed="true"] { background: var(--om-card); border-color: var(--om-blue); box-shadow: 0 6px 16px rgba(1,90,141,.14); }
.om-legend-item:focus-visible { outline: 3px solid rgba(241,196,43,.55); outline-offset: 2px; }
.om-legend-swatch { flex: none; width: 14px; height: 14px; border-radius: 4px; margin-top: 2px; }
.om-kind-region .om-legend-swatch { background: rgba(1,90,141,.25); border: 2px dashed var(--om-region); border-radius: 4px; }
.om-kind-office .om-legend-swatch { background: var(--om-office); border-radius: 50%; }
.om-legend-item[data-hotspot="block_5"] .om-legend-swatch { background: var(--om-block); }
.om-legend-item[data-hotspot="block_15"] .om-legend-swatch { background: var(--om-block-2); }
.om-legend-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.om-legend-name { font-family: 'Montserrat', sans-serif; font-size: 13.5px; font-weight: 700; color: var(--om-ink); }
.om-legend-sum { font-size: 12.5px; line-height: 1.45; color: var(--om-muted); }

/* ---------- detail panel -------------------------------------------------- */
.om-panel { background: var(--om-card); border: 1px solid var(--om-line); border-top: 3px solid var(--om-gold); border-radius: 14px; padding: 18px 20px 16px; box-shadow: 0 10px 26px rgba(1,58,92,.07); }
.om-panel:focus { outline: none; }
.om-panel-close { display: none; }
.om-panel-kicker { font-family: 'Montserrat', sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--om-gold); margin: 0 0 5px; }
.om-panel-title { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 700; color: var(--om-ink); margin: 0 0 10px; line-height: 1.25; }
.om-panel-desc { font-size: 14.5px; line-height: 1.8; color: #3f4d56; margin: 0 0 14px; }
.om-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.om-stat { background: var(--om-canvas); border: 1px solid var(--om-line); border-radius: 10px; padding: 9px 11px; }
.om-stat dt { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--om-muted); margin: 0 0 2px; font-weight: 600; }
.om-stat dd { font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 700; color: var(--om-blue); margin: 0; }
.om-panel-nav { display: flex; gap: 9px; margin-top: 14px; }
.om-panel-nav button { flex: 1; border: 1px solid var(--om-line); background: var(--om-card); color: var(--om-blue); font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600; border-radius: 10px; padding: 9px; cursor: pointer; transition: background var(--om-t-fast), color var(--om-t-fast), border-color var(--om-t-fast); }
.om-panel-nav button:hover { background: var(--om-blue); border-color: var(--om-blue); color: #fff; }

/* ---------- notes + prose ------------------------------------------------- */
.om-notes { font-size: 12.5px; line-height: 1.7; color: var(--om-muted); margin: 14px 2px 0; }
.om-source { color: #9aa7b1; }
.om-prose { margin-top: 14px; background: var(--om-card); border: 1px solid var(--om-line); border-radius: 12px; padding: 14px 20px; }
.om-prose summary { font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 600; color: var(--om-blue); cursor: pointer; }
.om-prose[open] summary { margin-bottom: 10px; }
.om-prose ol { margin: 0; padding-inline-start: 22px; }
.om-prose > ol > li { font-size: 14px; line-height: 1.8; color: #3f4d56; margin-bottom: 10px; }
.om-prose ul { margin: 6px 0 0; padding-inline-start: 18px; }
.om-prose ul li { font-size: 13px; color: var(--om-muted); }

/* ---------- responsive ---------------------------------------------------- */
@media (max-width: 991px) {
  .om-stage { grid-template-columns: 1fr; }
  .om-svg { max-height: 56vh; }
  .om-side { flex-direction: column; }
  /* Stacked layout: the panel becomes a bottom sheet that slides over the map
     when something is selected, instead of sitting at the end of the page
     where a tap appears to do nothing. The legend is the browse list. */
  .om-panel { display: none; }
  .om-has-sel .om-panel {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    max-height: 66vh; overflow-y: auto; border-radius: 18px 18px 0 0;
    border-bottom: 0; box-shadow: 0 -14px 34px rgba(1, 42, 66, .3);
    /* Deliberately NOT animated. An entrance animation on a critical element is
       a correctness risk: a compositor that never ticks the clock (throttled,
       backgrounded, or animations disabled) holds the element at its start
       keyframe — which parked this sheet a full 498px below the fold in
       testing. The sheet just appears; the grab handle and close button carry
       the affordance instead. */
    padding-top: 22px;
  }
  .om-has-sel .om-panel:before {
    content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 2px; background: var(--om-line);
  }
  .om-panel-close {
    display: block; position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
    border: 0; border-radius: 10px; background: var(--om-canvas); color: var(--om-muted);
    font-size: 20px; line-height: 1; cursor: pointer;
  }
  .om-panel-close:focus-visible { outline: 3px solid rgba(241,196,43,.6); outline-offset: 2px; }
  .om-panel[dir="rtl"] .om-panel-close { right: auto; left: 12px; }

  .om-legend ul { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
  .omx-hero { min-height: 0; padding: 130px 0 64px; }
  .omx-hero h1 { font-size: 30px; }
  .omx-hero__sub { font-size: 15.5px; }
  .omx-section { padding: 28px 0 56px; }
  .om-hint { font-size: 13.5px; margin-bottom: 12px; }
  .om-legend ul { grid-template-columns: 1fr; }
  .om-stats { grid-template-columns: 1fr 1fr; }
  .om-svg { max-height: 48vh; }
  .om-canvas { padding: 10px; }
  /* Chip + reset share one row and must not collide on a narrow phone. */
  .om-distance, .om-reset { font-size: 11.5px; padding: 6px 10px; gap: 6px; }
  .om-distance { left: 8px; bottom: 8px; max-width: 58%; }
  .om-reset { right: 8px; bottom: 8px; }
  .om-reset[dir="rtl"] { left: 8px; right: auto; }
  .om-distance[dir="rtl"] { right: 8px; left: auto; }
  .om-panel { padding: 15px 16px 14px; }
  .om-panel-title { font-size: 18px; }
  .om-panel-desc { font-size: 14px; }
  .om-notes { font-size: 12px; }
}
@media (max-width: 360px) {
  .om-stats { grid-template-columns: 1fr; }
  .om-distance { max-width: 52%; }
}

/* ---------- reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .omx *, .omx *:before, .omx *:after { animation: none !important; transition: none !important; }
  .om-js:not(.om-in) .om-hot, .om-js:not(.om-in) .om-link, .om-js:not(.om-in) .om-cities { opacity: 1; }
}

/* ---------- reset control (shown once something is selected) -------------- */
.om-reset { position: absolute; right: 18px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; background: var(--om-navy); color: #fff; border: 0; border-radius: 999px; padding: 9px 16px; font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 22px rgba(1,42,66,.28); transition: background var(--om-t-fast), transform var(--om-t-fast); }
.om-reset:hover { background: var(--om-blue); transform: translateY(-2px); }
.om-reset:focus-visible { outline: 3px solid rgba(241,196,43,.6); outline-offset: 2px; }
.om-reset[dir="rtl"] { right: auto; left: 18px; }
/* The pin's entrance/hover animation lives on the inner wrapper so it can
   never override the positioning transform on the hotspot group. */
.om-pin-wrap { transform-box: fill-box; transform-origin: center; }
@media (max-width: 575px) { .om-reset { right: 10px; bottom: 10px; font-size: 12px; padding: 8px 13px; } }

/* ---------- neighbouring concessions (context only) ----------------------- */
.om-context-block { fill: none; stroke: #B9C8D4; stroke-width: 0.9; stroke-dasharray: 3 4; }
.om-has-sel .om-context { opacity: .45; transition: opacity var(--om-t) var(--om-ease-io); }

/* The "dimensions are approximate" caveat sits with the sources under the map */
.om-approx { color: var(--om-ink); }
