:root{
  --bg:#f7f7f9;
  --card:#ffffff;
  --accent:#0b74de;
  --muted:#6b6b6b;
  --gap:14px;
  --bmc-yellow:#FFDD57;
  --bmc-orange:#FFB347;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:#111;line-height:1.35}

/* Top header */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 18px;
  background:#fff;
  border-bottom:1px solid #e6e6e6;
  position:sticky;
  top:0;
  z-index:20;
}
.brand{font-weight:700;font-size:18px;color:var(--accent)}
.top-actions{display:flex;align-items:center;gap:12px}

/* filter buttons in header */
.filter-group{display:flex;gap:6px}
.filter-btn{
  background:transparent;border:1px solid #ddd;padding:6px 8px;border-radius:6px;color:var(--muted);cursor:pointer;font-size:13px;
}
.filter-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}

/* primary buttons */
.btn-primary{background:var(--accent);color:#fff;border:none;padding:8px 12px;border-radius:8px;cursor:pointer}
.btn-secondary{background:transparent;border:1px solid #ddd;padding:6px 10px;border-radius:8px;cursor:pointer}

/* layout */
.main{display:flex;gap:20px;padding:18px}
.panel{
  width:380px;
  background:var(--card);
  border:1px solid #e8e8e8;
  border-radius:8px;
  padding:12px;
  box-shadow:0 6px 18px rgba(10,10,10,0.06);
  position:relative;
}
.panel.hidden{display:none}
.panel-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.close-btn{background:transparent;border:0;font-size:18px;cursor:pointer}

/* form */
.spot-form label{display:block;margin-top:8px;font-size:13px;color:var(--muted)}
.spot-form input[type="text"], .spot-form input[type="number"], .spot-form textarea, .spot-form select{
  width:100%;padding:8px;border:1px solid #e1e1e1;border-radius:6px;margin-top:6px;background:#fff;
}
.map-picker{height:180px;margin-top:8px;border-radius:6px;overflow:hidden}

/* content */
.content{flex:1;min-width:0}
.main-map{height:420px;border-radius:8px;overflow:hidden;border:1px solid #e6e6e6}

/* helpers */
.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.form-actions{display:flex;gap:8px;margin-top:12px;justify-content:flex-end}
@media (max-width:900px){
  .main{flex-direction:column;padding:12px}
  .panel{width:100%}
  .top-actions{flex-wrap:wrap}
}

/* marker with centered badge */
.custom-marker-wrap { background: transparent; }
.marker-with-badge {
  position: relative;
  display: inline-block;
  width: 25px;   /* match displayed marker width */
  height: 41px;  /* match displayed marker height */
  line-height: 0;
}
.marker-with-badge .marker-icon {
  width: 25px;
  height: 41px;
  display: block;
}
.marker-with-badge .marker-shadow {
  position: absolute;
  left: 0;
  top: 0;
  width: 41px; /* keep shadow a bit wider so it sits under the pin */
  opacity: 0.8;
  transform: translateY(6px);
  pointer-events: none;
  z-index: 0;
}
/* badge centered horizontally above the pin tip */
.marker-with-badge .price-badge {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -12px;            /* tweak to raise/lower the badge */
  z-index: 10;
  color: #fff;
  padding: 6px 6px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  white-space: nowrap;
  pointer-events: none;
}
.leaflet-container .custom-marker-wrap { background: transparent; }

/* popup card styling (icons + rows) */
.leaflet-popup-content-wrapper { padding: 8px 10px; border-radius: 8px; }
.popup-card { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #111; }
.popup-title { font-weight: 800; margin-bottom: 4px; font-size: 15px; }
.popup-location { font-size: 13px; color: #666; margin-bottom: 6px; }
.popup-when { font-size: 12px; color: #444; margin-bottom: 8px; }

.popup-details { display:flex; flex-direction:column; gap:6px; margin-bottom:8px; }
.popup-row { display:flex; gap:8px; align-items:center; font-size:13px; color: #222; }
.popup-icon { width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; font-size:14px; }
.popup-label { font-weight:700; color:#333; min-width:74px; }
.popup-value { color:#111; flex:1; word-break:break-word; }

.popup-link { color: #0b74de; text-decoration: none; }
.popup-link:hover { text-decoration: underline; }

/* image preview inside popup */
.popup-image-wrap { margin-top:8px; text-align:center; }
.popup-image { max-width:100%; border-radius:8px; display:block; margin:0 auto; }

/* slightly smaller popup on mobile */
@media (max-width:480px){
  .leaflet-popup-content-wrapper { font-size:14px; }
  .popup-label { min-width:64px; font-size:13px; }
  .popup-row { gap:6px; }
}

/* below-map actions + Buy Me a Coffee button (BMC-focused styling) */
.below-map-actions{
  display:flex;
  gap:12px;
  align-items:center;
  margin:12px 0 28px 0;
  flex-wrap:wrap;
}
.below-map-actions .btn-primary{ padding:10px 14px; }

/* Buy Me a Coffee button: clear BMC-branded look */
.support-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:var(--bmc-yellow);
  color:#111;
  padding:8px 12px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  font-size:14px;
  box-shadow:0 4px 10px rgba(0,0,0,0.08);
  border:1px solid rgba(0,0,0,0.06);
  transition:transform .06s ease, box-shadow .12s ease, background .12s ease;
}
.support-link img{ height:18px; width:auto; display:inline-block; margin-left:4px; }

.support-link:hover,
.support-link:focus{
  background: linear-gradient(90deg,var(--bmc-yellow),var(--bmc-orange));
  transform: translateY(-1px);
  box-shadow:0 8px 20px rgba(0,0,0,0.12);
}

.support-link .support-note{
  font-size:12px;
  font-weight:600;
  color:#222;
  opacity:0.9;
  margin-left:6px;
}

@media (max-width:700px){
  .topbar{
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    gap: 8px;
  }
  .brand{ margin-bottom: 6px; }

  .top-actions{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .filter-group{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .filter-btn{
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    font-size: 14px;
  }

  .top-actions .btn-primary{
    width: 100%;
    padding: 10px 12px;
    text-align: center;
  }

  .below-map-actions{
    flex-direction:column;
    align-items:stretch;
  }
  .support-link{ justify-content:center; width:100%; }
  #toggle-form-btn{ width:100%; }
}

/* accessibility: focus ring */
.support-link:focus{ outline:3px solid rgba(11,116,222,0.18); outline-offset:3px; }

/* "Park here" action/link inside popup */
.popup-actions { margin-top:10px; display:flex; gap:8px; }
.popup-action {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:8px;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  color:var(--accent);
  background:rgba(11,116,222,0.06);
  border:1px solid rgba(11,116,222,0.12);
}
.popup-action:focus, .popup-action:hover { box-shadow:0 6px 18px rgba(11,116,222,0.08); transform:translateY(-1px); }

/* park action specific */
.popup-action-park { background: linear-gradient(90deg, #e6f4ff, #dff2ff); color: #0b74de; border-color: rgba(11,116,222,0.16); }

/* small icon spacing */
.popup-action .popup-action-text{ display:inline-block; }

.top-actions{ display:flex; align-items:center; gap:12px; position:relative; }
.search-form{ display:flex; align-items:center; gap:8px; position:relative; z-index:25; }
.search-form input[type="search"]{
  padding:8px 10px;
  border-radius:8px;
  border:1px solid #e1e1e1;
  min-width:220px;
  background:#fff;
  font-size:16px; /* prevent mobile browsers (iOS Safari/Android) from zooming input on focus */
  -webkit-text-size-adjust:100%;
  -moz-text-size-adjust:100%;
  text-size-adjust:100%;
}
.search-form{ display:flex; align-items:center; gap:8px; position:relative; z-index:3000; }
.search-results{
  position:absolute;
  top:44px;
  left:0;
  width:320px;
  max-width:calc(100vw - 36px);
  background:#fff;
  border:1px solid #eee;
  border-radius:8px;
  box-shadow:0 8px 20px rgba(0,0,0,0.06);
  display:none;
  overflow:visible; /* allow visible shadows */
  z-index:10050; /* ensure dropdown sits above Leaflet/map layers */
}
.search-results .result{
  padding:10px 12px;
  cursor:pointer;
  border-bottom:1px solid #f4f5f6;
  font-size:13px;
}
.search-results .result:hover{ background:#f6fbff; }

/* small screens: make search input stretch */
@media (max-width:700px){
  .search-form input[type="search"]{ min-width:0; width:100%; }
  .search-results{ left:0; right:0; width:auto; }
}

/* ensure header and search dropdown render above the Leaflet map */
.topbar {
  /* keep sticky behavior but raise stacking context above the map */
  position: sticky;
  top: 0;
  z-index: 100500; /* was 20 */
}

/* make sure the form and dropdown are in a higher stacking context */
.search-form { position: relative; z-index: 100600; }
.search-results { position: absolute; z-index: 100700; }

/* reduce Leaflet container stacking so header/dropdown can appear above it */
.leaflet-container { z-index: 0; }
/* ...existing code... */

@media (max-width:700px){
  /* ensure search sits flush left on small screens */
  .search-form{
    width:100%;
    justify-content:flex-start;
    align-items:center;
    margin-left:0;
    padding-left:0;
  }

  /* make dropdown align to the left edge of the screen/form */
  .search-results{
    left:0;
    right:auto;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }
}

.main{
  display:flex;
  gap:20px;
  padding:18px 8px; /* reduced left/right padding for large screens */
}
@media (max-width:900px){
  .main{flex-direction:column;padding:12px 8px} /* reduced horizontal padding for small screens */
  .panel{width:100%}
  .top-actions{flex-wrap:wrap}
}

@media (min-width:1200px){
  .search-form input[type="search"]{
    min-width:420px;
    width:420px;
  }
  .search-results{
    width:420px;
    max-width:420px;
  }
}

/*** logo styles ***/
.logo-cool {
  font-family: 'Segoe UI', 'Arial Rounded MT Bold', Arial, sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-bottom: 8px;
  user-select: none;
  word-spacing: 0;
  letter-spacing: -0.01em;
}
.logo-main {
  color: #2F5FC0;      /* blue for "Park" */
  font-weight: 700;
  margin-right: 0;
}
.logo-dot {
  color: #6FA8FF;      /* orange for "In" */
  font-weight: 700;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  letter-spacing: 0;
  box-shadow: none;
}
.logo-city {
  color: #2F5FC0;      /* green for "Dublin" */
  font-weight: 700;
  margin-left: 0;
}
.logo-ie {
  color: #8A8A8A;
  font-size: 1em;
  font-weight: 700;
  margin-left: 0;
  opacity: 0.7;
}
@media (max-width: 600px) {
  .logo-cool { 
    font-size: 1.6rem;
    letter-spacing: -0.01em;
   }
}


/** footer **/
.site-footer {
  background: #f7f7f9;
  color: #555;
  font-size: 15px;
  padding: 14px 0 10px 0;
  border-top: 1px solid #e6e6e6;
  margin-top: 40px;
  text-align: center;
}
.footer-content.footer-inline {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.footer-link {
  color: #0b74de;
  text-decoration: none;
  font-weight: 500;
}
.footer-link:hover {
  text-decoration: underline;
}
.footer-separator {
  color: #bbb;
  font-size: 15px;
}
.footer-copyright {
  font-size: 14px;
  color: #888;
}
@media (max-width: 600px) {
  .footer-content.footer-inline {
    flex-direction: column;
    gap: 2px;
  }
  .footer-separator {
    display: none;
  }
}

/** FAQ section **/
.faq-section {
  max-width: 700px;
  margin: 40px auto 32px auto;
  padding: 0 12px;
  text-align: left;                /* Align content to the left */
  font-size: 15px;                 /* Smaller font */
  color: #555;                     /* Softer font color */
  font-weight: 400;                /* Lighter font weight */
}
.faq-section h2 {
  font-size: 1.18rem;              /* Smaller heading */
  margin-bottom: 1.2em;
  text-align: left;                /* Align heading left */
  color: #444;                     /* Softer heading color */
  font-weight: 600;
}
.faq-list details {
  margin-bottom: 0.6em;
  border-radius: 6px;
  background: #f8fafd;
  border: 1px solid #e3e8ee;
  padding: 0.6em 0.9em;
  transition: box-shadow 0.2s;
  font-size: 0.98em;               /* Slightly smaller */
  color: #555;
}
.faq-list details[open] {
  box-shadow: 0 2px 12px #0b74de0a;
  background: #f5f8fc;
}
.faq-list summary {
  font-weight: 500;
  font-size: 1em;
  cursor: pointer;
  outline: none;
  color: #333;
}
.faq-list p {
  margin: 0.6em 0 0 0;
  font-size: 0.97em;
  color: #666;
  font-weight: 400;
}