/* Anywhere Link Planner. Uses the portal's colours and type. */
.lp { max-width: 1280px; margin: 0 auto; color: #0E1F2F; }
.lp-head { margin-bottom: 20px; }
.lp-head h1 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.01em; }
.lp-head p { margin: 4px 0 0; color: #5F7381; }

.lp-top { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.lp-panel, .lp-card { background: #FFFFFF; border: 1px solid #DDE5EB; border-radius: 16px; }
.lp-panel { padding: 18px 20px; }
.lp fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 0 0 16px; padding: 0 0 16px; border: 0; border-bottom: 1px solid #E9EFF3; min-width: 0; }
.lp legend { padding: 0; margin-bottom: 8px; font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 600; }
.lp label, .lp-dialog label { display: block; min-width: 0; font-size: 13px; font-weight: 500; color: #2E3B44; }
.lp-wide { grid-column: 1 / -1; }
.lp input:not([type="checkbox"]), .lp select, .lp-dialog input, .lp-dialog textarea {
  width: 100%; height: 40px; margin-top: 4px; padding: 0 10px; background: #FFFFFF;
  border: 1px solid #DDE5EB; border-radius: 8px; font-size: 14px; font-weight: 400; color: #0E1F2F; outline: none;
}
.lp-dialog textarea { height: auto; padding: 8px 10px; }
.lp input:focus, .lp select:focus, .lp-dialog input:focus, .lp-dialog textarea:focus { border-color: #00A8CC; box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.12); }
.lp input.lp-bad, .lp select.lp-bad { border-color: #DC2626; }
.lp-check { display: flex !important; align-items: center; gap: 8px; }
.lp-run { width: 100%; justify-content: center; }
.lp-note, .lp-small { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: #5F7381; }
.lp-error { margin: 0 0 12px; padding: 10px 12px; background: #FEF2F2; border: 1px solid #FECACA; border-radius: 10px; font-size: 13px; color: #991B1B; }

.lp-map-wrap { position: relative; min-height: 460px; }
.lp-map { position: absolute; inset: 0; border: 1px solid #DDE5EB; border-radius: 16px; overflow: hidden; background: #E9EFF3; }
.lp-map-hint { position: absolute; left: 12px; top: 12px; right: 56px; width: fit-content; margin: 0; padding: 6px 12px; background: rgba(255, 255, 255, 0.94); border-radius: 9999px; font-size: 12.5px; color: #2E3B44; pointer-events: none; }
.lp-marker { width: 30px; height: 30px; border: 2px solid #FFFFFF; border-radius: 50%; background: #0E1F2F; color: #FFFFFF; font: 600 13px/26px "Space Grotesk", sans-serif; text-align: center; cursor: grab; box-shadow: 0 1px 4px rgba(14, 31, 47, 0.4); }

.lp-results { margin-top: 20px; display: grid; gap: 20px; }
.lp-results[hidden] { display: none; }
.lp-card { padding: 20px; min-width: 0; }
.lp-card h2 { margin: 0 0 12px; font-family: "Space Grotesk", sans-serif; font-size: 1.0625rem; font-weight: 600; }
.lp-verdict-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.lp-verdict-card p { margin: 0; }
.lp-badge { padding: 6px 14px; border-radius: 9999px; font-family: "Space Grotesk", sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: #FFFFFF; }
.lp-badge[data-verdict="CLEAR"] { background: #047857; }
.lp-badge[data-verdict="MARGINAL"] { background: #B45309; }
.lp-badge[data-verdict="BLOCKED"] { background: #B91C1C; }
.lp-preliminary { width: 100%; font-size: 13px; font-weight: 500; color: #5F7381; }
.lp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.lp-stat { padding: 14px 16px; background: #FFFFFF; border: 1px solid #DDE5EB; border-radius: 12px; }
.lp-stat span { display: block; font-size: 12.5px; color: #5F7381; }
.lp-stat strong { display: block; margin-top: 2px; font-family: "Space Grotesk", sans-serif; font-size: 1.125rem; font-weight: 600; }
.lp-chart { position: relative; height: 340px; }
.lp-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.lp-scroll { overflow-x: auto; }
.lp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lp-table th { padding: 8px 10px; background: #F5F8FA; font-size: 12.5px; font-weight: 500; text-align: left; color: #5F7381; white-space: nowrap; }
.lp-table td { padding: 9px 10px; border-top: 1px solid #E9EFF3; }
.lp-table tr[data-selected] td { background: #F0FAFC; font-weight: 500; }
.lp-num { text-align: right !important; }
.lp-flags { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.lp-flags li { padding: 10px 12px; border-radius: 10px; background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; }
.lp-flags li[data-level="info"] { background: #F5F8FA; border-color: #DDE5EB; color: #2E3B44; }
.lp-explain { margin: 0; white-space: pre-line; line-height: 1.6; }
.lp-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.lp-actions button[disabled] { opacity: 0.6; cursor: wait; }
.lp-mine { margin-top: 20px; }
.lp-mine ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.lp-mine a { color: #027A99; font-weight: 500; }
.lp-mine span { color: #5F7381; }

.lp-dialog { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 16px; color: #0E1F2F; }
.lp-dialog::backdrop { background: rgba(14, 31, 47, 0.5); }
.lp-dialog h2 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 1.125rem; font-weight: 600; }
.lp-dialog label { margin-top: 12px; }
.lp-dialog .lp-error { margin: 12px 0 0; }
.lp-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.lp-eyebrow { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 500; color: #027A99; }
.lp-name { position: relative; }
.lp-suggest { position: absolute; z-index: 20; left: 0; right: 0; margin: 2px 0 0; padding: 4px; background: #FFFFFF; border: 1px solid #DDE5EB; border-radius: 8px; box-shadow: 0 4px 12px rgba(14, 31, 47, 0.12); list-style: none; }
.lp-suggest[hidden] { display: none; }
.lp-suggest button { width: 100%; padding: 6px 8px; border-radius: 6px; font-size: 13px; font-weight: 400; text-align: left; }
.lp-suggest button:hover { background: #F5F8FA; }
.lp-obstruction { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.lp-remove, .lp-add { font-size: 13px; font-weight: 500; color: #027A99; }
.lp-remove { height: 40px; color: #5F7381; }
.lp-remove:hover, .lp-add:hover { text-decoration: underline; }
.lp-add { justify-self: start; }
.lp-advanced { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #E9EFF3; font-size: 14px; }
.lp-advanced summary, .lp-path-data summary { font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 600; cursor: pointer; }
.lp-advanced-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 10px; }
.lp-map-toggle { position: absolute; left: 12px; bottom: 12px; display: flex !important; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(255, 255, 255, 0.94); border-radius: 9999px; }
.lp-path-data .lp-scroll { max-height: 360px; margin-top: 12px; overflow: auto; }
.lp-save-status { font-size: 13px; color: #5F7381; }
.lp-save-project select { height: 40px; margin-left: 4px; padding: 0 10px; background: #FFFFFF; border: 1px solid #DDE5EB; border-radius: 8px; font-size: 14px; }

.np-sector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; margin-bottom: 12px; padding: 12px; background: #F5F8FA; border-radius: 10px; }
.np-sector .lp-remove { justify-self: start; height: auto; }
.np-buttons { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.np-sites { display: grid; gap: 4px; max-height: 220px; overflow: auto; margin-top: 4px; }
.np-site-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; align-items: center; }
.np-site-row input[type="number"] { height: 32px; margin: 0; }
.lp-results .lp-card[hidden] { display: none; }

.lp-help { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 16px; height: 16px; margin: 0 4px; padding: 0; vertical-align: 1px; background: #E9EFF3; border: 0; border-radius: 50%; font: italic 600 11px/1 Georgia, serif; color: #445560; cursor: help; }
.lp-help::after { content: ""; position: absolute; inset: -8px; }
.lp-help:hover, .lp-help[aria-expanded="true"] { background: #027A99; color: #FFFFFF; }
.lp-help-panel { position: fixed; z-index: 60; display: grid; gap: 4px; width: min(300px, calc(100vw - 24px)); padding: 12px 14px; background: #0E1F2F; border-radius: 10px; box-shadow: 0 6px 20px rgba(14, 31, 47, 0.3); font: 400 13px/1.45 Inter, sans-serif; color: #FFFFFF; }
.lp-help-panel[hidden] { display: none; }
.lp-help-panel strong { font-weight: 600; }
.lp-table th .lp-help { font-weight: 600; }
#lp-budget td { white-space: nowrap; }

@media (max-width: 900px) {
  .lp-top { grid-template-columns: minmax(0, 1fr); }
  .lp-map-wrap { min-height: 340px; order: -1; }
  .lp-chart { height: 280px; }
}
@media (max-width: 380px) {
  .lp fieldset { grid-template-columns: minmax(0, 1fr); }
}
