/* Wejdę? on GOV.UK Frontend (MIT). No GOV.UK branding: own header, colours and typeface. */
:root {
  --navy: #1d2b3a;
  --saffron: #f2b84b;
  --ink: #0b0c0c;
  --yes: #12805c;
  --limited: #b06f00;
  --no: #c4372c;
  --unknown: #6f777b;
  --header-h: 64px;
  --font: "Atkinson Hyperlegible", arial, sans-serif;
}

/* Replace the GDS Transport typeface everywhere. */
body, .govuk-template__body, [class*="govuk-"], .leaflet-container { font-family: var(--font) !important; }
.govuk-template, .govuk-template__body { background: #fff; }
html, body { height: 100%; margin: 0; }

.rp-header {
  height: var(--header-h); display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: var(--navy); color: #fff; border-bottom: 8px solid var(--saffron); box-sizing: content-box;
}
.rp-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.rp-brand:focus { outline: 3px solid transparent; background: #ffdd00; color: var(--ink); box-shadow: 0 -2px #ffdd00, 0 4px var(--ink); }
.rp-brand:focus .rp-logo { fill: var(--ink); }
.rp-logo { width: 38px; height: 38px; fill: var(--saffron); }
.rp-logo circle { fill: #fff; }
.rp-name { font-weight: 700; font-size: 30px; letter-spacing: -.01em; }
.rp-tagline { font-size: 19px; color: #d9e0e6; border-left: 1px solid #4b6075; padding-left: 18px; }
.rp-beta { margin-left: auto; background: var(--saffron); color: var(--ink); }

.rp-app { display: grid; grid-template-columns: minmax(340px, 430px) 1fr; height: calc(100vh - var(--header-h) - 8px); }
.rp-panel { overflow-y: auto; padding: 20px 22px 12px; border-right: 1px solid #b1b4b6; background: #fff; }

.rp-count { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.rp-count__n { margin: 0; font-size: 56px; font-weight: 700; line-height: 1; color: var(--navy); letter-spacing: -.02em; }
.rp-count__n span { box-shadow: inset 0 -12px 0 var(--saffron); }
.rp-count__label { margin: 0; font-size: 19px; font-weight: 700; }
.rp-coverage { margin-top: 12px; border-left-color: var(--saffron); }

.rp-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.rp-key--yes { background: var(--yes); }
.rp-key--limited { background: var(--limited); }
.rp-key--no { background: #fff; box-shadow: inset 0 0 0 3px var(--no); }
.rp-key--unknown { background: var(--unknown); }
.rp-dim { color: #505a5f; }
.rp-sq { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 3px; margin-right: 8px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.rp-catn { color: #505a5f; }
.rp-filters .govuk-details { margin-bottom: 18px; }

.rp-list-h { margin: 8px 0 10px; padding-top: 14px; border-top: 1px solid #b1b4b6; }
.rp-results { list-style: none; margin: 0 0 20px; padding: 0; }
.rp-results li { border-bottom: 1px solid #b1b4b6; }
.rp-results button {
  width: 100%; display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; text-align: left;
  padding: 10px 4px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 17px; color: var(--ink);
}
.rp-results button:hover .rp-nm { text-decoration: underline; text-decoration-thickness: 2px; }
.rp-results button:focus { outline: 3px solid transparent; background: #ffdd00; box-shadow: 0 -2px #ffdd00, 0 4px var(--ink); }
.rp-results .rp-dot { width: 14px; height: 14px; border-radius: 50%; }
.rp-nm { color: #1d70b8; font-weight: 700; }
.rp-sub { display: block; font-size: 15px; color: #505a5f; font-weight: 400; }
.rp-dist { font-size: 15px; color: #505a5f; white-space: nowrap; }
.rp-results .rp-empty { padding: 10px 0; color: #505a5f; }
.rp-foot { color: #505a5f; }

.rp-mapwrap { position: relative; }
.rp-app > * { min-width: 0; }
html, body { overflow-x: hidden; }
#map { position: absolute; inset: 0; background: #e8e4dc; }
.leaflet-tile-pane { filter: saturate(.55) contrast(.95) brightness(1.03); }

.rp-card {
  position: absolute; top: 16px; right: 16px; z-index: 1000; width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 32px); overflow-y: auto; background: #fff; padding: 20px 20px 4px;
  border-top: 8px solid var(--navy); box-shadow: 0 10px 40px rgba(11, 12, 12, .3);
}
.rp-card:focus { outline: none; }
.rp-card .rp-close { position: absolute; top: 10px; right: 10px; margin: 0; min-width: 44px; }
.rp-card .govuk-caption-m, .rp-card h2 { margin-right: 60px; }
.rp-card .govuk-summary-list__key { width: 42%; font-size: 17px; overflow-wrap: normal; word-wrap: normal; hyphens: auto; }
.rp-card .govuk-summary-list { margin-bottom: 16px; }
.rp-tag--yes { background: #cce2d8; color: #005a30; }
.rp-tag--limited { background: #fcd6c3; color: #6e3619; }
.rp-tag--no { background: #f4cdc6; color: #942514; }
.rp-tag--unknown { background: #e5e6e7; color: #0b0c0c; }
.rp-tag--nearby { background: #bbd4ea; color: #0c2d4a; }
.rp-tag--big { font-size: 19px; padding: 4px 10px; }
.rp-reason { display: block; margin-top: 4px; font-size: 16px; color: #505a5f; }

.rp-fac { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 5px; color: #fff; font: 700 11px/1 var(--font); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }

@media (max-width: 820px) {
  .rp-tagline { display: none; }
  .rp-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 50vh auto; height: auto; }
  .rp-header { padding: 0 16px; }
  .rp-panel .govuk-input { max-width: 100%; box-sizing: border-box; }
  .rp-mapwrap { grid-row: 1; height: 50vh; }
  .rp-panel { grid-row: 2; overflow: visible; border-right: 0; padding: 16px; }
  .rp-card { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-height: 72vh; }
  .rp-count__n { font-size: 44px; }
}
