:root {
  --brand: #00677f;
  --brand-dark: #00536a;
  --brand-light: #2e97ae;
  --gold: #d4a843;
  --gold-light: #faf3e0;
  --surface: #ffffff;
  --surface-alt: #f7fafa;
  --surface-warm: #eef5f6;
  --border: #d4e4e7;
  --border-light: #e8f0f2;
  --text: #1a2b30;
  --text-secondary: #4d6269;
  --text-muted: #5e7580;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 32px rgba(0, 50, 65, 0.06);
  --shadow-elevated: 0 16px 48px rgba(0, 50, 65, 0.10);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  margin: 0;
  padding-top: 88px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.modal-open-no-scroll {
  overflow: hidden;
  height: 100vh;
}

[ng-cloak],
.ng-cloak {
  display: none !important;
}

.site-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #f6fbfc 0%, #eef6f8 55%, #e7f1f4 100%);
}

.site-loading-card {
  width: min(92vw, 460px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 103, 127, 0.16);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 78, 96, 0.16);
  text-align: center;
  padding: 28px 24px;
}

.site-loading-logo {
  width: min(280px, 72%);
  height: auto;
  margin-bottom: 10px;
}

.site-loading-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #004d62;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

.site-loading-subtitle {
  font-size: 0.9rem;
  color: #476570;
  margin-bottom: 18px;
}

.site-loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(0, 103, 127, 0.2);
  border-top-color: #00677f;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

.site-ready--hidden {
  visibility: hidden;
}

.participar-route-page {
  padding-top: 4px;
}

/* ── Participar: Hero institucional ── */

.participar-hero {
  text-align: center;
  padding: 28px 16px 24px;
  margin-bottom: 20px;
}

.participar-hero-badge {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.participar-hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}

.participar-hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 14px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.participar-hero-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.84rem;
}

.participar-hero-status {
  color: #2e7d32;
  font-weight: 600;
}

.participar-hero-period {
  color: var(--text-muted);
}

/* ── Wizard: Review step ── */

.wizard-review {
  padding: 4px 0;
}

.wizard-review-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}

.wizard-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 575px) {
  .wizard-review-grid {
    grid-template-columns: 1fr;
  }
}

.wizard-review-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wizard-review-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.wizard-review-text {
  padding: 10px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.wizard-review-text p {
  margin: 6px 0 0;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wizard-review .pdf-preview-section {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
}

.wizard-review .pdf-preview-section h4 {
  margin-bottom: 8px;
}

.wizard-review .pdf-preview-section .info-row-value,
.wizard-review .pdf-preview-section td,
.wizard-review .pdf-preview-section th {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.choice-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.choice-chip input[type="radio"] {
  margin: 0;
  accent-color: var(--brand);
}

.choice-chip:has(input:checked) {
  border-color: var(--brand);
  background: rgba(0, 103, 127, 0.08);
}

.participation-type-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
}

.location-method-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
}

.participation-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 170px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  text-align: center;
}

.location-method-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 150px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  text-align: center;
}

.participation-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.location-method-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.participation-type-icon {
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 103, 127, 0.12), rgba(46, 151, 174, 0.2));
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(0, 103, 127, 0.15);
}

.location-method-icon {
  width: 50px;
  min-width: 50px;
  height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 103, 127, 0.12), rgba(46, 151, 174, 0.2));
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(0, 103, 127, 0.15);
}

.participation-type-icon i {
  font-size: 1.5rem;
  line-height: 1;
}

.location-method-icon i {
  font-size: 1.45rem;
  line-height: 1;
}

.participation-type-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.location-method-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.participation-type-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.location-method-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.participation-type-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.location-method-desc {
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.participation-type-card:has(input:checked) {
  border-color: var(--brand);
  background: rgba(0, 103, 127, 0.06);
  box-shadow: 0 0 0 2px rgba(0, 103, 127, 0.12);
}

.location-method-card:has(input:checked) {
  border-color: var(--brand);
  background: rgba(0, 103, 127, 0.06);
  box-shadow: 0 0 0 2px rgba(0, 103, 127, 0.12);
}

@media (max-width: 991px) {
  .participation-type-list {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .participation-type-card {
    min-height: 0;
    flex-direction: row;
    text-align: left;
  }

  .participation-type-content {
    align-items: flex-start;
  }

  .location-method-list {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .location-method-card {
    min-height: 0;
    flex-direction: row;
    text-align: left;
  }

  .location-method-content {
    align-items: flex-start;
  }
}

/* ── Wizard: stepper ── */

.wizard-stepper--4 {
  width: 100%;
}

.wizard-step-label {
  display: block;
}

@media (max-width: 575px) {
  .wizard-step-label {
    display: block;
  }
}

/* ── Wizard: Formal confirmation ── */

.wizard-confirm-formal {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.wizard-confirm-icon {
  font-size: 2.8rem;
  color: #2e7d32;
  margin-bottom: 10px;
}

.wizard-confirm-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
}

.wizard-confirm-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.wizard-confirm-id {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-warm);
  border: 2px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  margin-bottom: 16px;
}

.wizard-confirm-id-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.wizard-confirm-id-value {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.08em;
}

.wizard-confirm-note {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* ── Map panel modes ── */

.participar-map-panel--draw .participar-map-viewport {
  height: 72vh;
  min-height: 520px;
}

.participar-map-panel--draw {
  border-color: var(--gold);
}

.participar-split {
  display: block;
}

.participar-map-panel {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  margin-top: 16px;
}

.participar-map-viewport {
  height: 72vh;
  min-height: 520px;
  border-radius: 12px;
  overflow: hidden;
  touch-action: pan-y;
}

.participar-route-page .participar-map-viewport #map,
.participar-route-page .participar-map-viewport #map .ol-viewport {
  touch-action: pan-y pinch-zoom !important;
}

.participar-route-page .participar-map-viewport.participar-map-viewport--gesture-active #map,
.participar-route-page .participar-map-viewport.participar-map-viewport--gesture-active #map .ol-viewport {
  touch-action: none !important;
}

.participar-map-viewport--review {
  height: 42vh;
  min-height: 280px;
  pointer-events: none;
}

@media (max-width: 991px) {
  .participar-map-panel {
    position: static;
  }
  .participar-map-viewport {
    height: 58vh;
    min-height: 380px;
  }
}

img {
  max-width: 100%;
  height: auto;
}

/* ─── Topbar (estilo cm-barcelos.pt) ─── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Main bar: brand + primary nav */
.topbar-main {
  background: var(--brand);
  height: 56px;
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 32px;
}

.topbar-crest {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.topbar-brand-sep {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 12px;
  flex-shrink: 0;
}

.topbar-brand-text {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.topbar-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 148px;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.12;
  padding: 6px 10px;
  letter-spacing: 0.055em;
  text-align: center;
  text-transform: uppercase;
  transition: all var(--transition);
  white-space: normal;
  overflow-wrap: anywhere;
  position: relative;
}

.topbar-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.topbar-link.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.topbar-link.active::after {
  transform: scaleX(1);
}

.topbar-link--participar {
  margin-left: 4px;
  background: var(--gold);
  color: #17313a;
  border-radius: 10px;
  max-width: 128px;
  min-height: 38px;
  font-weight: 900;
}

.topbar-link--participar:hover,
.topbar-link--participar.active {
  background: #f0c86a;
  color: #17313a;
}

.topbar-link--participar::after {
  display: none;
}

.topbar-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.topbar-link:hover::after {
  transform: scaleX(1);
}

/* Secondary bar: utilities */
.topbar-secondary {
  background: #003d4d;
  height: 32px;
}

.topbar-secondary .topbar-inner {
  justify-content: space-between;
}

.topbar-util-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-util-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.73rem;
  font-weight: 400;
  padding: 4px 10px;
  transition: color var(--transition);
}

.topbar-util-link:hover {
  color: #fff;
}

.topbar-util-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-a11y-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all var(--transition);
}

.topbar-a11y-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Language notice */
.lang-notice {
  background: #fff3cd;
  color: #856404;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  text-align: center;
  border: 1px solid #ffeeba;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-right: 6px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.04em;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Mode toggle */
.mode-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mode-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  cursor: pointer;
  transition: all var(--transition);
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.mode-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--gold);
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

/* Hamburger (mobile) */
.topbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.topbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* ─── Buttons (Global) ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 44px;
  line-height: 1.2;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.84rem;
  min-height: 36px;
  border-radius: 8px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 103, 127, 0.22);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--surface-alt);
  border-color: #d5cbb5;
  color: var(--text);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-success {
  background: #1a7a3a;
  color: #fff;
  border-color: #1a7a3a;
}

.btn-success:hover {
  background: #156832;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Section Layout ─── */

.section {
  padding: 72px 0;
}

/* Override da página /participar para evitar scroll inicial */
.section.participar-route-page {
  padding-top: 4px;
}

.section--alt {
  background: var(--surface-alt);
}

.section--warm {
  background: var(--surface-warm);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-header--left {
  text-align: left;
  margin: 0 0 36px;
  max-width: none;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #1f1a1a;
  margin: 0 0 12px;
  line-height: 1.25;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.section-subtitle--extra {
  margin-top: 14px;
}

/* ─── Feature Cards ─── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card:hover {
  border-color: #d8c89a;
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 103, 127, 0.08);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2f2525;
  margin: 0;
  line-height: 1.35;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.feature-card a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: color var(--transition);
}

.feature-card a:hover {
  color: var(--brand-dark);
}

/* ─── Map Section ─── */

.map-controls-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

#map {
  width: 100%;
  height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f0ede6;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

#map .ol-attribution,
#map .ol-rotate {
  display: none !important;
}

#map .ol-zoom {
  top: 10px;
  left: 10px;
}

#map .ol-zoom button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.map-sidebar-card.active {
  border-color: var(--gold);
  box-shadow: var(--shadow-elevated);
}

.map-sidebar-card .card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  font-size: 0.88rem;
  color: #3b2e2e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.map-sidebar-card .card-inner {
  padding: 16px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.map-popup {
  min-width: 220px;
  max-width: 300px;
  pointer-events: none;
  box-shadow: var(--shadow-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 14px 16px;
}

.map-popup-title {
  color: #3b2c2c;
  font-weight: 700;
  font-size: 0.92rem;
}

.map-popup-subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.map-popup-feedback {
  color: var(--brand);
  font-size: 0.8rem;
  margin-top: 8px;
  font-weight: 600;
}

/* ─── Wizard / Participation ─── */

.wizard-stepper {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
}

.wizard-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.wizard-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--border);
  margin-bottom: 6px;
  transition: color var(--transition);
}

.wizard-step-label {
  display: block;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.wizard-step.active {
  border-color: var(--gold);
  background: var(--gold-light);
  color: #4b3b22;
}

.wizard-step.active .wizard-step-number {
  color: var(--brand);
  border-color: rgba(0, 103, 127, 0.35);
  background: rgba(0, 103, 127, 0.08);
}

.wizard-step.done {
  border-color: #b8dfc5;
  background: #f0faf3;
  color: #2d6a40;
}

.wizard-step.done .wizard-step-number {
  color: #2d6a40;
  border-color: #b8dfc5;
  background: #ffffff;
}

.wizard-step--clickable {
  cursor: pointer;
}

.wizard-step--clickable:hover {
  border-color: rgba(0, 103, 127, 0.5);
  background: rgba(0, 103, 127, 0.05);
}

.progress-track {
  height: 6px;
  border-radius: 100px;
  background: var(--border-light);
  margin-bottom: 24px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--gold) 100%);
  transition: width 0.4s ease;
}

.wizard-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 103, 127, .25);
  background: rgba(0, 103, 127, .08);
  color: #00536a;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.cmd-soon-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: .86rem;
  text-decoration: underline;
  padding: 0;
  margin-top: .25rem;
}

.cmd-soon-link:hover {
  color: #00536a;
}

.form-control:focus-visible,
.form-select:focus-visible,
.btn:focus-visible,
.choice-chip:focus-within,
.topbar-link:focus-visible,
.cmd-soon-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.cmd-info-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 31, 36, 0.4);
  z-index: 1200;
}

.cmd-info-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(16, 45, 54, 0.28);
  padding: 20px;
  z-index: 1201;
}

.cmd-info-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
}

.cmd-info-text {
  margin: 0 0 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.wizard-confirm {
  background: #f0faf3;
  border: 1px solid #bfe0ca;
  color: #1e5a30;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.wizard-confirm strong {
  color: #155724;
  font-size: 1.1rem;
}

/* ─── Form Controls ─── */

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #3a3535;
  margin-bottom: 5px;
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(0, 103, 127, 0.15);
  outline: none;
}

/* ─── FAQ ─── */

.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 10px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-list details[open] {
  border-color: var(--gold);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 18px;
  color: #2f2525;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-list details[open] summary::after {
  content: '\2212';
  color: var(--brand);
}

.faq-list .faq-answer {
  padding: 0 18px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ─── Timeline / Sessions ─── */

.timeline-grid {
  display: grid;
  gap: 12px;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  border-left-color: var(--gold);
  box-shadow: var(--shadow-card);
}

.timeline-card strong {
  font-size: 0.95rem;
  color: #2f2525;
}

.timeline-card .meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ─── Document Tag ─── */

.doc-tag {
  display: inline-block;
  text-transform: capitalize;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--gold-light);
  color: var(--brand-dark);
  border-radius: 100px;
  padding: 3px 10px;
  letter-spacing: 0.02em;
}

/* ─── Footer ─── */

.site-footer {
  background: #0b2e38;
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 32px;
  font-size: 0.85rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color var(--transition);
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-brand img {
  height: 32px;
  opacity: 0.9;
}

.footer-brand span {
  font-weight: 600;
  color: #fff;
}

.footer-separator {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 24px 0;
}

.footer-bottom {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ─── Dev Banner ─── */

.dev-banner {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: #003d4d;
  color: #fff;
  text-align: center;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ─── Guide Modal ─── */

.guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 14, 0.5);
  display: grid;
  place-items: center;
  z-index: 3000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.guide-dialog {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevated);
  padding: 28px;
  animation: slideUp 0.25s ease-out;
}

.guide-dialog h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 16px;
}

.guide-dialog ol {
  margin: 0 0 20px;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ─── Inline Spinner ─── */

.inline-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

.inline-spinner.dark {
  border-color: rgba(60, 45, 25, 0.3);
  border-right-color: transparent;
}

/* ─── Empty State ─── */

.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Animations ─── */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Accessibility ─── */

body.a11y-high-contrast {
  background: #fff !important;
  color: #000 !important;
}

body.a11y-high-contrast .hero-section,
body.a11y-high-contrast .feature-card,
body.a11y-high-contrast .map-sidebar-card,
body.a11y-high-contrast .timeline-card,
body.a11y-high-contrast .wizard-panel {
  background: #fff !important;
  border-color: #000 !important;
  box-shadow: none !important;
}

body.a11y-high-contrast .municipio-strip,
body.a11y-high-contrast .service-ribbon,
body.a11y-high-contrast .site-footer {
  background: #000 !important;
}

body.a11y-high-contrast a,
body.a11y-high-contrast .hero-eyebrow,
body.a11y-high-contrast .section-eyebrow,
body.a11y-high-contrast .feature-icon {
  color: #0000ee !important;
}

body.a11y-large-text {
  font-size: 18px;
}

/* ─── P3: Welcome Panel ─── */

.welcome-backdrop {
  position: absolute;
  inset: 0;
  z-index: 500;
  background:
    radial-gradient(circle at 22% 18%, rgba(212, 168, 67, 0.28), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(0, 103, 127, 0.3), transparent 34%),
    rgba(0, 24, 34, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
  backdrop-filter: blur(5px);
}

.welcome-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 250, 0.96)), var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 23, 33, 0.34);
  padding: 34px;
  max-width: 680px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.welcome-panel::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(0, 103, 127, 0.08);
  border-radius: 22px;
  pointer-events: none;
}

.welcome-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.welcome-brand img {
  width: min(300px, 74%);
  height: auto;
}

.welcome-brand span {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.welcome-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

.welcome-close:hover {
  background: #fdf0f0;
  color: #b22;
}

.welcome-title {
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.welcome-lead {
  max-width: 560px;
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 auto 20px;
  line-height: 1.65;
}

.welcome-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
}

.welcome-feature-grid article {
  padding: 14px 12px;
  background: rgba(0, 103, 127, 0.055);
  border: 1px solid rgba(0, 103, 127, 0.12);
  border-radius: 14px;
  text-align: left;
}

.welcome-feature-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-dark);
  font-size: 0.84rem;
}

.welcome-feature-grid span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.42;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.welcome-actions .btn {
  font-size: 0.88rem;
  padding: 10px 16px;
  min-height: 40px;
}

.map-onboarding-backdrop {
  position: absolute;
  inset: 0;
  z-index: 510;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 28, 36, 0.34);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.22s ease-out;
}

.map-onboarding-card {
  width: min(92vw, 560px);
  max-height: calc(100% - 32px);
  overflow: visible;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(0, 103, 127, 0.16);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 40, 60, 0.24);
  padding: 24px;
  position: relative;
}

.map-onboarding-eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(0, 103, 127, 0.08);
  color: var(--brand-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.map-onboarding-card h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.34rem;
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.map-onboarding-lead {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.55;
}

.map-onboarding-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.map-onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--surface-alt);
}

.map-onboarding-step.done {
  background: #eef8f1;
  border-color: #bfe1ca;
}

.map-onboarding-step-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--brand);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.map-onboarding-step.done .map-onboarding-step-number {
  background: #2d7d46;
}

.map-onboarding-step strong {
  display: block;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.25;
}

.map-onboarding-step span:not(.map-onboarding-step-number) {
  display: block;
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.35;
  margin-top: 2px;
}

.map-onboarding-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

.map-onboarding-actions--piece-only {
  grid-template-columns: 1fr;
}

.map-onboarding-actions > .btn {
  min-height: 38px;
}

.map-onboarding-plan,
.map-onboarding-location,
.map-onboarding-search {
  min-width: 0;
  position: relative;
}

.map-onboarding-plan label,
.map-onboarding-location label,
.map-onboarding-search label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-onboarding-search {
  grid-column: 1 / -1;
}

.map-onboarding-start {
  width: 100%;
  margin-top: 12px;
}

.map-onboarding-results {
  z-index: 530;
}

.map-onboarding-note {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* ─── P1: Map Hint ─── */

.map-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: rgba(0, 40, 50, 0.75);
  color: #fff;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
  animation: fadeIn 0.5s ease-out;
}

/* ─── P3: CTA Flutuante ─── */

.cta-float {
  position: absolute;
  bottom: 100px;
  right: 16px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(0, 103, 127, 0.35);
  transition: all var(--transition);
}

.cta-float:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 103, 127, 0.45);
}

.cta-float-icon {
  font-size: 1rem;
}

/* ─── P5: Steps Row ─── */

.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  flex: 1;
  text-align: center;
  padding: 0 20px;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 24px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.text-center {
  text-align: center;
}

/* ─── Responsive ─── */

@media (max-width: 991px) {
  .section {
    padding: 52px 0;
  }
}

@media (max-width: 767px) {
  .btn, .btn-sm, .btn-action, button[type="submit"],
  .wizard-nav-btn, .step-indicator-item,
  .map-tool-btn, .layer-toggle-btn, .map-expand-toggle {
    min-height: 44px;
    min-width: 44px;
  }

  .section {
    padding: 48px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .wizard-stepper {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .wizard-step {
    flex: 0 0 130px;
  }

  .map-controls-panel {
    padding: 14px;
  }

  .wizard-panel {
    padding: 20px 16px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .timeline-grid {
    gap: 16px;
  }

  /* Topbar responsive */
  .topbar-secondary {
    display: none;
  }

  .topbar-main {
    height: 48px;
  }

  body {
    padding-top: 48px;
  }

  .viewer-layout {
    height: calc(100vh - 48px);
    min-height: 360px;
  }

  .topbar-brand-text {
    display: none;
  }

  .topbar-brand-sep {
    display: none;
  }

  .topbar-crest {
    height: 28px;
  }

  .topbar-nav {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: var(--brand);
    flex-direction: column;
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  }

  .topbar-nav.open {
    display: flex;
  }

  .topbar-link {
    padding: 12px 24px;
    font-size: 0.9rem;
    max-width: none;
    min-height: auto;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
  }

  .topbar-hamburger {
    display: flex;
  }

  .welcome-backdrop {
    align-items: flex-end;
  }

  .welcome-panel {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    text-align: left;
  }

  .map-search-float {
    top: 10px;
    width: calc(100% - 84px);
    max-width: none;
    left: 42px;
    transform: none;
    z-index: 22;
  }

  .map-search-input {
    padding: 8px 12px 8px 34px;
    min-height: 36px;
    border-radius: 10px;
    font-size: 0.82rem;
  }

  .map-search-icon {
    left: 10px;
    font-size: 0.85rem;
  }

  .map-toolbar {
    right: 10px;
    bottom: 12px;
    z-index: 30;
  }

  .extract-actions-float {
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 31;
  }

  .extract-actions-float .btn {
    width: 100%;
  }

  .cta-float {
    bottom: 14px;
    left: 12px;
    right: auto;
    padding: 8px 14px;
    font-size: 0.8rem;
    z-index: 35;
  }

  /* P7: Map hint */
  .map-hint {
    bottom: 64px;
    left: 12px;
    right: 12px;
    transform: none;
    font-size: 0.72rem;
    white-space: normal;
    text-align: center;
  }

  /* P5: Steps stack on mobile */
  .steps-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .step-connector {
    width: 2px;
    height: 24px;
    margin: 0;
  }
}

/* ═══════════════════════════════════════════
   GIS VIEWER — Map Section
   ═══════════════════════════════════════════ */

.viewer-section {
  position: relative;
  background: #edf2f4;
}

.viewer-section--home {
  background: linear-gradient(180deg, #eef5f6 0%, #ffffff 100%);
}

.map-intro-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-light);
}

.map-intro-cta__content {
  min-width: 0;
}

.map-intro-cta__eyebrow {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.map-intro-cta__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.map-intro-cta__subtitle {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.map-intro-cta__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-hero-cta {
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 20px;
  box-shadow: none;
}

.map-intro-cta__soft-btn {
  min-height: 38px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 103, 127, 0.24);
  color: var(--brand-dark);
}

.map-intro-cta__soft-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-dark);
  border-color: rgba(0, 103, 127, 0.34);
}

.viewer-layout {
  display: flex;
  height: calc(100vh - 88px);
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

.viewer-section--home .viewer-layout {
  height: min(62vh, 620px);
  min-height: 440px;
  margin: 0;
  border-bottom: 1px solid var(--border-light);
}

.viewer-section--home .map-viewport {
  cursor: pointer;
}

.viewer-section--home #map {
  pointer-events: none;
}

.home-map-callout {
  position: absolute;
  left: 28px;
  top: 28px;
  z-index: 22;
  width: min(430px, calc(100% - 56px));
  padding: 22px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 103, 127, 0.16);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0, 36, 48, 0.18);
  cursor: default;
}

.home-map-callout__eyebrow {
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-map-callout h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.12;
  color: var(--text);
}

.home-map-callout p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.home-map-callout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-expand-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 24;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.map-expand-toggle:hover {
  background: #fff;
  border-color: var(--brand);
}

/* ── Layer Sidebar ── */

.layer-panel {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(560px, 100vw);
  height: 100vh;
  background: var(--surface);
  border: 1px solid rgba(0, 103, 127, 0.16);
  border-left: 0;
  border-radius: 0;
  box-shadow: 18px 0 54px rgba(0, 21, 32, 0.22);
  display: flex;
  flex-direction: column;
  z-index: 1200;
  overflow: hidden;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

.layer-panel.collapsed {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.layer-panel-head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.layer-panel-head h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: #2f2525;
  line-height: 1.25;
}

.layer-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.layer-toggle-btn:hover {
  background: var(--surface-alt);
}

.layer-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 18px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.layer-panel-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  background: rgba(247, 250, 250, 0.96);
}

.layer-panel-footer-settings {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 8px 10px;
  text-transform: uppercase;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.layer-panel-footer-settings:hover {
  background: var(--surface-alt);
  border-color: rgba(0, 103, 127, 0.24);
  color: var(--brand-dark);
}

.layer-basemap-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.layer-basemap-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  padding: 7px 10px;
  transition: background var(--transition), color var(--transition);
}

.layer-basemap-btn:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.layer-basemap-btn.active {
  color: #fff;
  background: var(--brand);
}

.layer-group {
  border-bottom: 1px solid var(--border-light);
}

.layer-group:last-child {
  border-bottom: none;
}

.layer-group-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.84rem;
  color: #3b3535;
  transition: background var(--transition);
  user-select: none;
}

.layer-group-header:hover {
  background: var(--surface-alt);
}

.layer-group-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 103, 127, 0.07);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.layer-group-chevron {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.layer-group.open .layer-group-chevron {
  transform: rotate(90deg);
}

.layer-group-body {
  padding: 0 16px 8px;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  min-height: 40px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.layer-item:hover {
  color: var(--text);
}

.layer-item-locked {
  opacity: 0.95;
}

.layer-item-locked .layer-check {
  cursor: not-allowed;
}

.layer-check {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}

.layer-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.layer-panel-controls {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.layer-panel-controls label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: block;
}

/* ── Map Viewport ── */

.map-viewport {
  flex: 1;
  position: relative;
  min-width: 0;
}

.map-viewport #map {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* ── Map Action Bar ── */

.map-action-bar {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 28;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 0;
  border-bottom: 1px solid rgba(30, 45, 52, 0.16);
  border-radius: 0 0 12px 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(0, 24, 36, 0.12);
}

.map-active-piece {
  flex: 0 0 min(300px, 26vw);
  min-width: 230px;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(0, 103, 127, 0.18);
  border-radius: 10px;
  background: rgba(0, 103, 127, 0.06);
}

.map-active-piece--empty {
  background: rgba(212, 168, 67, 0.12);
  border-color: rgba(212, 168, 67, 0.28);
}

.map-active-piece__text {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.map-active-piece__text span {
  color: var(--brand);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-active-piece__text strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-active-piece__btn {
  flex: 0 0 auto;
}

.map-action-search {
  position: relative;
  flex: 1 1 340px;
  min-width: 220px;
}

.map-search-input {
  width: 100%;
  min-height: 28px;
  padding: 5px 10px 5px 30px;
  border: 1px solid rgba(30, 45, 52, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  font-size: 0.76rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.map-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(0, 103, 127, 0.12);
}

.map-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.78rem;
  pointer-events: none;
}

.map-action-select {
  flex: 0 0 220px;
  min-height: 28px;
  border: 1px solid rgba(30, 45, 52, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 26px 4px 9px;
}

.map-action-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  overflow: visible;
}

.map-action-btn {
  min-height: 28px;
  border: 1px solid rgba(30, 45, 52, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.map-action-btn:hover {
  background: var(--surface-alt);
  border-color: rgba(0, 103, 127, 0.28);
  color: var(--brand-dark);
}

.map-action-btn--draw {
  background: var(--brand);
  border-color: rgba(0, 83, 106, 0.4);
  color: #fff;
}

.map-action-btn--draw:hover {
  background: var(--brand-dark);
  color: #fff;
}

.map-action-btn--icon {
  min-width: 28px;
  padding-left: 0;
  padding-right: 0;
  font-size: 0.86rem;
}

.map-options-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 6px;
  z-index: 32;
  width: 230px;
  padding: 8px;
  border: 1px solid rgba(30, 45, 52, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 36px rgba(0, 24, 36, 0.18);
}

.map-options-title {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-options-popover button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: block;
  font-size: 0.76rem;
  font-weight: 750;
  padding: 8px 9px;
  text-align: left;
}

.map-options-popover button:hover {
  background: rgba(0, 103, 127, 0.07);
  color: var(--brand-dark);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
  max-height: 260px;
  overflow-y: auto;
  z-index: 21;
}

.search-result-item {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-no-results {
  padding: 14px 16px;
  font-size: 0.85rem;
  color: #6b7d91;
  text-align: center;
}

.search-result-item:hover {
  background: var(--surface-alt);
}

.search-result-item small {
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

/* ── Map Toolbar ── */

.map-toolbar {
  position: absolute;
  bottom: 20px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 15;
}

.extract-actions-float {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 28;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(0, 103, 127, 0.14);
}

.map-draw-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 18;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.map-draw-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.map-draw-btn:hover {
  background: #fff;
  border-color: var(--brand);
}

.map-tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  transition: all var(--transition);
}

.map-tool-btn--text {
  font-size: 0.68rem;
  font-weight: 800;
}

.map-tool-btn:hover {
  background: var(--surface-alt);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.map-tool-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.map-tool-btn--extract {
  background: var(--brand);
  color: #fff;
  border-color: rgba(0, 83, 106, 0.4);
}

.map-tool-btn--extract:hover {
  background: var(--brand-dark);
  color: #fff;
}

.layer-panel-toggle {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 20;
}

.layer-panel-toggle--text {
  width: auto;
  min-width: 74px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.layer-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 26, 35, 0.18);
  backdrop-filter: blur(1px);
  z-index: 1040;
}

.info-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(2px);
  z-index: 10;
}

/* ── Info Panel (right) ── */

.info-panel {
  width: 360px;
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 10;
  transition: margin-right 0.3s ease;
  overflow: hidden;
}

.info-panel.hidden {
  margin-right: -360px;
}

.info-panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.info-panel-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #2f2525;
  line-height: 1.3;
}

.info-panel-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}

.info-panel-close:hover {
  background: #fdf0f0;
  color: #b22;
}

.info-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.info-tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.info-tab:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.info-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.info-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  gap: 10px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row-label {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 100px;
}

.info-row-value {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.info-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 103, 127, 0.08);
  color: var(--brand);
}

.info-row-hero {
  padding: 12px 0 10px;
  border-bottom: 2px solid var(--brand);
}

.info-classif-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.01em;
}

.info-interpretacao {
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(0, 103, 127, 0.04);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
}

.info-interpretacao-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 6px;
}

.info-interpretacao-text {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.mode-indicator-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 103, 127, 0.1);
  color: var(--brand);
  border-radius: 4px;
}

.info-panel-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

/* ── Info-panel: Pergunta Direta ── */

.info-question-block {
  background: linear-gradient(135deg, #f0faf8 0%, #e8f5f2 100%);
  border: 1px solid rgba(0, 103, 127, 0.18);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.info-question-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 4px;
}

.info-question-answer {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.info-question-block--yes {
  background: linear-gradient(135deg, #e7f9f4 0%, #d8f3ea 100%);
  border-color: rgba(0, 204, 153, 0.45);
}

.info-question-block--yes .info-question-label {
  color: #009b75;
}

.info-question-block--yes .info-question-answer {
  color: #006b55;
}

.info-question-block--no {
  background: linear-gradient(135deg, #fff1f1 0%, #ffe3e3 100%);
  border-color: rgba(198, 40, 40, 0.35);
}

.info-question-block--no .info-question-label {
  color: #b42318;
}

.info-question-block--no .info-question-answer {
  color: #8f1d18;
}

.info-question-block--consult {
  background: linear-gradient(135deg, rgba(0, 103, 127, 0.12) 0%, rgba(46, 151, 174, 0.18) 100%);
  border-color: rgba(0, 103, 127, 0.28);
}

.info-question-block--consult .info-question-label {
  color: var(--brand);
}

/* ── Participar CTA Button ── */

.btn-participar {
  background: var(--brand);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-participar:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 103, 127, 0.3);
}

.btn-share {
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ── Docs: Icons & Badges ── */

.docs-count {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.doc-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.badge-new {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.docs-group {
  margin-top: 10px;
}

.docs-group-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.doc-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.doc-meta-text {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.doc-open-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

/* ── Sessions: Badges ── */

.badge-next {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.timeline-card--past {
  opacity: 0.65;
}

.timeline-card--next {
  border-left: 3px solid var(--brand);
}

.session-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.session-date-badge {
  background: rgba(0, 103, 127, 0.08);
  border: 1px solid rgba(0, 103, 127, 0.2);
  border-radius: 10px;
  padding: 6px 10px;
}

.session-date-main {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--text);
}

.session-time-main {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand);
}

.session-type-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0, 103, 127, 0.1);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 4px 10px;
}

.session-type-badge--online {
  background: rgba(0, 103, 127, 0.14);
  color: #005d73;
}

.session-type-badge--presencial {
  background: rgba(212, 168, 67, 0.2);
  color: #6a4a00;
}

.session-location-line {
  margin-top: 6px;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.session-address-line {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.session-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── FAQ: Contact link ── */

.faq-contact {
  text-align: center;
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-warm);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.faq-contact a {
  color: var(--brand);
  font-weight: 600;
}

/* ── PDF Preview Modal ── */

.pdf-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 14, 0.55);
  display: grid;
  place-items: center;
  z-index: 4000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.pdf-preview-dialog {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  animation: slideUp 0.25s ease-out;
}

.pdf-preview-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdf-preview-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.pdf-preview-body {
  padding: 24px;
}

.pdf-preview-section {
  margin-bottom: 16px;
}

.pdf-preview-section h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.pdf-preview-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.attachment-preview-dialog {
  max-width: 860px;
}

.attachment-preview-body {
  padding-top: 14px;
}

.attachment-preview-image {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
}

.attachment-preview-frame {
  display: block;
  width: 100%;
  height: 68vh;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
}

/* ── Loading overlay for map ── */

.map-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  display: grid;
  place-items: center;
  z-index: 25;
  animation: fadeIn 0.15s ease-out;
}

.map-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Viewer Responsive ── */

@media (max-width: 1100px) {
  .map-action-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .map-action-search {
    flex-basis: calc(100% - 240px);
  }

  .map-active-piece {
    flex: 1 1 100%;
    min-width: 0;
  }

  .map-action-buttons {
    flex-basis: 100%;
  }

  .layer-panel {
    width: min(560px, 100vw);
  }
  .layer-panel.collapsed {
    margin-left: 0;
    transform: translateX(-100%);
  }
  .info-panel {
    width: 300px;
  }
  .info-panel.hidden {
    margin-right: -300px;
  }
}

@media (max-width: 767px) {
  .map-onboarding-backdrop {
    padding: 14px;
    align-items: flex-end;
  }

  .map-onboarding-card {
    width: 100%;
    max-height: calc(100% - 16px);
    overflow-y: auto;
    border-radius: 20px;
    padding: 18px;
  }

  .map-onboarding-card h2 {
    font-size: 1.12rem;
  }

  .map-onboarding-lead {
    font-size: 0.88rem;
  }

  .map-onboarding-steps,
  .map-onboarding-actions {
    grid-template-columns: 1fr;
  }

  .map-onboarding-search {
    grid-column: auto;
  }

  .map-intro-cta {
    padding: 8px 12px;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
  }

  .map-intro-cta__title {
    font-size: 0.96rem;
  }

  .map-intro-cta__subtitle {
    font-size: 0.8rem;
  }

  .map-intro-cta__actions {
    width: auto;
    align-items: center;
    gap: 0;
  }

  .map-intro-cta__actions .btn {
    flex: 0 0 auto;
  }

  .btn-hero-cta {
    width: auto;
    padding: 11px 16px;
  }

  .map-intro-cta__soft-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .viewer-layout {
    height: calc(100vh - 48px);
    min-height: 360px;
    margin-top: 0;
  }

  .viewer-layout.viewer-layout--mobile-expanded {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    height: auto;
    min-height: 0;
    margin-top: 0;
  }
  .layer-panel {
    position: fixed;
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    border: 1px solid rgba(0, 103, 127, 0.18);
    box-shadow: 0 20px 44px rgba(0, 21, 32, 0.24);
    transition: transform 0.28s ease, opacity 0.2s ease;
    z-index: 1200;
    margin-left: 0;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }
  .layer-panel.mobile-open {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
  .layer-panel.collapsed {
    margin-left: 0;
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
  }
  .info-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 62px;
    bottom: 10px;
    width: auto;
    max-width: none;
    border-radius: 18px;
    border: 1px solid rgba(0, 103, 127, 0.16);
    box-shadow: 0 20px 44px rgba(0, 21, 32, 0.26);
    z-index: 13;
  }
  .info-panel.hidden {
    margin-right: 0;
  }
  .map-action-bar {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
  }

  .map-action-search,
  .map-active-piece,
  .map-action-select,
  .map-action-buttons {
    flex: 1 1 100%;
  }

  .map-action-buttons {
    padding-bottom: 2px;
  }
  .layer-panel-backdrop {
    background: rgba(5, 26, 35, 0.26);
    backdrop-filter: blur(2px);
    z-index: 34;
  }
  .layer-group-body {
    padding: 0 16px 12px;
  }
  .layer-panel-head h3 {
    font-size: 0.98rem;
  }

  .viewer-section--mobile-expanded .map-intro-cta {
    display: none;
  }

  .viewer-layout--mobile-expanded .layer-panel {
    left: 0;
    right: auto;
    top: 0;
    max-height: none;
    border-radius: 0;
  }

  .viewer-layout--mobile-expanded .info-panel {
    left: 4px;
    right: 4px;
    top: 4px;
    bottom: 4px;
    border-radius: 14px;
  }

  .viewer-layout--mobile-expanded .map-action-bar {
    top: 8px;
    left: 8px;
    right: 8px;
    width: auto;
  }

  .viewer-layout--mobile-expanded .map-expand-toggle {
    top: 8px;
    right: 8px;
  }
}

body.panel-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  touch-action: none;
}

.map-touch-overlay {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.map-touch-overlay span {
  background: rgba(255, 255, 255, 0.92);
  color: #1a2b30;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.map-error-banner {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 36px 10px 14px;
  font-size: 0.88rem;
  max-width: min(480px, calc(100% - 32px));
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  animation: cardIn 0.24s ease-out;
}

.map-error-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: #991b1b;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

/* ======================================================
   Paginas PDM secundarias (regulamento, pecas, planos)
   Partilham topbar/footer com a home; reutilizam tokens.
   ====================================================== */

.pdm-peca-grid {
  /* reutiliza .feature-grid mas permite customizacoes pontuais */
}

.pdm-peca-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdm-peca-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pdm-peca-card__alinea {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pdm-peca-card__escala {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pdm-peca-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.pdm-peca-card__tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: var(--surface-alt);
  color: var(--text-secondary);
  border-radius: 999px;
  border: 1px solid var(--border-light);
}

.pdm-peca-card__link {
  margin-left: auto;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.88rem;
}

.pdm-peca-card__link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* Callout (placeholder enquanto nao ha dados) */
.pdm-callout {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 720px;
  margin: 32px auto 0;
}

.pdm-callout__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}

.pdm-callout h2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.pdm-callout__list {
  margin: 0 0 12px 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.pdm-callout__list li {
  margin-bottom: 4px;
}

/* Regulamento: layout 2 colunas (nav + body) */
.pdm-doc-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.pdm-doc-nav {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
  box-shadow: var(--shadow-card);
}

.pdm-doc-nav__item {
  background: transparent;
  border: none;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.pdm-doc-nav__item:hover {
  background: var(--surface-alt);
}

.pdm-doc-nav__item.active {
  background: var(--brand);
  color: #fff;
}

.pdm-doc-body {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-card);
  min-height: 420px;
}

.pdm-anexo-header {
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.pdm-anexo-codigo {
  display: inline-block;
  background: var(--gold-light);
  color: var(--brand-dark);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pdm-anexo-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.pdm-artigo {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
}

.pdm-artigo:last-child {
  border-bottom: none;
}

.pdm-artigo__codigo {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.78rem;
  color: var(--brand-dark);
  background: var(--gold-light);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.pdm-artigo__titulo {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.pdm-artigo__conteudo {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.pdm-artigo__conteudo p {
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .pdm-doc-layout {
    grid-template-columns: 1fr;
  }
  .pdm-doc-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }
  .pdm-doc-nav__item {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .pdm-doc-body {
    padding: 20px;
  }
}

/* ======================================================
   Identify Panel (modo multi-camada do mapa do PDM)
   ====================================================== */
.identify-group {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--surface);
  overflow: hidden;
}

.identify-citizen-summary {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 103, 127, 0.16);
  border-radius: 14px;
  background: #f7fbfc;
}

.identify-citizen-eyebrow {
  color: var(--brand-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.identify-citizen-summary h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.16rem;
  font-weight: 850;
  line-height: 1.18;
}

.identify-citizen-summary p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.45;
}

.identify-overview-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.identify-fast-grid {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.identify-fast-card {
  display: flex;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fff;
}

.identify-fast-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 3px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.identify-fast-card strong,
.identify-friendly-feature strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

.identify-fast-card span,
.identify-fast-card small,
.identify-friendly-feature span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.35;
  margin-top: 2px;
}

.identify-fast-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.identify-fast-tags em {
  border-radius: 999px;
  background: rgba(0, 103, 127, 0.08);
  color: var(--brand-dark);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  padding: 2px 7px;
}

.identify-details-heading {
  margin: 4px 0 9px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identify-friendly-feature {
  margin-bottom: 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border-light);
}

.identify-overview-item {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
}

.identify-overview-item strong {
  color: var(--text);
  font-size: 0.82rem;
}

.identify-overview-item span,
.identify-overview-item small {
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.35;
}

.identify-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background var(--transition);
}

.identify-group-header:hover {
  background: var(--surface-alt);
}

.identify-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.identify-layer-name {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--text);
}

.identify-peca-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.identify-count {
  display: inline-flex;
  min-width: 22px;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
}

.identify-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  font-size: 0.85rem;
}

.identify-chevron.open {
  transform: rotate(180deg);
}

.identify-group-body {
  border-top: 1px solid var(--border-light);
  background: var(--surface-alt);
  padding: 8px 12px;
}

.identify-feature {
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  margin-bottom: 6px;
}

.identify-feature:last-child {
  margin-bottom: 0;
}

.identify-feature-head {
  font-size: 0.9rem;
  line-height: 1.35;
  margin-bottom: 4px;
  color: var(--text);
}

.identify-feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.identify-feature-meta code {
  background: var(--surface-alt);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.72rem;
}

.identify-tag {
  padding: 1px 7px;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.identify-tag-geom {
  font-family: ui-monospace, monospace;
  color: var(--brand-dark);
}

.identify-attrs {
  margin-top: 6px;
  font-size: 0.8rem;
}

.identify-attrs summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.identify-attrs-table {
  width: 100%;
  margin-top: 6px;
  border-collapse: collapse;
}

.identify-attrs-table td {
  padding: 2px 6px;
  border-top: 1px solid var(--border-light);
  font-size: 0.76rem;
}

.identify-attrs-key {
  color: var(--text-muted);
  white-space: nowrap;
  width: 40%;
}

.identify-attrs-val {
  color: var(--text);
  word-break: break-word;
}

/* ============================================================
   Plantas: drawer de selecao + sidebar planta-centrica
   ============================================================ */

.planta-active-bar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, #f4f9fa 0%, #ffffff 100%);
}

.planta-active-bar--empty {
  background: #f7fbfc;
  border-left: 0;
  padding: 12px 14px;
}

.planta-empty-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.35;
}

.planta-empty-compact strong {
  color: var(--text);
  font-size: 0.86rem;
}

.planta-active-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.planta-active-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.planta-active-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 103, 127, 0.15);
  flex-shrink: 0;
}

.planta-active-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.planta-active-actions .btn {
  flex-grow: 1;
  font-size: 0.78rem;
  padding: 4px 10px;
}

.planta-active-legend-ico {
  display: inline-block;
  margin-right: 4px;
  font-size: 0.9em;
}

/* Resumo (contagem de grupos/camadas) */
.layer-sidebar-summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-light);
  background: #fafbfc;
}

.layer-sidebar-legend-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--brand);
  color: var(--brand);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: all 0.15s;
}

.layer-sidebar-legend-btn:hover {
  background: var(--brand);
  color: #fff;
}

.layer-sidebar-legend-btn-icon {
  font-size: 0.95em;
  line-height: 1;
}

.map-embedded-legend {
  position: absolute;
  left: 10px;
  right: auto;
  bottom: 0;
  z-index: 26;
  width: fit-content;
  max-width: calc(100% - 20px);
  border: 1px solid rgba(18, 35, 42, 0.28);
  border-radius: 2px 2px 0 0;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 10px 28px rgba(0, 24, 36, 0.14);
  overflow: hidden;
}

.map-embedded-legend--wide {
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
}

.map-embedded-legend.collapsed {
  right: auto;
  width: min(320px, calc(100% - 28px));
  border-radius: 0;
}

.map-embedded-legend-head {
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, rgba(248, 250, 250, 0.98), rgba(255, 255, 255, 0.96));
  color: var(--text);
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1px 10px;
  padding: 7px 12px 5px;
  text-align: left;
  border-bottom: 1px solid rgba(18, 35, 42, 0.10);
}

.map-embedded-legend-titlebtn {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  padding: 0;
  text-align: left;
}

.map-embedded-legend-head span {
  color: #111;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-embedded-legend-head strong {
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1.22;
}

.map-embedded-legend-toggle {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 0;
}

.map-embedded-legend-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-height: 218px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 12px 10px;
  scrollbar-width: thin;
}

.map-legend-column {
  flex: 0 0 auto;
  min-width: 0;
  padding-right: 14px;
  border-right: 1px solid rgba(18, 35, 42, 0.08);
}

.map-legend-column:last-of-type {
  border-right: 0;
}

.map-legend-column h5 {
  margin: 0 0 6px;
}

.map-legend-sections-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.map-legend-title-button {
  border: 0;
  background: transparent;
  color: #151515;
  cursor: pointer;
  display: block;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 0;
  text-align: left;
  text-transform: uppercase;
}

.map-legend-title-button:hover {
  color: var(--brand-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.map-legend-title-button.is-off {
  color: var(--text-muted);
  opacity: 0.58;
}

.map-legend-section {
  flex: 0 0 140px;
  max-height: 140px;
  overflow-y: auto;
  display: grid;
  gap: 1px;
  margin-bottom: 6px;
  padding-right: 4px;
  scrollbar-width: none;
}

.map-legend-section::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.map-legend-section:last-child {
  margin-bottom: 0;
}

.map-legend-section h6 {
  margin: 0 0 2px;
}

.map-legend-section-button {
  color: var(--text-muted);
  font-size: 0.5rem;
  font-weight: 850;
}

.map-legend-row {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.58rem;
  line-height: 1.2;
  min-height: 18px;
  padding: 1px 3px;
  text-align: left;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
}

.map-legend-row:hover {
  background: rgba(0, 103, 127, 0.045);
  border-color: rgba(0, 103, 127, 0.12);
}

.map-legend-row.is-off {
  opacity: 0.48;
}

.map-legend-row.is-off .legenda-swatch {
  filter: grayscale(1);
}

.map-legend-row strong {
  display: block;
  color: var(--text);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.map-legend-row small {
  display: block;
  color: var(--text-muted);
  font-size: 0.69rem;
  line-height: 1.25;
  margin-top: 2px;
}

.map-embedded-legend-more {
  align-self: flex-end;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 103, 127, 0.20);
  border-radius: 999px;
  background: rgba(0, 103, 127, 0.04);
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 5px 8px;
  text-transform: uppercase;
}

.map-embedded-legend-more--head {
  align-self: center;
  font-size: 0.58rem;
  padding: 4px 8px;
}

@media (max-width: 768px) {
  .map-embedded-legend {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
  }

  .map-embedded-legend.collapsed {
    width: auto;
  }

  .map-embedded-legend-body {
    max-height: 210px;
    gap: 18px;
  }
}

/* Legenda drawer */
.legenda-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 40, 0.58);
  backdrop-filter: blur(3px);
  z-index: 1070;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}

.legenda-dialog {
  background: var(--surface);
  border-left: 1px solid rgba(0, 103, 127, 0.16);
  border-radius: 20px 0 0 20px;
  max-width: min(520px, 100vw);
  width: min(520px, 100vw);
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: -18px 0 60px rgba(0, 40, 60, 0.22);
  overflow: hidden;
  animation: slideDrawerIn 0.24s ease-out;
}

.legenda-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.legenda-dialog-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.legenda-dialog-title {
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.25;
}

.legenda-dialog-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.legenda-dialog-body {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
  background: #fafbfc;
}

.legenda-oficial-wrapper {
  text-align: center;
}

.legenda-image {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 40, 60, 0.12);
  background: #fff;
}

.legenda-missing {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

/* Tabs */
.legenda-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
  padding: 0 20px;
}

.legenda-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
}

.legenda-tab:hover {
  color: var(--text);
}

.legenda-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.legenda-tab-count {
  background: var(--surface-alt);
  color: var(--text-muted);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.legenda-tab.active .legenda-tab-count {
  background: rgba(0, 103, 127, 0.15);
  color: var(--brand);
}

/* Legenda auto-gerada */
.legenda-auto-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legenda-auto-intro {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 4px;
  padding: 8px 10px;
  background: rgba(0, 103, 127, 0.05);
  border-left: 3px solid var(--brand);
  border-radius: 4px;
}

.legenda-group {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 14px;
}

.legenda-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.legenda-camadas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legenda-camada {
  padding: 4px 0;
}

.legenda-camada-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.legenda-camada-name {
  flex-grow: 1;
}

.legenda-camada-kind,
.legenda-entry-kind {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

.legenda-entries {
  list-style: none;
  margin: 0;
  padding: 0 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.legenda-entries.single {
  padding: 0;
}

.legenda-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
  padding: 2px 0;
}

.legenda-swatch {
  flex-shrink: 0;
  width: 20px;
  height: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.45);
  border-radius: 0;
  display: inline-block;
}

.legenda-swatch--line {
  height: 0;
  background: transparent !important;
  border-top-width: 3px !important;
  border-top-style: solid !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
}

.legenda-swatch--point {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border-width: 2px;
}

.legenda-swatch--polygon.legenda-swatch--outline {
  background: transparent !important;
}

.legenda-swatch--triangle {
  width: 14px;
  height: 14px;
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.legenda-swatch--square {
  width: 13px;
  height: 13px;
  border-radius: 0;
}

.legenda-swatch--diamond {
  width: 13px;
  height: 13px;
  border-radius: 0;
  transform: rotate(45deg);
}

.legenda-swatch--star {
  width: 15px;
  height: 15px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 35%);
}

.legenda-swatch--cross {
  width: 14px;
  height: 14px;
  clip-path: polygon(35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%, 0 35%, 35% 35%);
}

/* Linha tracejada: usa border-top com a cor definida inline (via ng-style border-color) */
.legenda-swatch--dashed.legenda-swatch--line {
  height: 0;
  background: transparent !important;
  border-top-width: 3px !important;
  border-top-style: dashed !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
}

.legenda-swatch--hatch {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.4) 0 2px,
    transparent 2px 5px
  );
}

.legenda-label {
  flex-grow: 1;
  line-height: 1.3;
}

.legenda-children {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   Modal de Definicoes do Mapa (ortofoto, freguesia, comparacoes)
   ============================================================ */

.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 40, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1070;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.settings-dialog {
  background: var(--surface);
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 40, 60, 0.3);
  overflow: hidden;
}

.settings-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.settings-dialog-eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.settings-dialog-title {
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.2;
}

.settings-dialog-body {
  flex: 1;
  overflow: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-section {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fafbfc;
}

.settings-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin: 0 0 4px;
}

.settings-section-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.35;
}

.settings-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 6px 0 4px;
}

.settings-slider-value {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--brand);
  font-weight: 700;
}

.settings-dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 18px;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}

/* ============================================================
   Banner de estado do cruzamento server-side (extrato de area)
   ============================================================ */

.server-crossing-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.server-crossing-banner--loading {
  background: rgba(0, 103, 127, 0.08);
  border-left: 3px solid var(--brand);
  color: var(--text);
}

.server-crossing-banner--ok {
  background: #e8f5ec;
  border-left: 3px solid #22a06b;
  color: #184e35;
}

.server-crossing-banner--error {
  background: #fff4e0;
  border-left: 3px solid #e48911;
  color: #7a4e0a;
}

.server-crossing-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.server-crossing-extra {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  opacity: 0.85;
}

.legenda-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}

@keyframes slideDrawerIn {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.layer-group-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 1px 8px;
  border-radius: 10px;
}

.layer-item-kind {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

.layer-empty {
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Drawer Plantas */
.plantas-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 40, 0.32);
  z-index: 1040;
  backdrop-filter: blur(2px);
}

.plantas-drawer {
  position: fixed;
  top: 0;
  right: -460px;
  width: 440px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  box-shadow: -12px 0 48px rgba(0, 50, 65, 0.18);
  transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1050;
  display: flex;
  flex-direction: column;
}

.plantas-drawer.open {
  right: 0;
}

.plantas-drawer-head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.plantas-drawer-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 4px;
  font-weight: 600;
}

.plantas-drawer-head h3 {
  margin: 0 0 4px;
  font-size: 1.18rem;
  color: var(--text);
}

.plantas-drawer-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.plantas-drawer-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 8px 16px 16px;
}

.plantas-family {
  margin-top: 18px;
}

.plantas-family:first-child {
  margin-top: 8px;
}

.plantas-family-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin-bottom: 6px;
}

.plantas-family-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.plantas-family-head h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 700;
  flex-grow: 1;
}

.plantas-family-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 2px 8px;
  border-radius: 10px;
}

.plantas-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.planta-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 6px;
}

.planta-item:hover {
  border-color: var(--brand-light);
  background: var(--surface-alt);
}

.planta-item.active {
  border-color: var(--brand);
  background: #e9f5f7;
}

.planta-item-radio {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin-top: 2px;
  flex-shrink: 0;
  position: relative;
}

.planta-item.active .planta-item-radio {
  border-color: var(--brand);
}

.planta-item.active .planta-item-radio::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--brand);
}

.planta-item-body {
  flex-grow: 1;
  min-width: 0;
}

.planta-item-title {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 2px;
}

.planta-item-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.planta-item-empty {
  color: #b37100;
  font-style: italic;
}

.plantas-drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.plantas-drawer-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.map-tool-btn--primary {
  background: var(--brand) !important;
  color: #fff !important;
  width: auto !important;
  padding: 0 14px !important;
  gap: 6px;
  display: inline-flex !important;
  align-items: center;
}

.map-tool-btn--primary .map-tool-btn-label {
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .plantas-drawer {
    width: 100vw;
    right: -100vw;
  }

  .legenda-overlay {
    align-items: flex-end;
    justify-content: stretch;
  }

  .legenda-dialog {
    width: 100vw;
    max-width: 100vw;
    height: min(82vh, 720px);
    max-height: 82vh;
    border-left: 0;
    border-top: 1px solid rgba(0, 103, 127, 0.16);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -18px 48px rgba(0, 40, 60, 0.24);
    animation: slideSheetIn 0.24s ease-out;
  }

  .legenda-dialog-head {
    padding: 14px 16px;
  }

  .legenda-tabs {
    padding: 0 12px;
    overflow-x: auto;
  }

  .legenda-dialog-body {
    padding: 14px 16px;
  }
}

@keyframes slideSheetIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Arvore recursiva de grupos + pesquisa dentro da planta activa
   ============================================================ */

.layer-search {
  position: relative;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
}

.layer-search-input {
  width: 100%;
  padding: 7px 30px 7px 10px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
}

.layer-search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(0, 103, 127, 0.1);
}

.layer-search-clear {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}

.layer-group--nested {
  margin: 2px 0;
}

.layer-group--nested .layer-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
  transition: background 0.12s;
}

.layer-group--root > .layer-group-header {
  background: linear-gradient(180deg, #f1f7f8 0%, #ffffff 100%);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--brand-dark);
}

.layer-group--nested:not(.layer-group--root) > .layer-group-header {
  padding-left: 24px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.layer-group--nested .layer-group-header:hover {
  background: var(--surface-alt);
}

.layer-group-chevron-left {
  display: inline-block;
  width: 10px;
  transition: transform 0.15s;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.layer-group-chevron-left.open {
  transform: rotate(90deg);
}

.layer-group-title {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-group-toggle {
  margin-left: auto;
  padding: 2px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.layer-group-toggle input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  accent-color: var(--brand);
}

.layer-group--nested > .layer-group-body {
  padding-left: 0;
  background: var(--surface);
}

.layer-group--nested:not(.layer-group--root) > .layer-group-body .layer-item {
  padding-left: 40px;
}

.layer-group--nested > .layer-group-body > .layer-item {
  padding: 5px 12px 5px 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.layer-group--nested > .layer-group-body > .layer-item:hover {
  background: var(--surface-alt);
}

.layer-group--nested > .layer-group-body > .layer-item--read-only {
  cursor: default;
}

.layer-group--nested > .layer-group-body > .layer-item--read-only:hover {
  background: var(--surface);
}

.layer-item-label {
  flex-grow: 1;
  font-size: 0.82rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-legend-title-button:disabled,
.map-legend-row:disabled {
  cursor: default;
  opacity: 1;
}

.layer-swatch--line {
  height: 3px !important;
  border-radius: 0 !important;
  width: 14px !important;
}

.layer-swatch--point {
  border-radius: 50% !important;
  border: 1px solid rgba(0, 0, 0, 0.3) !important;
  width: 10px !important;
  height: 10px !important;
}

.layer-item-kind {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: lowercase;
  font-style: italic;
  margin-left: 4px;
}
