@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600');

:root { --color-app: rgb(179,11,0); --color-ocre: #f7f5f3; }
* { box-sizing: border-box; scrollbar-width: thin; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; font-family: 'Open Sans', Arial, sans-serif; color: #222; }
header { flex: none; display: flex; flex-wrap: wrap; align-items: center; background: var(--color-ocre); border-top: 1px solid #888; border-bottom: 1px solid #aaa; }
#viewer-title { flex: 0 0 auto; margin: 0; padding: 0 20px 0 16px; color: var(--color-app); font-size: 21px; font-weight: 400; line-height: 1.4; }
#cabecera { flex: 1 1 max-content; min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 18px; height: 48px; padding: 0 16px; overflow-x: auto; white-space: nowrap; font-size: 15px; }
@media (max-width: 1200px) {
  #viewer-title { padding: 8px 16px; }
  #cabecera { gap: 14px; height: 40px; }
}
#cabecera a { position: relative; flex-shrink: 0; color: #222; text-decoration: none; }
#cabecera a::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 100%; height: 3px; background: var(--color-app); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
#cabecera a:hover::after, #cabecera a.activo::after { transform: scaleX(1); }
#cabecera a:focus-visible { outline: 2px solid var(--color-app); outline-offset: 5px; }
main { position: relative; display: flex; flex: 1; min-height: 0; }
#map-workspace { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden; }
#map { width: 100%; height: 100%; background: #fff; }
.leaflet-left .leaflet-control-scale { margin-left: 20px; }
.leaflet-bottom .leaflet-control-scale { margin-bottom: 18px; }
.leaflet-control-scale-line { position: relative; box-sizing: border-box; overflow: visible; padding: 0 0 9px; border: 0; background: transparent; color: var(--color-app); font: 400 11px/1.3 'Open Sans', Arial, sans-serif; text-align: right; white-space: nowrap; text-shadow: 0 0 3px #fff, 0 1px 2px #fff, 0 -1px 2px #fff; }
.leaflet-control-scale-line::before { content: '0'; position: absolute; top: 0; left: 0; }
.leaflet-control-scale-line::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; box-sizing: border-box; border: 1px solid var(--color-app); background: linear-gradient(to right, var(--color-app) 50%, #fff 50%); box-shadow: 0 0 2px #fff; }
#map.notebook {
  background-image:
    linear-gradient(to right, rgba(200,200,200,.3) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(200,200,200,.3) 1px, transparent 1px),
    linear-gradient(to right, rgba(160,160,160,.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(160,160,160,.4) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,0,0,.8) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px, 100% 100%;
  background-position: 0 0, 0 0, 0 0, 0 0, 50px 0;
  background-repeat: repeat, repeat, repeat, repeat, no-repeat;
  background-attachment: local;
}
#pantallaCompleta { position: absolute; top: 64px; right: 8px; z-index: 500; width: 36px; height: 36px; padding: 0; border: 1px solid var(--color-app); border-radius: 5px; background: #fff; cursor: pointer; }
#pantallaCompleta img { display: block; width: 34px; height: 34px; }
#pantallaCompleta:hover { background: #fcf1ee; }
#pantallaCompleta:focus-visible { outline: 2px solid var(--color-app); outline-offset: 3px; }
.leaflet-control-layers { top: 272px; right: 0; background: #fffffff5; color: #222; font-family: 'Open Sans', Arial, sans-serif; border-radius: 9px; box-shadow: 0 4px 18px #0000001a, 0 1px 4px #0000000d; }
.leaflet-touch .leaflet-control-layers { border: 1px solid #d9d9d9; }
.leaflet-control-layers-expanded { width: 246px; max-width: calc(100vw - 24px); padding: 12px; }
.leaflet-control-layers-list::before { content: 'Capas base'; display: block; color: #222; font-size: 14px; font-weight: 600; padding: 0 6px 10px; border-bottom: 1px solid #e6e6e6; margin-bottom: 7px; }
.leaflet-control-layers-overlays::before { content: 'Capas superpuestas'; display: block; color: #555; font-size: 12px; font-weight: 600; padding: 2px 6px 7px; }
.leaflet-control-layers label { margin: 0; padding: 3px 8px; border-radius: 5px; font-size: 13px; line-height: 1.35; cursor: pointer; transition: background .15s ease; }
.leaflet-control-layers label:hover { background: #f4f3f1; }
.leaflet-control-layers label:has(input:checked) { background: #fcf1ee; color: var(--color-app); font-weight: 600; }
.leaflet-control-layers label > span { display: flex; align-items: center; gap: 8px; }
.leaflet-control-layers label span span { min-width: 0; overflow-wrap: anywhere; }
.leaflet-control-layers-selector { top: 0; flex: 0 0 auto; width: 15px; height: 15px; margin: 0; accent-color: var(--color-app); cursor: pointer; }
.leaflet-control-layers-selector:focus-visible { outline: 2px solid var(--color-app); outline-offset: 3px; }
.leaflet-control-layers-separator { margin: 10px 0; border-top-color: #e6e6e6; }
.leaflet-control-layers-toggle { background-image: url("./assets/icons/layers.svg") !important; background-size: 32px 32px; background-position: center; width: 34px; height: 34px; background-color: white; border-radius: 6px; box-shadow: 0 2px 5px #0004; }
.leaflet-control-zoom { position: absolute; top: 160px; right: 0; transform: scale(1.1); }
.leaflet-touch .leaflet-control-zoom, .leaflet-control-zoom { border: 1px solid var(--color-app); }
.leaflet-control-zoom a { color: var(--color-app); border-bottom-color: var(--color-app); }
.leaflet-control-zoom a:hover, .leaflet-control-zoom a:focus { color: var(--color-app); background: #fcf1ee; }
.leaflet-control-zoom a.leaflet-disabled { color: #c99893; }
.leaflet-control-layers-toggle { background-size: 25px 25px; border-radius: 8px; box-shadow: none; }
#zoom { position: absolute; top: 112px; right: 8px; width: 36px; height: 42px; background: #fff; border: 1px solid var(--color-app); border-radius: 5px; text-align: center; z-index: 500; cursor: help; }
#zoom span { display: block; width: 100%; padding-top: 2px; color: var(--color-app); font-size: 12px; }
#map-status { pointer-events: none; margin: 0; padding: 12px 16px; background: white; border-left: 3px solid var(--color-app); box-shadow: 0 2px 8px #0002; font-size: 13px; }
#map-status { position: absolute; bottom: 84px; left: 12px; max-width: min(460px, calc(100% - 24px)); z-index: 600; }
@media (max-width: 560px) { #cabecera { justify-content: flex-start; } }
#nav_menu_inferior { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; z-index: 500; padding: 10px 20px; border: 1px solid #aaa; border-radius: 5px; background: rgba(225,225,225,.25); }
#nav_menu_inferior button { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 5px; background: transparent; cursor: pointer; }
#nav_menu_inferior img { display: block; width: 40px; height: 40px; border: 1px solid var(--color-app); border-radius: 5px; background: rgba(255,255,255,.5); transition: transform .2s ease; }
#nav_menu_inferior button:hover img { transform: scale(1.25); }
#nav_menu_inferior button:focus-visible { outline: 2px solid var(--color-app); outline-offset: 2px; }
main.gml-dragover::after { content: 'Suelta los archivos GML v3 para cargarlos'; position: absolute; inset: 12px; z-index: 1100; display: grid; place-items: center; border: 3px dashed var(--color-app); background: #ffffffcc; color: var(--color-app); font-size: 20px; pointer-events: none; }
#nav_menu_inferior { max-width: calc(100% - 16px); overflow-x: auto; }
#nav_menu_inferior button { flex-shrink: 0; }
#gml-status { position: absolute; bottom: 84px; left: 12px; max-width: min(460px, calc(100% - 24px)); max-height: 180px; overflow: auto; z-index: 600; margin: 0; padding: 12px 16px; border-left: 3px solid var(--color-app); background: #fff; box-shadow: 0 2px 8px #0002; font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; }
#gml-status:not([hidden]) + #nav_menu_inferior ~ #map-status { bottom: 50px; }
#gml-version-dialog { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 28px; border: 1px solid #e4b6af; border-top: 5px solid var(--color-app); border-radius: 14px; color: #222; background: #fff; box-shadow: 0 16px 55px #0004; }
#gml-version-dialog::backdrop { background: #17202780; }
.gml-version-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: #fce9e6; color: var(--color-app); font-size: 26px; font-weight: 600; }
#gml-version-title { margin: 12px 0 8px; font-size: 1.35rem; }
#gml-version-help { margin: 0 0 14px; line-height: 1.5; }
#gml-version-files { max-height: 25vh; overflow: auto; overflow-wrap: anywhere; margin: 0 0 20px; padding: 10px 14px 10px 32px; border-radius: 6px; background: #f7f5f3; }
#gml-version-dialog form { display: flex; justify-content: flex-end; }
#gml-version-dialog button { padding: 9px 16px; border: 0; border-radius: 6px; background: var(--color-app); color: #fff; font: inherit; cursor: pointer; }
#gml-version-dialog button:focus-visible { outline: 2px solid var(--color-app); outline-offset: 3px; }

#gml-file-panel { position: absolute; top: 12px; left: 12px; z-index: 600; width: 350px; max-width: calc(100% - 72px); border: 1px solid #d9d9d9; border-radius: 9px; background: #fffffff5; box-shadow: 0 3px 14px #0002; overflow: hidden; font-size: 12px; }
.gml-file-heading { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid #e6e6e6; font-size: 13px; }
#gml-file-count { padding: 1px 7px; border-radius: 12px; background: #f3e7e5; color: var(--color-app); font-size: 11px; }
.gml-file-columns, .gml-file-row { display: grid; grid-template-columns: 18px minmax(0,1fr) 28px 30px 30px 34px; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; }
.gml-file-columns { color: #73777b; background: #f7f7f6; font-size: 10px; }
.gml-file-columns > span:nth-child(n+3) { text-align: center; }
.gml-file-columns { padding-right: calc(6px + var(--gml-scrollbar-width, 0px)); }
.gml-file-row > .gml-file-visibility { justify-self: center; }
#gml-file-list { list-style: none; padding: 0; margin: 0; max-height: min(300px, calc(100vh - 240px)); overflow-y: auto; }
.gml-file-row { box-sizing: border-box; height: 44px; min-height: 44px; border-top: 1px solid #eee; border-left: 3px solid transparent; padding-left: 9px; }
.gml-file-row.is-active { background: #fcf1ee; border-left-color: var(--color-app); }
.gml-file-color { width: 16px; height: 22px; border-radius: 3px; }
.gml-file-name { border: 0; padding: 0; background: transparent; color: #30343a; font: inherit; line-height: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.gml-file-row.is-active .gml-file-name { font-weight: 600; }
.gml-file-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.2; }
.gml-file-origin { display: block; overflow: hidden; margin-top: 1px; color: #666; font-size: 12px; font-weight: 400; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.gml-file-row.is-hidden .gml-file-name { color: #878b90; }
.gml-file-type { text-align: center; padding: 3px 0; border-radius: 4px; background: #f0f0ef; color: #555; font-size: 11px; }
.gml-file-visibility { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 5px; background: transparent; cursor: pointer; }
.gml-file-visibility:hover { background: #eee; }
.gml-file-active { appearance: none; justify-self: center; width: 17px; height: 17px; margin: 0; border: 1px solid #a5a5a5; border-radius: 4px; background: #fff; cursor: pointer; }
.gml-file-active:checked { border-color: var(--color-app); background: var(--color-app); box-shadow: inset 0 0 0 3px #fff; }
.gml-file-text-toggle { justify-self: center; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #c5c5c5; font: 600 19px 'Open Sans', Arial, sans-serif; cursor: pointer; }
.gml-file-text-toggle[aria-pressed="true"] { color: var(--color-app); }
.gml-file-text-toggle:hover { background: #eeeeee80; }
.gml-file-text-toggle:focus-visible { outline: 2px solid var(--color-app); outline-offset: 2px; }
.gml-file-name:focus-visible, .gml-file-visibility:focus-visible, .gml-file-active:focus-visible { outline: 2px solid var(--color-app); outline-offset: 2px; }
#gml-file-panel, .gml-file-columns, .gml-file-name, .gml-file-type { color: #111; }
.gml-file-name, .gml-file-columns { font-weight: 600; }
.gml-file-row.is-hidden .gml-file-name { color: #444; }
#gml-file-toggle { display: grid; place-items: center; margin-left: auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #555; cursor: pointer; transition: background .2s, color .2s; }
#gml-file-toggle svg { display: block; transition: transform .2s ease; }
#gml-file-toggle[aria-expanded="false"] svg { transform: rotate(180deg); }
#gml-file-toggle:hover { background: #eee; color: #111; }
#gml-file-toggle:focus-visible { outline: 2px solid var(--color-app); outline-offset: 2px; }
#gml-file-content { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .3s ease, opacity .3s ease; }
#gml-file-content.is-collapsed { grid-template-rows: 0fr; opacity: 0; }
.gml-file-content-inner { min-height: 0; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { #gml-file-content { transition: none; } }
.gml-reference-label { background: transparent; border: 1px solid rgba(80,80,80,.14); border-radius: 6px; padding: 4px 7px; box-shadow: 0 2px 8px rgba(0,0,0,.12); color: #222; text-align: center; font-family: 'Open Sans', Arial, sans-serif; }
.gml-reference-label strong, .gml-reference-label span { display: block; }
.gml-reference-label strong { font-size: 14px; font-weight: 600; }
.gml-reference-label span { font-size: 13px; color: #000; font-weight: 600; }
.gml-reference-label::before { display: none; }
.gml-file-actions { display: flex; justify-content: flex-end; padding: 8px 12px; border-top: 1px solid #eee; }
#gml-file-cadastre { padding: 8px 12px 10px; border-top: 1px solid #eee; }
#gml-file-cadastre p { margin: 4px 0 0; overflow-wrap: anywhere; }
#gml-file-cadastre-reference { font-weight: 600; }
#gml-file-delete { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid #e3d1ce; border-radius: 5px; background: #fff; color: var(--color-app); font: inherit; font-size: 11px; cursor: pointer; }
#gml-file-delete:hover { background: #fcf1ee; }
#gml-file-delete:focus-visible { outline: 2px solid var(--color-app); outline-offset: 2px; }
#gml-file-delete:disabled { opacity: .5; cursor: default; }
#gml-file-panel { box-shadow: 0 4px 18px rgba(0,0,0,.1), 0 1px 4px rgba(0,0,0,.05); font-size: 14px; }
.gml-file-heading { font-size: 15px; }
#gml-file-count { font-size: 12px; }
.gml-file-columns { font-size: 11px; }
.gml-file-name { min-width: 0; }
.gml-file-type { font-size: 13px; }
#gml-file-delete { font-size: 12px; }
.gml-file-type[data-type="Pa"] { color: #1b5e20; background: #eaf2eb; font-weight: 600; }
.gml-file-type[data-type="Ed"] { color: #6e2c00; background: #f5ece5; font-weight: 600; }
.gml-file-type[data-type="OC"] { color: #1b54c8; background: #eaf0fc; font-weight: 600; }
#tool-sidebar { position: relative; flex: 0 0 0px; min-width: 0; height: 100%; overflow: hidden; background: #fff; transition: flex-basis .35s cubic-bezier(.22, 1, .36, 1); }
#tool-sidebar::after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 6px; background: linear-gradient(to right, rgba(0,0,0,.22), transparent); pointer-events: none; opacity: 0; transition: opacity .35s ease; }
#tool-sidebar.is-open::after { opacity: 1; transition-duration: .45s; }
#tool-sidebar.is-open { flex-basis: min(420px, 45vw); transition-duration: .45s; transition-timing-function: ease-out; }
#tool-sidebar > section { width: min(420px, 45vw); border-left: 1px solid #d9d9d9; }
#tool-sidebar[hidden] { display: none; }
.gml-coordinates-heading { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e6e6e6; }
.gml-coordinates-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
#nav_menu_inferior button[aria-pressed="true"] img { background: #f3d5cf; }
.gml-coordinates-heading #gml-information-close { margin-left: auto; border: 0; border-radius: 5px; background: transparent; color: #555; font-size: 24px; cursor: pointer; }
#gml-information-close:hover { background: #eee; }
#gml-information-close:focus-visible, #gml-information-content:focus-visible { outline: 2px solid var(--color-app); outline-offset: -2px; }
#gml-information-panel { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
#gml-information-panel[hidden] { display: none; }
#gml-information-file { margin: 0; padding: 10px 14px; background: #fcf1ee; overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
#gml-information-content { min-height: 0; overflow: auto; padding: 0 14px 14px; font-size: 13px; overflow-wrap: anywhere; }
#gml-information-content dl { margin: 0; padding: 14px 0; border-bottom: 1px solid #b8b8b8; }
#gml-information-content dt { margin-top: 10px; font-weight: 600; }
#gml-information-content dt:first-child { margin-top: 0; }
#gml-information-content dd { margin: 3px 0 0; line-height: 1.5; }
#gml-information-content .gml-cadastre-photos dl { border-bottom: 0; }
@media (max-width: 720px), (max-width: 1032px) and (orientation: portrait) { main { flex-direction: column; } #map-workspace { height: auto; min-height: 0; } #tool-sidebar { width: 100%; height: auto; min-height: 0; } #tool-sidebar.is-open { flex-basis: 55%; } #tool-sidebar > section { width: 100%; border-left: 0; border-top: 1px solid #d9d9d9; } }
#nav_menu_inferior button:disabled { opacity: .45; cursor: default; }
#nav_menu_inferior button:disabled:hover img { transform: none; }
#nav_menu_inferior #gml-export-v4 { border: 1px solid var(--color-app); background: #fffc; color: var(--color-app); font-size: 27px; font-weight: 700; line-height: 1; }
:is(#gml-export-dialog, #gml-export-question) { box-sizing: border-box; width: min(512px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 22px clamp(16px, 5vw, 29px) 25px; border: 0; border-radius: 5px; color: #545454; background: #fff; }
:is(#gml-export-dialog, #gml-export-question)::backdrop { background: rgba(0, 0, 0, .4); }
:is(#gml-export-dialog, #gml-export-question) h2 { margin: 0 0 14px; text-align: center; font-size: 30px; font-weight: 600; line-height: 1.15; }
#gml-export-question-text { margin: 0; font-size: 15px; line-height: 1.12; white-space: pre-line; overflow-wrap: anywhere; }
:is(#gml-export-dialog, #gml-export-question) .gml-export-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#gml-export-question .gml-export-actions { margin-top: 30px; }
:is(#gml-export-dialog, #gml-export-question) .gml-export-actions button { border: 0; border-radius: 4px; padding: 9px 18px; color: #fff; font: inherit; font-size: 16px; line-height: 1.15; cursor: pointer; }
#gml-export-question button[value="accept"], #gml-export-form button[type="submit"] { background: #013adf; }
#gml-export-question button[value="deny"], #gml-export-cancel { background: #c0392b; }
#gml-export-question button[value=""] { background: #626262; }
#gml-export-question.has-surface-choice button[value=""] { margin-inline-start: auto; }
#gml-export-question.has-surface-choice #gml-export-question-text { padding: 14px 16px; border-radius: 6px; background: #f5f7fb; line-height: 1.45; }
#gml-export-question.has-surface-choice #gml-export-question-text strong { color: #243552; font-variant-numeric: tabular-nums; }
#gml-export-question.has-surface-choice .gml-export-actions { flex-wrap: nowrap; gap: clamp(4px, 1.5vw, 10px); }
#gml-export-question.has-surface-choice .gml-export-actions button { padding-inline: clamp(4px, 2vw, 18px); font-size: clamp(12px, 3.5vw, 16px); white-space: nowrap; }
:is(#gml-export-dialog, #gml-export-question) .gml-export-actions button:focus-visible { outline: 3px solid #adc8e2; }
#gml-export-dialog { border-radius: 10px; box-shadow: 0 16px 48px #17202736; }
#gml-export-dialog h2 { margin-bottom: 20px; color: #243552; }
#gml-export-form { display: grid; gap: 14px; font-size: 15px; }
#gml-export-form label:not([hidden]) { display: grid; gap: 6px; color: #243552; font-weight: 600; }
#gml-export-id-help { padding: 8px 10px; border-radius: 5px; background: #f5f7fb; color: #545454; font-size: 12px; font-weight: 400; line-height: 1.45; }
#gml-export-filename-help { color: #545454; font-size: 12px; font-weight: 400; }
#gml-export-form :is(input, select) { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid #b9c2cf; border-radius: 6px; padding: 9px 10px; background: #fff; color: #333; font: inherit; font-weight: 400; }
#gml-export-form :is(input, select):focus-visible { outline: 2px solid #013adf; outline-offset: 2px; }
#gml-export-form .gml-export-balance { padding-top: 12px; border-top: 1px solid #e2e6ee; font-size: 13px; }
#gml-export-account { margin: 0; padding: 10px 12px; border-radius: 6px; background: #f5f7fb; font-size: 13px; }
#gml-export-account div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
#gml-export-account div + div { margin-top: 6px; }
#gml-export-account dd { margin: 0; color: #243552; font-weight: 600; overflow-wrap: anywhere; }
#gml-export-account-status { font-size: 13px; }
#gml-export-form .gml-export-actions { margin-top: 9px; }
#gml-export-form .gml-export-actions button:disabled { opacity: .5; cursor: default; }
#gml-export-form p { margin: 0; }
#gml-export-error { color: #a12620; }
#cabecera .user-status { display: inline-flex; align-items: center; gap: 4px; }
#cabecera .user-status img { display: block; }
@media (max-width: 760px) { #cabecera { justify-content: safe flex-end; } }
