/* WPCN Development Tracker: map, cards, and project history pages */

/* Status badges (shared by cards, popups, history pages) */
.dev-status.st-proposed{background:#dbe8fb;color:#174a8c;}
.dev-status.st-approved{background:#d4edda;color:#145c32;}
.dev-status.st-construction{background:#fde4c8;color:#8a4600;}
.dev-status.st-completed{background:#ececec;color:#4a4a4a;}
.dev-status.st-on-hold{background:#fff3cd;color:#6b5200;}
.dev-status.st-withdrawn{background:#e2e2e2;color:#2e2e2e;}

/* Map section */
.map-section{background:var(--green-pale);border-bottom:1px solid var(--green-light);padding:1.25rem 2rem 1rem;}
.map-section-inner{max-width:1100px;margin:0 auto;}
.map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.6rem;flex-wrap:wrap;}
.map-title{font-family:var(--sans);font-size:.72rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--green-dark);}
.map-btn{font-family:var(--sans);font-size:.74rem;font-weight:600;color:var(--green-dark);background:#fff;border:1px solid var(--green-mid);border-radius:20px;padding:.38rem .9rem;cursor:pointer;min-height:34px;}
.map-btn:hover,.map-btn:focus-visible{background:var(--green-dark);color:#fff;}
#dev-map-wrap{position:relative;}
#dev-map{height:300px;border-radius:8px;border:1px solid #cfdcd4;background:#e9efe9;overflow:hidden;z-index:1;}
@media(min-width:801px){#dev-map{height:460px;}}
#dev-map-wrap.expanded{position:fixed;inset:0;z-index:400;background:#fff;padding:.5rem;}
#dev-map-wrap.expanded #dev-map{height:100%;border-radius:6px;}
#dev-map-wrap.expanded .map-btn-float{display:inline-block;}
.map-btn-float{display:none;position:absolute;left:50%;transform:translateX(-50%);top:1rem;z-index:1000;box-shadow:0 2px 10px rgba(0,0,0,.25);}
.map-hint{font-family:var(--sans);font-size:.7rem;color:var(--gray);margin:.45rem 0 0;}
.map-unmapped{font-family:var(--sans);font-size:.7rem;color:var(--gray);margin:.35rem 0 0;}
.map-unmapped a{color:var(--green-mid);}
.dm-fallback{display:flex;align-items:center;justify-content:center;height:100%;padding:1rem;text-align:center;font-family:var(--sans);font-size:.85rem;color:var(--gray);}

/* Legend */
#dev-legend{margin-top:.8rem;}
.legend-row{display:flex;gap:.5rem 1rem;flex-wrap:wrap;align-items:center;margin-bottom:.45rem;}
.legend-swatch{width:12px;height:12px;border-radius:3px;display:inline-block;flex:none;}
.legend-line{width:18px;height:0;border-top:3px solid;display:inline-block;}
.legend-line.dashed{border-top-style:dashed;}
.legend-fill{width:16px;height:12px;background:rgba(155,227,143,.55);border:2px solid #7b2cbf;display:inline-block;border-radius:2px;}
.legend-dot-approx{width:12px;height:12px;border-radius:50%;border:2px dashed #555;display:inline-block;}
.legend-note{font-family:var(--sans);font-size:.7rem;color:#555;line-height:1.5;margin-top:.2rem;}
.legend-note a{color:var(--green-mid);}

/* Leaflet popups and tooltips */
.dm-pop{font-family:var(--sans);font-size:.8rem;line-height:1.45;color:#222;}
.dm-pop p{margin:.35rem 0;}
.dm-pop-status{display:inline-block;color:#fff;font-size:.58rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;padding:.15rem .45rem;border-radius:2px;}
.dm-pop-name{font-family:var(--serif);font-size:1rem;font-weight:700;color:var(--green-dark);margin-top:.35rem;}
.dm-pop-note{font-size:.72rem;color:#7a4b00;}
.dm-pop-link{display:block;margin-top:.3rem;font-weight:600;color:var(--green-mid)!important;}
.dm-tip{font-family:var(--sans);font-size:.72rem;}
.leaflet-control-layers{font-family:var(--sans);font-size:.78rem;}
.leaflet-container a.leaflet-popup-close-button{width:28px;height:28px;font-size:20px;}

/* Cards */
.project-card{display:flex;flex-direction:column;}
.project-card .project-card-body{flex:1;display:flex;flex-direction:column;}
.project-card .timeline{margin-bottom:1rem;}
.timeline-item.upcoming::before{background:#fff;border-color:#1f6fd1;border-style:dashed;}
.tl-sched{font-weight:700;color:#174a8c;text-transform:uppercase;font-size:.6rem;letter-spacing:.1em;}
.card-note{font-family:var(--sans);font-size:.7rem;color:#7a4b00;background:#fff8ec;border-radius:4px;padding:.4rem .6rem;margin-bottom:.8rem;}
.card-actions{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:auto;padding-top:.4rem;}
.card-action{font-family:var(--sans);font-size:.72rem;font-weight:600;color:var(--green-dark);background:#fff;border:1px solid #cfdcd4;border-radius:20px;padding:.4rem .8rem;text-decoration:none;cursor:pointer;min-height:34px;display:inline-flex;align-items:center;}
.card-action:hover,.card-action:focus-visible{border-color:var(--green-dark);background:var(--green-pale);}
.card-action.card-primary{background:var(--green-dark);color:#fff;border-color:var(--green-dark);}
.card-action.card-primary:hover{background:var(--green-mid);}
.card-unmapped{font-family:var(--sans);font-size:.66rem;color:#5f5f5f;align-self:center;}
.card-updated{font-family:var(--sans);font-size:.64rem;color:#5f5f5f;margin-top:.7rem;}
.load-error{grid-column:1/-1;font-family:var(--sans);font-size:.9rem;padding:1.2rem;background:#fff8ec;border-radius:6px;}

/* Project history page */
.ph-wrap{max-width:860px;margin:0 auto;padding:2.2rem 2rem 4rem;}
.ph-section{margin-top:2.2rem;}
.ph-section h2{font-family:var(--serif);font-size:1.35rem;color:var(--green-dark);margin-bottom:.7rem;padding-bottom:.4rem;border-bottom:2px solid var(--green-light);}
.ph-section p{font-family:var(--serif-body);font-size:.95rem;line-height:1.75;color:#222;margin-bottom:.8rem;}
.ph-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.6rem 1.2rem;background:var(--green-pale);border-radius:8px;padding:1rem 1.2rem;margin-top:1rem;}
.ph-fact .k{font-family:var(--sans);font-size:.6rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--gray);}
.ph-fact .v{font-family:var(--sans);font-size:.85rem;color:#111;}
#ph-map{height:280px;border-radius:8px;border:1px solid #cfdcd4;margin-top:1rem;}
@media(min-width:801px){#ph-map{height:360px;}}
.ph-terms{padding-left:1.2rem;font-family:var(--serif-body);font-size:.92rem;line-height:1.7;}
.ph-terms li{margin-bottom:.45rem;}
.ph-tl{list-style:none;border-left:2px solid var(--green-light);margin-left:.4rem;padding-left:1.1rem;}
.ph-tl li{position:relative;margin-bottom:.5rem;}
.ph-tl li::before{content:"";position:absolute;left:-1.55rem;top:.95rem;width:10px;height:10px;border-radius:50%;background:var(--green-light);border:2px solid var(--green-mid);}
.ph-tl li.upcoming::before{background:#fff;border:2px dashed #1f6fd1;}
.ph-tl details{background:#fff;border:1px solid #e0e8e4;border-radius:6px;}
.ph-tl summary{cursor:pointer;padding:.65rem .9rem;font-family:var(--sans);font-size:.85rem;color:#222;list-style:none;display:flex;gap:.6rem;align-items:baseline;flex-wrap:wrap;}
.ph-tl summary::-webkit-details-marker{display:none;}
.ph-tl summary::after{content:"+";margin-left:auto;font-weight:700;color:var(--green-mid);}
.ph-tl details[open] summary::after{content:"\2212";}
.ph-tl .d{font-weight:700;color:var(--green-dark);white-space:nowrap;}
.ph-tl .body{padding:0 .9rem .8rem;font-family:var(--serif-body);font-size:.88rem;line-height:1.65;color:#333;}
.ph-tl .body p{font-size:.88rem;margin-bottom:.5rem;}
.ph-tl .lbl{font-family:var(--sans);font-size:.62rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--gray);display:block;}
.ph-tl .links a{font-family:var(--sans);font-size:.78rem;color:var(--green-mid);display:inline-block;margin-right:.8rem;}
.ph-tl .plain{padding:.65rem .9rem;font-family:var(--sans);font-size:.85rem;border:1px solid #eef2ef;border-radius:6px;display:flex;gap:.6rem;flex-wrap:wrap;}
.ph-tl-tools{display:flex;gap:.5rem;margin-bottom:.8rem;}
.ph-docs{list-style:none;display:grid;gap:.7rem;}
.ph-docs li{border:1px solid #e0e8e4;border-radius:6px;padding:.8rem 1rem;}
.ph-docs .t{font-family:var(--sans);font-size:.9rem;font-weight:600;}
.ph-docs .t a{color:var(--green-dark);}
.ph-docs .m{font-family:var(--sans);font-size:.7rem;color:var(--gray);margin:.2rem 0;}
.ph-docs .x{font-family:var(--serif-body);font-size:.84rem;color:#444;line-height:1.55;}
.ph-disclaimer{font-family:var(--sans);font-size:.72rem;color:#555;background:#f6f6f2;border-radius:6px;padding:.7rem .9rem;margin-top:1rem;line-height:1.55;}
.ph-related a{font-family:var(--sans);font-size:.85rem;color:var(--green-mid);display:block;margin-bottom:.35rem;}
.ph-notfound{font-family:var(--sans);padding:3rem 0;}
@media(max-width:560px){.ph-wrap{padding:1.6rem 1rem 3rem;}.map-section{padding:1rem 1rem .8rem;}}
@media(max-width:560px){.page-header{padding:1.8rem 1rem 1.6rem;}.page-header .page-desc{font-size:.92rem;line-height:1.6;}}
.main-content > .section-heading:first-child{margin-top:0;}
