/* Паспорт території: макет, графіки, таблиці й адаптація до ширини екрана. */
.metric-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: 7px;
  border: 1px solid #86a99c;
  border-radius: 50%;
  background: transparent;
  color: #497766;
  font: 600 11px/1 var(--body, sans-serif);
  vertical-align: middle;
  cursor: help;
  flex-shrink: 0;
}
.metric-help:hover,
.metric-help:focus-visible {
  background: #d6ebe3;
  outline: 2px solid #95beaf;
  outline-offset: 2px;
}
.metric-tooltip {
  position: fixed;
  z-index: 2147483647;
  width: min(330px, calc(100vw - 24px));
  padding: 15px 18px;
  background: #1d4134;
  color: #fff;
  border: 1px solid #4c7264;
  border-radius: 12px;
  box-shadow: 0 10px 35px #103a2b40;
  font:
    400 13px/1.65 Manrope,
    sans-serif;
  pointer-events: none;
}
.passport-open {
  margin: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: calc(100% - 48px);
  padding: 16px 18px;
  border: 1px solid #a9cbbf;
  border-radius: 9px;
  color: #255141;
  background: #dfefe9;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
}
.passport-open:hover {
  background: #cdeadf;
}
.passport-open svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.nature-passport {
  width: min(1180px, calc(100vw - 48px));
  height: calc(100dvh - 48px);
  max-width: none;
  max-height: none;
  padding: 0;
  margin: auto;
  border: 1px solid #b8d4ca;
  border-radius: 20px;
  background: #f2f9f6;
  color: #234136;
  box-shadow: 0 35px 100px #0e302355;
  overflow: auto;
  font-family: Manrope, sans-serif;
  scrollbar-gutter: stable;
}
.nature-passport::backdrop {
  background: #0f2e23ab;
  backdrop-filter: blur(6px);
}
.passport-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 34px;
  background: #f2f9f6f5;
  border-bottom: 1px solid #d0e5dd;
  backdrop-filter: blur(12px);
}
.passport-brand {
  font:
    500 23px/1.2 Oswald,
    sans-serif;
  color: #1d4234;
  white-space: nowrap;
}
.passport-brand b {
  font-weight: 500;
  color: #40866c;
}
.passport-brand i {
  font-style: normal;
  padding: 0 7px;
}
.passport-toolbar > div {
  display: flex;
  align-items: center;
  gap: 18px;
}
.passport-pdf {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #275745;
  color: #fff;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 12px;
}
.passport-pdf:disabled {
  opacity: 0.4;
  cursor: wait;
}
.passport-pdf svg,
.passport-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.passport-close {
  padding: 8px;
  display: flex;
  border-radius: 50%;
  color: #315749;
}
.passport-close:hover {
  background: #dbefe8;
}
.passport-document {
  padding: 38px 42px 30px;
}
.passport-hero {
  border-bottom: 1px solid #cee5dd;
  padding-bottom: 26px;
  margin-bottom: 27px;
}
.passport-eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #669282;
  font-weight: 700;
}
.passport-hero h1 {
  font:
    500 clamp(26px, 3vw, 43px) / 1.22 Oswald,
    sans-serif;
  margin: 13px 0 18px;
  max-width: 930px;
}
.passport-period {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 7px;
  background: #dff0ea;
  font-size: 12px;
  color: #417562;
}
.passport-summary {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 22px;
  margin-bottom: 22px;
}
.passport-metric {
  padding: 21px 24px;
  border-radius: 13px;
  background: #dff0ea;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.passport-metric > span {
  font-size: 12px;
  color: #4f7c6c;
}
.passport-metric > strong {
  font:
    500 38px/1.15 Oswald,
    sans-serif;
  letter-spacing: -0.5px;
  color: #255241;
}
.passport-metric > small {
  font-size: 11px;
  color: #678c7f;
}
.passport-damage {
  display: flex;
  align-items: center;
  gap: 23px;
  background: #f1eee4;
  border-radius: 13px;
  padding: 20px 25px;
}
.passport-donut {
  width: 96px;
  height: 96px;
  min-width: 96px;
  border-radius: 50%;
  background: conic-gradient(var(--damage-color) var(--damage), #cde0d9 0);
  display: grid;
  place-items: center;
  position: relative;
}
.passport-donut:before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #f1eee4;
}
.passport-donut strong {
  position: relative;
  font:
    500 25px Oswald,
    sans-serif;
}
.passport-damage h2 {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 8px;
}
.passport-damage p {
  font-size: 12px;
  color: #608779;
  margin: 0;
  line-height: 1.6;
}
.passport-description {
  font-size: 13px;
  line-height: 1.85;
  max-width: 950px;
  margin: 18px 0;
}
.passport-note {
  font-size: 11px !important;
  line-height: 1.75 !important;
  color: #608779;
  margin: 14px 0;
}
.passport-section {
  padding: 26px 0;
  border-top: 1px solid #cee5dd;
  margin-top: 25px;
}
.passport-section-title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 22px;
}
.passport-section-title > span {
  font:
    400 20px Oswald,
    sans-serif;
  color: #86ab9d;
}
.passport-section-title h2 {
  font:
    500 27px/1.3 Oswald,
    sans-serif;
  margin: 0;
}
.passport-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 25px 0 14px;
}
.passport-split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 26px;
  align-items: start;
}
.passport-split p:not(.passport-note) {
  font-size: 12px;
  line-height: 1.8;
  margin: 14px 0;
}
.passport-map-box {
  border: 1px solid #cae1d9;
  border-radius: 12px;
  overflow: hidden;
  background: #e9f3ef;
}
.passport-map {
  display: block;
  width: 100%;
  height: auto;
}
.passport-map text {
  font:
    12px Manrope,
    sans-serif;
  fill: #426f5f;
}
.passport-map-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 10px;
  color: #4f7d6c;
  background: #e4f1ec;
}
.passport-boundary {
  width: 17px;
  height: 11px;
  border: 2px solid #205240;
  display: inline-block;
}
.map-load-state {
  margin-left: auto;
  text-align: right;
}
.passport-map-box[data-failed='true'] .map-load-state {
  color: #9c5034;
}
.passport-chart {
  width: 100%;
  height: auto;
  display: block;
}
.passport-chart text {
  font:
    11px Manrope,
    sans-serif;
  fill: #6a8e81;
}
.passport-chart rect:focus {
  outline: 2px solid #194a38;
}
.passport-chart-key {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 11px;
  color: #4d7868;
  margin: 8px 0;
}
.passport-chart-key span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.passport-chart-key i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.passport-data {
  font-size: 11px;
  margin: 15px 0;
}
.passport-data summary {
  cursor: pointer;
  color: #437a66;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.passport-table-wrap,
.passport-data {
  overflow-x: auto;
}
.nature-passport table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.6;
  margin: 14px 0;
}
.nature-passport th {
  font-size: 10px;
  color: #598373;
  background: #dfefe9;
  padding: 12px 9px;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}
.nature-passport td {
  padding: 12px 9px;
  border-bottom: 1px solid #d4e7e0;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.nature-passport td:first-child {
  white-space: nowrap;
}
.nature-passport td a {
  color: #955d36;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.passport-incidents td:nth-child(2) {
  width: 32%;
}
.passport-incidents td:nth-child(3) {
  width: 30%;
}
.passport-data th,
.passport-data td {
  text-align: right;
}
.passport-data th:first-child,
.passport-data td:first-child {
  text-align: left;
}
.passport-footer {
  padding: 23px 25px;
  background: #dff0ea;
  border-radius: 12px;
  margin-top: 24px;
  font-size: 10px;
  line-height: 1.8;
  color: #578473;
}
.passport-footer > b {
  font:
    500 18px Oswald,
    sans-serif;
  color: #37705b;
}
.passport-footer p {
  margin: 9px 0;
}
.passport-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #37705b;
}
.passport-empty,
.passport-error {
  padding: 22px;
  background: #e5f1ed;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.8;
}
.passport-error {
  color: #975438;
  background: #f2e9dc;
}
.passport-link {
  font-size: 12px;
  text-decoration: underline;
  margin-top: 8px;
}
.passport-warning {
  padding: 12px 15px;
  border-left: 3px solid #c38843;
  background: #f2eada;
  font-size: 12px;
  line-height: 1.6;
}
.passport-skeleton {
  padding: 20px;
  background: #e5f1ed;
  border-radius: 12px;
  min-height: 120px;
  animation: pulse 1.4s ease infinite;
}
.passport-skeleton i {
  display: block;
  height: 12px;
  background: #d0e6de;
  margin: 14px 0;
  border-radius: 4px;
  width: 75%;
}
.passport-skeleton i:nth-child(2) {
  width: 45%;
}
.passport-skeleton i:last-child {
  width: 90%;
}
@media (max-width: 700px) {
  .nature-passport {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .passport-toolbar {
    padding: 12px 16px;
  }
  .passport-brand {
    font-size: 19px;
  }
  .passport-pdf {
    padding: 9px;
    font-size: 10px;
    gap: 5px;
  }
  .passport-toolbar > div {
    gap: 5px;
  }
  .passport-document {
    padding: 25px 18px;
  }
  .passport-summary,
  .passport-split {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .passport-damage {
    padding: 20px;
  }
  .passport-section-title h2 {
    font-size: 24px;
  }
  .passport-chart {
    min-width: 470px;
  }
  .passport-section {
    overflow-x: auto;
  }
  .passport-metric > strong {
    font-size: 32px;
  }
  .passport-section-title {
    gap: 9px;
  }
  .passport-incidents {
    min-width: 520px;
  }
  .passport-hero h1 {
    font-size: 31px;
  }
  .passport-map-caption {
    font-size: 9px;
  }
}
@page {
  size: A4;
  margin: 13mm 12mm;
}
@media print {
  html.passport-print,
  html.passport-print body {
    height: auto !important;
    overflow: visible !important;
    background: white !important;
  }
  html.passport-print body > *:not(#naturePassport) {
    display: none !important;
  }
  html.passport-print .nature-passport {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    max-width: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    scrollbar-gutter: auto !important;
  }
  html.passport-print dialog::backdrop {
    display: none !important;
  }
  .passport-print .passport-toolbar,
  .passport-print .metric-help,
  .passport-print .metric-tooltip,
  .passport-print .passport-data {
    display: none !important;
  }
  .passport-print .passport-document {
    padding: 0;
  }
  .passport-print * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .passport-print .passport-hero h1 {
    font-size: 29px;
  }
  .passport-print .passport-section {
    break-before: page;
    overflow: visible;
    margin: 0;
    padding-top: 12px;
    border: 0;
  }
  .passport-print .passport-section-title {
    break-after: avoid;
  }
  .passport-print .passport-split {
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
    break-inside: avoid;
  }
  .passport-print .passport-summary {
    grid-template-columns: 1fr 1.5fr;
  }
  .passport-print .passport-chart {
    min-width: 0;
  }
  .passport-print .passport-map-box,
  .passport-print .passport-footer,
  .passport-print .passport-damage,
  .passport-print .passport-metric {
    break-inside: avoid;
  }
  .passport-print .passport-table-wrap {
    overflow: visible;
  }
  .passport-print .passport-incidents {
    min-width: 0;
  }
  .passport-print thead {
    display: table-header-group;
  }
  .passport-print tr {
    break-inside: avoid;
  }
  .passport-print .passport-footer {
    margin-top: 20px;
  }
  .passport-print .passport-note {
    font-size: 9px !important;
  }
  .passport-print .passport-description {
    font-size: 11px;
  }
  .passport-print .passport-metric > strong {
    font-size: 30px;
  }
  .passport-print .passport-section h3 {
    break-after: avoid;
  }
  .passport-print .passport-error button {
    display: none;
  }
}

/* The shared modal frame and header are defined in interface.css. */
@media screen {
  .passport-document {
    padding: 15px 0 10px;
  }
}
@media print {
  .passport-print .passport-scroll {
    display: block;
    overflow: visible;
    margin: 0;
    height: auto;
  }
  .passport-print .passport-actions {
    display: none;
  }
}
@media screen and (max-width: 480px) {
  .passport-damage {
    gap: 12px;
    padding: 18px;
  }
  .passport-donut {
    width: 80px;
    height: 80px;
    min-width: 80px;
  }
  .passport-donut strong {
    font-size: 22px;
  }
}
