/* ============================================================
   bine-impreuna.css — pagina proiectului „Bine Împreună"
   Harta și panoul sunt monocrome (negru/gri); singurele culori
   sunt accentele UI ale site-ului și culorile pinului de adunare (portocaliu/albastru).
   ============================================================ */

.bi-page {
  --bi-bg: #0e0e0e;
  --bi-surface: #171717;
  --bi-surface-2: #222;
  --bi-line: #333;
  --bi-text: #f4f4f4;
  --bi-muted: #bdbdbd;
  --bi-pin-color: #EF7D00;
  --bi-pin-dark: #B45309;   /* portocaliu închis: contrast AA cu text alb */
  --bi-warn: #ffd166;
  --bi-error: #ff8a8a;
}

.bi-page [hidden] { display: none !important; }

.bi-page main h1, .bi-page section h1, .bi-page section h2, .bi-page aside h2, .bi-how-num {
  font-family: 'Fredoka', 'Segoe UI', sans-serif;
  font-weight: 600;
}

/* ── Hero ── */
.bi-hero {
  background: radial-gradient(120% 140% at 85% 0%, #2a2a2a 0%, #111 55%, #0a0a0a 100%);
  color: var(--bi-text);
  padding: 40px 0 36px;
}
.bi-hero .breadcrumb, .bi-hero .breadcrumb a { color: var(--bi-muted); }
.bi-hero .breadcrumb a:hover { color: #fff; }
.bi-hero h1 { color: #fff; font-size: clamp(2.2rem, 7vw, 3.6rem); margin: 6px 0 12px; }
.bi-eyebrow { color: #9fd894; font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; margin-top: 18px; }
.bi-lead { color: #dcdcdc; font-size: 1.08rem; max-width: 640px; line-height: 1.6; }
.bi-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 24px; }
.bi-hero-actions .btn { white-space: normal; text-align: center; }
.bi-hero-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.bi-hero-meta { color: var(--bi-muted); font-size: .85rem; margin-top: 22px; }

/* ── Secțiunea hartă ── */
.bi-map-section {
  position: relative;
  height: calc(100svh - var(--nav-height));
  min-height: 560px;
  max-height: 980px;
  background: var(--bi-bg);
  overflow: hidden;
  color: var(--bi-text);
  scroll-margin-top: var(--nav-height);
}
.bi-map { position: absolute; inset: 0; }
.bi-map-error { color: var(--bi-text); padding: 40px 20px; text-align: center; }

.bi-demo-banner {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 4; background: #3a3000; color: #ffe9a8; border: 1px solid #6b5a10;
  border-radius: 999px; padding: 6px 14px; font-size: .78rem; max-width: calc(100% - 120px); text-align: center;
}

/* ── Controale ── */
.bi-controls {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  display: flex; flex-direction: column; gap: 6px;
}
.bi-ctrl {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: rgba(23,23,23,.92);
  color: var(--bi-text);
  border: 1px solid var(--bi-line);
  border-radius: 10px;
  font-size: 1.3rem; line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  font-family: inherit;
}
.bi-ctrl-text { font-size: .85rem; font-weight: 700; }
.bi-ctrl:hover { background: #2b2b2b; }
.bi-ctrl:disabled { opacity: .5; cursor: progress; }

.bi-page :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.bi-page .section :focus-visible, .bi-page .bi-funding :focus-visible { outline-color: var(--brand-green-dark); }

.bi-crosshair {
  display: none;
  position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  z-index: 2; pointer-events: none; opacity: .55;
  background:
    linear-gradient(#fff, #fff) center / 2px 100% no-repeat,
    linear-gradient(#fff, #fff) center / 100% 2px no-repeat;
}
.bi-map-section:has(.bi-panel.is-picking) .bi-crosshair { display: block; }

.bi-toast {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 6; background: #f4f4f4; color: #111; padding: 10px 16px; border-radius: 10px;
  font-size: .88rem; box-shadow: 0 6px 24px rgba(0,0,0,.4); max-width: calc(100% - 32px);
}

/* ── Panou ── */
.bi-panel {
  position: absolute; z-index: 5;
  left: 16px; top: 16px;
  width: 380px; max-height: calc(100% - 32px);
  overflow-y: auto; overscroll-behavior: contain;
  background: rgba(23,23,23,.96);
  border: 1px solid var(--bi-line);
  border-radius: 16px;
  padding: 18px 20px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
}
.bi-panel-handle { display: none; }
.bi-panel-title { font-size: 1.35rem; color: #fff; margin: 4px 0 8px; }
.bi-panel-title:focus { outline: none; }
.bi-panel-text { color: #dedede; font-size: .92rem; line-height: 1.55; margin-bottom: 12px; }
.bi-address { font-weight: 700; color: #fff; margin-bottom: 8px; }

.bi-progress { display: flex; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; counter-reset: bi; }
.bi-progress li {
  flex: 1; font-size: .7rem; color: #8f8f8f; padding-top: 7px;
  border-top: 3px solid var(--bi-line); counter-increment: bi;
}
.bi-progress li::before { content: counter(bi) ". "; }
.bi-progress li.is-done { color: var(--bi-muted); border-top-color: #9a9a9a; }
.bi-progress li.is-current { color: #fff; border-top-color: #fff; font-weight: 700; }
.bi-panel:has([data-step="done"]:not([hidden])) .bi-progress li { border-top-color: #9a9a9a; }

.bi-label { display: block; font-size: .8rem; font-weight: 700; color: #e6e6e6; margin-bottom: 6px; }
.bi-input {
  width: 100%; min-width: 0;
  background: var(--bi-surface-2); color: #fff;
  border: 1px solid #4a4a4a; border-radius: 10px;
  padding: 11px 12px; font-size: 1rem; font-family: inherit;
}
.bi-input::placeholder { color: #8c8c8c; }
.bi-input:focus { border-color: #fff; }
.bi-input[aria-invalid="true"] { border-color: var(--bi-error); }
.bi-input-light { background: #fff; color: var(--text-dark); border-color: var(--border); }
.bi-input-light::placeholder { color: #8a8f98; }

.bi-combo { position: relative; display: flex; gap: 8px; }
.bi-suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 10;
  list-style: none; margin: 0; padding: 4px;
  background: #1f1f1f; border: 1px solid #4a4a4a; border-radius: 10px;
  max-height: 260px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.bi-sugg { padding: 9px 10px; border-radius: 7px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.bi-sugg:hover, .bi-sugg.is-active { background: #333; }
.bi-sugg-main { color: #fff; font-size: .92rem; }
.bi-sugg-detail { color: #a8a8a8; font-size: .76rem; }
.bi-sugg.is-outside .bi-sugg-main { color: #a8a8a8; }

.bi-status { min-height: 1.2em; font-size: .82rem; color: var(--bi-muted); margin-top: 8px; }
.bi-status.is-error { color: var(--bi-error); }
.section .bi-status { color: var(--text-gray); }

.bi-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 16px;
  border-radius: 10px; border: 1px solid #5a5a5a;
  background: transparent; color: #fff;
  font-weight: 700; font-size: .9rem; font-family: inherit;
  cursor: pointer; text-align: center;
}
.bi-btn:hover { background: #2a2a2a; }
.bi-btn-primary { background: #f4f4f4; color: #111; border-color: #f4f4f4; }
.bi-btn-primary:hover { background: #fff; }
.bi-btn:disabled { opacity: .45; cursor: not-allowed; }
.bi-btn-sm { min-height: 34px; padding: 6px 12px; font-size: .8rem; }
.bi-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.bi-link {
  background: none; border: 0; padding: 8px 0; color: #e6e6e6;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  font-size: .85rem; font-family: inherit; text-align: left;
}
.bi-link:hover { color: #fff; }

.bi-distance {
  font-size: .88rem; line-height: 1.5; padding: 10px 12px; border-radius: 10px;
  background: var(--bi-surface-2); border-left: 4px solid #9a9a9a; color: #e6e6e6;
}
.bi-distance[data-level="ok"] { border-left-color: #9fd894; }
.bi-distance[data-level="warn"] { border-left-color: var(--bi-warn); }
.bi-distance[data-level="error"] { border-left-color: var(--bi-error); }

.bi-mini-guide { margin-top: 12px; font-size: .85rem; color: #dcdcdc; }
.bi-mini-guide summary { cursor: pointer; font-weight: 700; color: #fff; padding: 4px 0; }
.bi-mini-guide ul { margin: 6px 0 6px 18px; list-style: disc; display: grid; gap: 4px; }
.bi-mini-guide a { color: #fff; }

.bi-checklist { border: 1px solid var(--bi-line); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.bi-checklist legend { font-size: .82rem; font-weight: 700; color: #fff; padding: 0 4px; }
.bi-checklist label { display: flex; gap: 8px; align-items: flex-start; font-size: .83rem; color: #dcdcdc; padding: 4px 0; line-height: 1.4; }
.bi-check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: #e6e6e6; margin: 10px 0; line-height: 1.45; }
.bi-check a { color: #fff; }
.bi-page input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; accent-color: #f4f4f4; }
.bi-req { color: var(--bi-error); }
.bi-field { margin: 12px 0; }
.bi-help { font-size: .78rem; color: #b3b3b3; margin-top: 5px; }
.bi-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bi-captcha { margin: 12px 0; min-height: 65px; }
.bi-disclaimer { font-size: .8rem; color: #d0d0d0; border-top: 1px solid var(--bi-line); padding-top: 10px; margin-top: 12px; }
.bi-form-error { color: #111; background: var(--bi-error); padding: 9px 12px; border-radius: 8px; font-size: .86rem; margin-top: 10px; }

.bi-covered {
  background: #fff4e6; color: #3d2400; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
  border-left: 5px solid var(--bi-pin-color); font-size: .9rem; line-height: 1.5;
}
.bi-covered strong { display: block; margin-bottom: 4px; color: #111; }
.bi-covered a { color: #7a3d00; font-weight: 700; text-decoration: underline; }

.bi-notice {
  background: #f4f4f4; color: #111; border-radius: 10px; padding: 12px 14px;
  font-size: .92rem; line-height: 1.5; font-weight: 600; margin-bottom: 12px;
  border-left: 5px solid var(--bi-pin-color);
}

.bi-dialog {
  margin: auto; /* resetarea globală (* { margin: 0 }) anulează centrarea implicită */
  border: 0; border-radius: 16px; padding: 24px 22px 20px;
  width: min(380px, calc(100vw - 32px));
  background: #fff; color: var(--text-dark); text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.bi-dialog::backdrop { background: rgba(0,0,0,.6); }
.bi-dialog img { display: block; margin: 0 auto 10px; border-radius: 12px; }
.bi-dialog h2 { font-size: 1.35rem; margin: 0 0 8px; color: #111; }
.bi-dialog p { font-size: .98rem; line-height: 1.55; color: #374151; margin-bottom: 18px; }
.bi-dialog .bi-btn-primary { background: #111; color: #fff; border-color: #111; min-width: 160px; }
.bi-dialog .bi-btn-primary:hover { background: #333; }
.bi-dialog :focus-visible { outline-color: #111; }

.bi-code-box { background: var(--bi-surface-2); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.bi-code-box code { font-size: 1rem; letter-spacing: .06em; color: #fff; word-break: break-all; }

/* ── Pinul punct de adunare (stări) ──
   Atenție: MapLibre poziționează elementul rădăcină cu transform,
   de aceea animațiile se aplică doar copiilor. */
/* fără position aici: MapLibre setează .maplibregl-marker { position: absolute } */
.bi-pin { display: flex; flex-direction: column; align-items: center; width: 48px; cursor: grab; }
.bi-pin:active { cursor: grabbing; }
.bi-pin-sign {
  width: 46px; height: 46px; padding: 1px; border-radius: 9px; background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.55);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s;
}
.bi-pin-sign img { width: 100%; height: 100%; display: block; border-radius: 8px; pointer-events: none; }
.bi-pin-stem { width: 3px; height: 14px; background: #f4f4f4; border-radius: 0 0 2px 2px; transition: height .18s; }
.bi-pin-badge {
  display: none; position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: var(--bi-pin-dark); font-weight: 900; font-size: 14px;
  align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.bi-pin--selected .bi-pin-sign { transform: scale(1.12); box-shadow: 0 0 0 3px #0e0e0e, 0 0 0 6px #fff, 0 6px 18px rgba(0,0,0,.6); }
.bi-pin--moving .bi-pin-sign { transform: translateY(-12px) scale(1.18); opacity: .88; box-shadow: 0 22px 26px rgba(0,0,0,.65); }
.bi-pin--moving .bi-pin-stem { height: 26px; }
.bi-pin--saved { cursor: default; }
/* propunere proprie, încă nemoderată: vizibilă doar în browserul autorului */
.bi-pin--pending { cursor: pointer; }
.bi-pin--pending .bi-pin-sign { opacity: .8; box-shadow: 0 0 0 2px #0e0e0e, 0 0 0 4px #bdbdbd; }
.bi-pin-tag {
  margin-top: 3px; padding: 1px 7px; border-radius: 999px;
  background: #f4f4f4; color: #111; font-size: 10px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
.bi-pin--saved .bi-pin-badge { display: flex; }

/* Markerul blocului */
.bi-bldg {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #f4f4f4; color: #111; border: 3px solid #0e0e0e;
  box-shadow: 0 3px 10px rgba(0,0,0,.6);
}
.bi-bldg.is-moving { cursor: grab; animation: bi-pulse 1.4s ease-out infinite; }
@keyframes bi-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
  100% { box-shadow: 0 0 0 16px rgba(255,255,255,0); }
}
@media (prefers-reduced-motion: reduce) {
  .bi-bldg.is-moving { animation: none; box-shadow: 0 0 0 4px #fff; }
  .bi-pin-sign, .bi-pin-stem { transition: none; }
}

.bi-me { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #0e0e0e; box-shadow: 0 0 0 6px rgba(255,255,255,.25); }

/* Popup */
.bi-page .maplibregl-popup-content { background: #1c1c1c; color: #eee; border-radius: 10px; padding: 12px 30px 12px 14px; box-shadow: 0 8px 26px rgba(0,0,0,.5); }
.bi-page .maplibregl-popup-tip { border-top-color: #1c1c1c !important; border-bottom-color: #1c1c1c !important; }
.bi-page .maplibregl-popup-close-button { color: #ddd; font-size: 20px; width: 30px; height: 30px; }
.bi-popup strong { display: block; margin-bottom: 4px; color: #fff; }
.bi-popup p { font-size: .82rem; line-height: 1.45; color: #d6d6d6; }
.bi-popup-note { color: #b3b3b3 !important; margin-top: 4px; }
.bi-page .maplibregl-ctrl-attrib { background: rgba(14,14,14,.8); color: #bbb; }
.bi-page .maplibregl-ctrl-attrib a { color: #ddd; }
.bi-page .maplibregl-ctrl-attrib-button { filter: invert(1); }

/* ── Mobil: panoul devine „bottom sheet" ── */
@media (max-width: 899px) {
  .bi-map-section { min-height: 600px; }
  .bi-panel {
    left: 0; right: 0; top: auto; bottom: 0; width: auto;
    max-height: 58%;
    border-radius: 18px 18px 0 0; border-bottom: 0;
    padding: 6px 16px 18px;
  }
  .bi-panel-handle {
    display: block; width: 100%; height: 26px; background: none; border: 0; cursor: pointer; padding: 0;
  }
  .bi-panel-handle span { display: block; width: 44px; height: 5px; border-radius: 3px; background: #666; margin: 8px auto; }
  .bi-panel.is-collapsed { max-height: 64px; overflow: hidden; }
  .bi-panel.is-picking { max-height: 44%; }
  .bi-demo-banner {
    left: 10px; right: 62px; transform: none; max-width: none;
    border-radius: 10px; font-size: .72rem; padding: 5px 10px; text-align: left;
  }
  .bi-controls { top: 10px; right: 10px; }
  .bi-ctrl { width: 40px; height: 40px; }
  .bi-crosshair { top: 28%; }
  .bi-toast { bottom: auto; top: 12px; }
}
@media (max-width: 380px) {
  .bi-combo { flex-direction: column; }
  .bi-actions .bi-btn { flex: 1 1 100%; }
}

/* ── Secțiunile de conținut ── */
.bi-narrow { max-width: 820px; }
.bi-how { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bi-how li { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; }
.bi-how h3 { font-size: 1.1rem; margin: 12px 0 6px; }
.bi-how p { color: var(--text-gray); font-size: .95rem; }
.bi-how-num {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #111; color: #fff; font-family: 'Fredoka', sans-serif; font-size: 1.2rem;
}
@media (max-width: 760px) { .bi-how { grid-template-columns: 1fr; } }

.bi-criteria { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.bi-criteria li {
  background: var(--bg-white); border: 1px solid var(--border); border-left: 4px solid var(--bi-pin-color);
  border-radius: var(--radius-sm); padding: 12px 14px; line-height: 1.55;
}
.bi-disclaimer-box { background: #fff7e0; border: 1px solid #f0d58a; border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; color: #5c4600; }
.bi-sources { font-size: .85rem; color: var(--text-gray); margin-top: 16px; }
.bi-sources a { color: var(--brand-green-dark); text-decoration: underline; }

.bi-faq { margin-top: 20px; display: grid; gap: 10px; }
.bi-faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-white); }
.bi-faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--text-dark); }
.bi-faq details > p, .bi-faq details > form { padding: 0 16px 14px; color: var(--text-gray); line-height: 1.6; }
.bi-faq a { color: var(--brand-green-dark); text-decoration: underline; }
.bi-delete-form .bi-label { color: var(--text-dark); }

.bi-funding { background: #f3f4f6; border-top: 1px solid var(--border); padding: 32px 0; }
.bi-funding-logos { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: stretch; }
.bi-funding-item { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bi-funding-item figcaption { font-size: .85rem; font-weight: 700; color: var(--text-dark); }
.bi-funding-item img {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  height: 110px; width: auto; object-fit: contain;
}
/* fișierele au margini albe mari: le decupăm vizual cu object-fit */
.bi-logo-ps1 { aspect-ratio: 16 / 7; object-fit: cover !important; }
.bi-logo-rerise { aspect-ratio: 1; padding: 6px; }
.bi-funding-note { color: var(--text-gray); font-size: .85rem; margin-top: 18px; }
@media (max-width: 480px) {
  .bi-funding-item img { height: 88px; }
}
