/* 19.36.0 — okno „Raport działki PDF” (ReportPdfDialog.js). Portal do <body>: tokeny z :root. */
.rpdf-backdrop { padding: 20px; }
.rpdf-window {
  --rpdf-accent: #2e6b3f;
  --rpdf-accent-soft: #eaf3ec;
  width: min(1120px, 100%);
  max-height: min(900px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--panel-radius, 12px);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
  outline: none;
}
:root[data-theme="dark"] .rpdf-window { --rpdf-accent: #7fc495; --rpdf-accent-soft: #233a2b; }
.rpdf-window--loading { padding: 32px; width: auto; }
.rpdf-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.rpdf-head-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rpdf-head-text strong { font-size: 17px; }
.rpdf-head-text span { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpdf-close { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rpdf-close:hover { background: var(--surface-hover); }
.rpdf-body { display: flex; min-height: 0; flex: 1; }
.rpdf-main { flex: 1; min-width: 0; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 16px; }
.rpdf-section { display: flex; flex-direction: column; gap: 9px; }
.rpdf-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rpdf-section-head strong, .rpdf-aside-title { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.rpdf-section-head small { font-size: 12px; color: var(--text-faint); }
.rpdf-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rpdf-preset { position: relative; display: flex; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-solid); }
.rpdf-preset.is-selected { border: 2px solid var(--rpdf-accent); background: var(--rpdf-accent-soft); }
.rpdf-preset-main { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; min-height: 64px; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; border-radius: 10px; }
div.rpdf-preset-main { cursor: default; }
.rpdf-preset-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rpdf-preset-top strong { font-size: 14px; }
.rpdf-preset-top small, .rpdf-preset-desc { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.rpdf-preset-remove { position: absolute; right: 4px; bottom: 4px; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rpdf-preset-remove:hover { background: var(--surface-hover); color: #b91c1c; }
.rpdf-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rpdf-group { margin: 0; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rpdf-group legend { padding: 0 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--rpdf-accent); }
.rpdf-check { display: flex; gap: 9px; align-items: flex-start; padding: 4px 0; font-size: 13.5px; cursor: pointer; }
.rpdf-check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--rpdf-accent); flex: none; }
.rpdf-check > span { display: flex; flex-direction: column; gap: 1px; }
.rpdf-check small { font-size: 11.5px; color: var(--text-muted); }
.rpdf-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px 18px; }
.rpdf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rpdf-field--wide { grid-column: 1 / -1; }
.rpdf-label { font-size: 12.5px; color: var(--text-muted); }
.rpdf-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.rpdf-pill { min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.rpdf-pill.is-selected { border-color: var(--rpdf-accent); background: var(--rpdf-accent); color: #fff; font-weight: 600; }
:root[data-theme="dark"] .rpdf-pill.is-selected { color: #10251a; }
.rpdf-input { min-height: 38px; box-sizing: border-box; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 14px; background: var(--surface-solid); color: var(--text); min-width: 0; flex: 1; }
.rpdf-more { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.rpdf-more summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
.rpdf-more[open] summary { margin-bottom: 10px; }
.rpdf-row { display: flex; align-items: center; gap: 8px; }
.rpdf-row--wrap { flex-wrap: wrap; margin-bottom: 8px; }
.rpdf-logo { max-height: 40px; max-width: 160px; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.rpdf-hint { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.rpdf-info { margin: 0; font-size: 13px; color: var(--text); }
.rpdf-aside { width: 300px; flex: none; border-left: 1px solid var(--border); background: var(--surface-raised); padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.rpdf-count { display: flex; align-items: baseline; gap: 8px; }
.rpdf-count span { font-size: 30px; font-weight: 700; }
.rpdf-count small { font-size: 13px; color: var(--text-muted); }
.rpdf-toc { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; flex: 1; }
.rpdf-progress, .rpdf-error, .rpdf-done { margin: 0; font-size: 13px; line-height: 1.4; display: flex; gap: 8px; align-items: flex-start; }
.rpdf-error { color: #b91c1c; }
:root[data-theme="dark"] .rpdf-error { color: #fca5a5; }
.rpdf-spinner { width: 14px; height: 14px; margin-top: 2px; border: 2px solid var(--border-strong); border-top-color: var(--rpdf-accent); border-radius: 50%; animation: rpdf-spin .8s linear infinite; flex: none; }
@keyframes rpdf-spin { to { transform: rotate(360deg); } }
.rpdf-actions { display: flex; gap: 8px; }
.rpdf-actions > * { flex: 1; justify-content: center; }
@media (max-width: 760px) {
  .rpdf-backdrop { padding: 0; align-items: stretch; }
  .rpdf-window { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .rpdf-body { flex-direction: column; overflow: auto; }
  .rpdf-main { overflow: visible; padding: 14px; }
  .rpdf-aside { width: auto; border-left: 0; border-top: 1px solid var(--border); position: sticky; bottom: 0; gap: 8px; padding: 12px 14px; }
  .rpdf-toc, .rpdf-aside > .rpdf-hint { display: none; }
  .rpdf-presets { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .rpdf-spinner { animation: none; } }
/* przycisk w karcie działki i sekcja w panelu Eksport */
.identify-report { display: flex; margin: 8px 0 2px; }
.identify-report > button { flex: 1; justify-content: center; }
.export-section--report small { color: var(--text-muted); }
/* telefon: piąta akcja w karcie działki (Raport PDF) */
.m-actions { grid-template-columns: repeat(5, 1fr); }
.m-card-details .identify-report { display: none; }
/* 19.37.1: ponowne utworzenie raportu po zmianie ustawień */
.rpdf-again { border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; padding: 4px 0; align-self: center; }
.rpdf-again:hover { color: var(--text); }
/* 19.40.0: teren inwestycji z kilku działek */
.rpdf-terrain { display: flex; flex-wrap: wrap; gap: 6px; }
.rpdf-terrain-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 6px 0 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-solid); font-size: 13px; }
.rpdf-terrain-chip > button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rpdf-terrain-chip > button:hover { background: var(--surface-hover); color: #b91c1c; }
