/* division_map.php — Division Map page styles */


    /* ══════════════════════════════════════════════
       DIVISION MAP PAGE — Light Mode (matches site theme)
       Uses global variables from variables.css
       ══════════════════════════════════════════════ */

    /* ── Area colour tokens (reused from existing dark vars, now as accent fills) ── */
    :root {
      --area1:         #e91e8c;
      --area2a:        #9c27b0;
      --area2b:        #f44336;
      --area3:         #00bcd4;
      --area4:         #3f51b5;
      --area5a:        #ff9800;
      --area5b:        #c9a800;
      --city-tacloban: #0097a7;
      --city-ormoc:    #558b2f;
      --city-baybay:   #c2185b;
    }

    /* ── Hero — uses global .hero classes from pages.css, just override content ── */
    .map-hero {
      background: var(--accent);
      padding: 72px 0 56px;
      position: relative; overflow: hidden;
      border-bottom: 1px solid rgba(201,168,76,0.2);
    }
    .map-hero::before {
      content: '';
      position: absolute; inset: 0;
      background:
        radial-gradient(ellipse 60% 80% at 90% 50%, rgba(184,146,42,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 5% 80%,  rgba(62,112,85,0.25) 0%, transparent 55%);
      pointer-events: none;
    }
    .map-hero-glow {
      position: absolute; inset: 0;
      background-image:
        linear-gradient(rgba(184,146,42,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184,146,42,0.04) 1px, transparent 1px);
      background-size: 52px 52px;
      pointer-events: none;
    }
    .map-hero-inner {
      max-width: 1200px; margin: 0 auto; padding: 0 40px;
      display: flex; align-items: center; justify-content: space-between; gap: 48px;
    }
    .map-hero-eyebrow {
      font-family: var(--mono); font-size: 10px; font-weight: 700;
      letter-spacing: .18em; text-transform: uppercase;
      color: var(--gold-rich); margin-bottom: 14px;
      display: flex; align-items: center; gap: 10px;
    }
    .map-hero-eyebrow::before {
      content: ''; display: block; width: 28px; height: 1px; background: var(--gold-rich);
    }
    .map-hero-title {
      font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4rem);
      font-weight: 300; line-height: 1.05; color: #fff; letter-spacing: -.02em;
      margin-bottom: 18px;
    }
    .map-hero-title em { font-style: italic; color: var(--gold-rich); }
    .map-hero-lead {
      font-size: .93rem; color: rgba(255,255,255,0.55); line-height: 1.7; max-width: 420px;
    }
    .map-hero-stats {
      display: flex; gap: 32px; flex-shrink: 0;
    }
    .hero-stat {
      text-align: center; padding: 20px 28px;
      border: 1px solid rgba(201,168,76,0.18);
      border-radius: var(--radius); background: rgba(255,255,255,0.04);
    }
    .hero-stat-num {
      font-family: var(--serif); font-size: 2.4rem; font-weight: 600;
      color: var(--gold-rich); line-height: 1;
    }
    .hero-stat-label {
      font-family: var(--mono); font-size: 9px; font-weight: 700;
      letter-spacing: .14em; text-transform: uppercase;
      color: rgba(255,255,255,0.35); margin-top: 6px;
    }

    /* ── Page body layout ── */
    .map-page-body {
      max-width: 1200px; margin: 0 auto;
      padding: 40px 40px 80px;
      display: grid; grid-template-columns: 260px 1fr; gap: 28px;
    }

    /* ── Sidebar ── */
    .map-sidebar {
      display: flex; flex-direction: column; gap: 16px;
      position: sticky; top: 20px; align-self: start;
    }
    /* ── Al Jazeera Sidebar Cards ── */
    .sidebar-card {
      border-radius: 2px; overflow: hidden;
      border: 1px solid #d0d0d0;
      background: #ffffff;
      box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }
    .sidebar-card-head {
      padding: 10px 14px; display: flex; align-items: center; gap: 10px;
      background: #1a1a1a;
      border-bottom: 3px solid #e8281c;
    }
    .sidebar-card-head svg { stroke: rgba(255,255,255,0.7); flex-shrink: 0; }
    .sidebar-card-title {
      font-family: 'Montserrat', 'Arial Narrow', Arial, sans-serif;
      font-size: 11px; font-weight: 800;
      letter-spacing: .18em; text-transform: uppercase; color: #ffffff;
    }

    /* Area list */
    .area-list { display: flex; flex-direction: column; }
    .area-btn {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 14px;
      position: relative; overflow: hidden;
      border: none; background: #ffffff; cursor: pointer;
      transition: background .12s;
      border-bottom: 1px solid #e8e8e8;
      text-align: left;
    }
    .area-btn:last-child { border-bottom: none; }
    .area-btn::before {
      content: ''; position: absolute; left: 0; top: 0; bottom: 0;
      width: 3px; background: var(--area-clr); opacity: 0; transition: opacity .12s;
    }
    .area-btn:hover { background: #f4f4f4; }
    .area-btn:hover::before { opacity: 1; }
    .area-btn.active { background: #f0f0f0; }
    .area-btn.active::before { opacity: 1; }
    .area-dot {
      width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
      border: 1.5px solid rgba(0,0,0,0.18);
      box-shadow: none;
      flex-shrink: 0;
    }
    .area-btn-info { flex: 1; min-width: 0; }
    .area-btn-name {
      font-family: 'Montserrat', Arial, sans-serif;
      font-size: 12px; font-weight: 700; color: #1a1a1a; display: block;
      letter-spacing: .01em;
    }
    .area-btn-mun  {
      font-family: Arial, sans-serif;
      font-size: 10px; color: #666666; display: block; margin-top: 1px;
    }
    .area-btn-chevron {
      font-size: 13px; color: #aaaaaa;
      transition: transform .2s, color .2s; flex-shrink: 0;
    }
    .area-btn.active .area-btn-chevron { transform: translateX(3px); color: #e8281c; }

    /* Div info list */
    .div-info-list { display: flex; flex-direction: column; }
    .div-info-row {
      display: flex; justify-content: space-between; align-items: baseline;
      padding: 8px 14px; border-bottom: 1px solid #eeeeee; gap: 8px;
    }
    .div-info-row:last-child { border-bottom: none; }
    .div-info-label {
      font-family: Arial, sans-serif;
      font-size: 10px; color: #888888; text-transform: uppercase; letter-spacing: .06em;
    }
    .div-info-val {
      font-family: 'Montserrat', Arial, sans-serif;
      font-size: 11px; font-weight: 800; color: #1a1a1a; letter-spacing: .04em;
    }

    /* ── Map frame ── */
    .map-right { display: flex; flex-direction: column; gap: 20px; }
    .map-frame {
      position: relative; border-radius: var(--radius-lg); overflow: hidden;
      border: 1px solid var(--border);
      background: #ebebeb;
      padding: 20px;
      box-shadow: var(--shadow-md);
    }
    .map-frame-label {
      font-family: 'Montserrat', Arial, sans-serif; font-size: 9px; font-weight: 800;
      letter-spacing: .2em; text-transform: uppercase; color: #888888;
      margin-bottom: 16px;
    }
    .map-corner {
      position: absolute; width: 14px; height: 14px;
      border-color: var(--gold); border-style: solid; opacity: .5;
    }
    .map-corner.tl { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
    .map-corner.tr { top: 10px; right: 10px; border-width: 1px 1px 0 0; }
    .map-corner.bl { bottom: 10px; left: 10px; border-width: 0 0 1px 1px; }
    .map-corner.br { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

    /* ── SVG map ── */
    .leyte-map-svg {
      width: 100%; max-width: 460px; height: auto;
      display: block; margin: 0 auto;
      position: relative; z-index: 1;
      border-radius: 6px;
    }

    /* Al Jazeera–style map fills */
    .area-region { cursor: pointer; transition: filter .18s, opacity .18s; }
    .area-region path {
      fill: #ffffff;
      stroke: #888888;
      stroke-width: 0.5;
      vector-effect: non-scaling-stroke;
      transition: fill .18s;
    }
    .area-region:hover path  { fill: #d0d0d0; }
    .area-region.active path { fill: #111111 !important; stroke: #333333 !important; }
    .area-region.dimmed      { opacity: 0.45; }

    /* Label callout elements — hidden by default, partial on hover, full on active */
    .map-area-label {
      font-family: 'Montserrat', 'Arial Narrow', Arial, sans-serif;
      font-size: 280px; font-weight: 800;
      fill: #ffffff; text-anchor: middle;
      pointer-events: none; letter-spacing: .01em;
    }
    .map-label-box    { fill: #111; stroke: #333; stroke-width: 18; pointer-events: none; }
    .map-city-dot     { fill: #111; stroke: #444; stroke-width: 28; pointer-events: none; }
    .map-capital-box  { fill: #444444; pointer-events: none; }
    .map-capital-label { fill: #fff !important; font-weight: 900 !important; }

    /* Label group visibility control */
    .map-label-group {
      opacity: 0;
      transition: opacity .2s ease;
      pointer-events: none;
    }
    .area-region:hover .map-label-group {
      opacity: 0.4;
    }
    .area-region.active .map-label-group {
      opacity: 1;
    }

    /* Compass/scale bar colours */
    .map-compass-text { fill: rgba(80,80,80,0.8); }
    .map-compass-line { stroke: rgba(80,80,80,0.4); }
    .map-scale-bar-a  { fill: rgba(80,80,80,0.55); }
    .map-scale-bar-b  { fill: rgba(80,80,80,0.22); }
    .map-scale-text   { fill: rgba(80,80,80,0.55); }

    /* Tooltip */
    #map-tooltip rect { fill: rgba(255,255,255,0.97); stroke: var(--border); }
    #map-tooltip text { fill: var(--text); }

    /* ── Pulse ring ── */
    @keyframes pulse-ring {
      0%   { opacity: .5; r: 6px; }
      100% { opacity: 0;  r: 16px; }
    }
    .pulse-ring { animation: pulse-ring .9s ease-out infinite; }

    /* ── Legend ── */
    .legend-row {
      display: flex; flex-wrap: wrap; gap: 8px;
    }
    /* ── AJ Legend chips ── */
    .legend-chip {
      display: flex; align-items: center; gap: 7px;
      padding: 5px 12px; border-radius: 2px;
      border: 1px solid #cccccc; background: #ffffff;
      font-family: 'Montserrat', Arial, sans-serif;
      font-size: 10px; font-weight: 700; letter-spacing: .04em;
      color: #444444; cursor: pointer;
      transition: border-color .12s, background .12s, color .12s;
      text-transform: uppercase;
    }
    .legend-chip:hover { border-color: #1a1a1a; color: #1a1a1a; background: #f4f4f4; }
    .legend-chip.active {
      color: #ffffff; border-color: #1a1a1a; background: #1a1a1a;
    }
    .legend-chip.active .legend-dot {
      border-color: rgba(255,255,255,0.4);
    }
    .legend-dot {
      width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
      border: 1.5px solid rgba(0,0,0,0.15);
    }

    /* ── AJ Detail card ── */
    .detail-card {
      border-radius: 2px; overflow: hidden;
      border: 1px solid #d0d0d0; background: #ffffff;
      box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }
    .detail-header {
      padding: 0; display: flex; gap: 0; align-items: stretch;
      background: #1a1a1a;
      border-bottom: none;
    }
    .detail-color-swatch { width: 6px; flex-shrink: 0; }
    .detail-header-text { padding: 16px 20px; }
    .detail-area-name {
      font-family: 'Montserrat', Arial, sans-serif;
      font-size: 22px; font-weight: 900; color: #ffffff; line-height: 1;
      letter-spacing: -.01em; text-transform: uppercase;
    }
    .detail-area-sub  {
      font-family: Arial, sans-serif;
      font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 4px;
      text-transform: uppercase; letter-spacing: .08em;
    }
    .detail-stats-row {
      display: flex; border-bottom: 1px solid #e8e8e8;
      background: #f8f8f8;
    }
    .detail-stat-box {
      flex: 1; padding: 14px 10px; text-align: center;
      border-right: 1px solid #e8e8e8;
    }
    .detail-stat-box:last-child { border-right: none; }
    .detail-stat-num {
      font-family: 'Montserrat', Arial, sans-serif;
      font-size: 26px; font-weight: 900; color: #1a1a1a; line-height: 1;
    }
    .detail-stat-lbl {
      font-family: Arial, sans-serif;
      font-size: 8px; color: #888888; margin-top: 3px;
      letter-spacing: .12em; text-transform: uppercase;
    }
    .detail-mun-section { padding: 16px 20px; }
    .detail-mun-heading {
      font-family: 'Montserrat', Arial, sans-serif;
      font-size: 8px; letter-spacing: .2em; text-transform: uppercase;
      color: #888888; margin-bottom: 8px; font-weight: 700;
    }
    .detail-mun-tags { display: flex; flex-wrap: wrap; gap: 5px; }
    .mun-tag {
      font-family: Arial, sans-serif;
      font-size: 10px; padding: 3px 9px; border-radius: 2px;
      background: #f0f0f0; border: 1px solid #dedede; color: #333333;
    }

    /* ── Responsive ── */
    @media (max-width: 960px) {
      .map-hero-inner { padding: 0 24px 48px; flex-wrap: wrap; }
      .map-hero-stats { display: none; }
      .map-page-body  { grid-template-columns: 1fr; padding: 20px 20px 60px; gap: 20px; }
      .map-sidebar    { position: static; }
    }

    /* ── Admin Label Editor Panel ── */
    .admin-editor-toggle {
      position: fixed; bottom: 24px; right: 24px; z-index: 1000;
      background: var(--accent);
      border: 1px solid rgba(201,168,76,0.3); border-radius: 50px;
      padding: 10px 18px 10px 14px;
      display: flex; align-items: center; gap: 8px;
      color: var(--gold-rich); font-family: var(--mono); font-size: 11px;
      font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
      cursor: pointer; box-shadow: var(--shadow-md);
      transition: all .2s;
    }
    .admin-editor-toggle:hover { border-color: var(--gold-rich); box-shadow: 0 4px 20px rgba(26,61,43,0.3); }
    .admin-editor-toggle .dot {
      width: 8px; height: 8px; border-radius: 50%;
      background: var(--gold-rich); box-shadow: 0 0 6px var(--gold-rich);
    }

    .admin-label-panel {
      position: fixed; bottom: 70px; right: 24px; z-index: 999;
      width: 310px;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius-lg); overflow: hidden;
      box-shadow: var(--shadow-lg);
      display: none; flex-direction: column;
    }
    .admin-label-panel.open { display: flex; }
    .alp-head {
      padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
      background: var(--accent);
      border-bottom: 1px solid rgba(201,168,76,0.2);
    }
    .alp-title { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--gold-rich); }
    .alp-close { background: none; border: none; color: rgba(255,255,255,0.4); cursor: pointer; font-size: 18px; line-height: 1; padding: 0; }
    .alp-close:hover { color: #fff; }

    .alp-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow-y: auto; }
    .alp-select-row { display: flex; flex-direction: column; gap: 6px; }
    .alp-label { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
    .alp-select {
      background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
      color: var(--text); font-family: var(--mono); font-size: 11px;
      padding: 8px 10px; width: 100%; appearance: none; cursor: pointer;
    }
    .alp-select:focus { outline: none; border-color: var(--accent); }
    .alp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .alp-field { display: flex; flex-direction: column; gap: 6px; }
    .alp-input {
      background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
      color: var(--text); font-family: var(--mono); font-size: 11px;
      padding: 8px 10px; width: 100%; box-sizing: border-box;
    }
    .alp-input:focus { outline: none; border-color: var(--accent); }
    .alp-style-row { display: flex; gap: 6px; flex-wrap: wrap; }
    .alp-style-btn {
      flex: 1; min-width: 60px; padding: 7px 8px; border-radius: var(--radius-sm);
      border: 1px solid var(--border); background: var(--surface-2);
      color: var(--text-muted); font-family: var(--mono); font-size: 9px;
      letter-spacing: .06em; cursor: pointer; text-align: center; transition: all .15s;
    }
    .alp-style-btn:hover { border-color: var(--accent-light); color: var(--text); }
    .alp-style-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
    .alp-divider { border: none; border-top: 1px solid var(--border); margin: 2px 0; }
    .alp-drag-hint {
      font-family: var(--mono); font-size: 9px; color: var(--text-muted);
      text-align: center; padding: 6px 10px; background: var(--surface-2);
      border-radius: var(--radius-sm); border: 1px dashed var(--border); letter-spacing: .08em;
    }
    .alp-drag-hint.active-drag { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
    .alp-btn-row { display: flex; gap: 8px; }
    .alp-btn {
      flex: 1; padding: 9px; border-radius: var(--radius-sm); border: 1px solid var(--border);
      font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .08em;
      text-transform: uppercase; cursor: pointer; transition: all .15s;
    }
    .alp-btn-reset { background: transparent; color: var(--text-muted); }
    .alp-btn-reset:hover { border-color: var(--border-hi); color: var(--text); }
    .alp-btn-save { background: var(--accent); color: #fff; border-color: var(--accent); }
    .alp-btn-save:hover { background: var(--accent-mid); box-shadow: var(--shadow-sm); }
    .alp-btn-export { background: var(--surface-2); color: var(--accent); border-color: var(--border); font-size: 9px; width: 100%; margin-top: 4px; }
    .alp-btn-export:hover { background: var(--accent-wash); }
    .alp-saved-badge {
      font-family: var(--mono); font-size: 9px; color: var(--success);
      text-align: center; padding: 4px; opacity: 0; transition: opacity .3s; letter-spacing: .1em;
    }
    .alp-saved-badge.show { opacity: 1; }
    .label-edit-mode .map-area-label { cursor: grab; }
    .label-edit-mode .map-area-label:active { cursor: grabbing; }

