/* ═══════════════════════════════════════════════════════════════════
   ConstructInfo.ro — Hartă Interactivă — CSS Complet (F10)
   Mobile-First — Toate componentele stilizate
   Referință: 03-harta-spec.md secțiunea 4 + 03-harta-spec-layers-filters.md
   ═══════════════════════════════════════════════════════════════════ */

/* ── RESET ──────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════════
   MAP CONTAINER
   ═══════════════════════════════════════════════════════════════════ */

.map-container {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════════
   LOADING OVERLAY
   ═══════════════════════════════════════════════════════════════════ */

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 300;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E5E7EB;
  border-top-color: #B91C1C;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay p {
  margin-top: 16px;
  font-size: 14px;
  color: #6B7280;
}

/* ═══════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 90vw;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: center;
}

.toast-info {
  background: #1E40AF;
}

.toast-warning {
  background: #92400E;
}

.toast-error {
  background: #991B1B;
}

/* ═══════════════════════════════════════════════════════════════════
   SEARCH — Bară de căutare + rezultate
   ═══════════════════════════════════════════════════════════════════ */

.search-container {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 150;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 16px;
  font-size: 16px; /* Previne zoom pe iOS */
  border-radius: 24px;
  border: none;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  outline: none;
}

.search-input:focus {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 20px;
  color: #9CA3AF;
  cursor: pointer;
  display: none;
}

.search-clear:hover {
  color: #374151;
}

.search-results {
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  max-height: 50vh;
  background: white;
  border-radius: 12px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
}

.search-results.visible {
  display: block;
}

.result-item {
  padding: 16px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.15s;
}

.result-item:hover,
.result-item:focus,
.result-item.selected {
  background: #F3F4F6;
}

.result-item:last-child {
  border-bottom: none;
}

.result-item .result-icon {
  flex-shrink: 0;
  font-size: 16px;
}

.result-item .result-text {
  flex: 1;
  min-width: 0;
}

.result-item .result-name {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.result-item .result-type {
  font-size: 12px;
  color: #6B7280;
}

.result-item mark {
  background: #FEF3C7;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* ✨ v4.9a: Local infrastructure results */
.result-item.result-local {
  background: #FFFBEB;
}

.result-item.result-local:hover,
.result-item.result-local:focus,
.result-item.result-local.selected {
  background: #FEF3C7;
}

.result-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #92400E;
  background: #FDE68A;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
/* ✨ v4.9d: Badge project_id în rezultatele de căutare */
.result-tag-project {
  background: #DBEAFE;
  color: #1E40AF;
}

.result-separator {
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #F9FAFB;
  border-bottom: 1px solid #eee;
}

/* ═══════════════════════════════════════════════════════════════════
   LEGEND — Legendă hartă (✨ v4.8e: mutată în interiorul filter-panel)
   ═══════════════════════════════════════════════════════════════════ */

.legend-in-filters {
  padding: 0 16px 12px;
  border-top: 1px solid #E5E7EB;
}

.legend-content {
  padding: 4px 0;
}

.legend-group {
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
}

.legend-group:last-of-type {
  border-bottom: none;
}

.legend-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.legend-line {
  display: inline-block;
  flex-shrink: 0;
}

.legend-svg {
  flex-shrink: 0;
}

.legend-point {
  display: inline-block;
  flex-shrink: 0;
}

.legend-label {
  font-size: 12px;
  color: #374151;
  line-height: 1.3;
}

.legend-footer {
  padding-top: 10px;
  border-top: 1px solid #F3F4F6;
  margin-top: 4px;
}

.legend-footer p {
  font-size: 10px;
  color: #9CA3AF;
  margin: 2px 0;
}

/* ═══════════════════════════════════════════════════════════════════
   FILTER PANEL — Panoul de filtre (bottom sheet mobile)
   ═══════════════════════════════════════════════════════════════════ */

.filter-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: white;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filter-panel.open {
  transform: translateY(0);
}

/* ✨ v4.6j: Overlay semi-transparent pentru panoul de filtre */
.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.filter-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.filter-panel-handle {
  width: 40px;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  margin: 12px auto;
  flex-shrink: 0;
}

.filter-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 12px;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}

.filter-panel-header h2 {
  margin: 0;
  font-size: 18px;
}

.filter-close {
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-close:hover {
  color: #111827;
}

/* ✨ v4.8e: Scroll wrapper — body + legend scrollează împreună */
.filter-panel-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.filter-panel-body {
  padding: 16px;
}

.filter-panel-footer {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #E5E7EB;
  flex-shrink: 0;
}

.btn-primary {
  flex: 1;
  padding: 12px;
  min-height: 44px;
  background: #B91C1C;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: #991B1B;
}

.btn-primary:active {
  background: #7F1D1D;
}

.btn-secondary {
  flex: 1;
  padding: 12px;
  min-height: 44px;
  background: #F3F4F6;
  color: #374151;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: #E5E7EB;
}

.btn-secondary:active {
  background: #D1D5DB;
}

/* ── FILTER PANEL — Conținut secțiuni ──────────────────────────── */

.filter-section {
  padding: 16px 0;
  border-bottom: 1px solid #F3F4F6;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section-hidden {
  display: none;
}

.filter-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.filter-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
}

.filter-section-header .filter-section-title {
  margin-bottom: 0;
}

.filter-section-note {
  font-size: 11px;
  color: #9CA3AF;
  margin: -4px 0 8px;
}

/* Toggle grup (Rutier / Feroviar / Toate) */
.filter-toggle-group {
  display: flex;
  gap: 0;
  background: #F3F4F6;
  border-radius: 10px;
  padding: 3px;
}

.filter-toggle-btn-option {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.filter-toggle-btn-option.active {
  background: #FFFFFF;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-toggle-btn-option:hover:not(.active) {
  color: #374151;
}

.toggle-icon {
  font-size: 14px;
}

/* Checkbox list */
.filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 44px;
}

.filter-checkbox-item:hover {
  background: #F9FAFB;
}

.filter-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #B91C1C;
  cursor: pointer;
}

.filter-color-swatch {
  width: 24px;
  height: 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.filter-line-icon {
  width: 24px;
  text-align: center;
  font-size: 14px;
  color: #6B7280;
  flex-shrink: 0;
  font-family: monospace;
  letter-spacing: -1px;
}

.filter-checkbox-indicator {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid;
  flex-shrink: 0;
}

.filter-checkbox-label {
  font-size: 13px;
  color: #374151;
  line-height: 1.3;
}

.filter-select-all-btn {
  font-size: 11px;
  color: #B91C1C;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.filter-select-all-btn:hover {
  background: #FEF2F2;
}

/* ── Filter toggle button (FAB) ────────────────────────────────── */

.filter-toggle-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: var(--ci-red-700, #B91C1C);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.filter-toggle-btn:hover {
  background: #991B1B;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.filter-toggle-btn:active {
  background: #7F1D1D;
}

/* ═══════════════════════════════════════════════════════════════════
   MAP CONTROLS — Zoom + Geolocate (creat dinamic de map-init.js)
   ═══════════════════════════════════════════════════════════════════ */

.map-controls {
  position: absolute;
  right: 10px;
  bottom: 80px;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.map-controls button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin-bottom: 8px;
  border-radius: 8px;
  font-size: 20px;
  background: white;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s;
}

.map-controls button:hover {
  background: #F9FAFB;
}

.map-controls button:active {
  background: #F3F4F6;
}

/* ═══════════════════════════════════════════════════════════════════
   DETAIL PANEL — Panou detalii proiect (click pe segment)
   ═══════════════════════════════════════════════════════════════════ */

.detail-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 250;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.detail-panel.open {
  transform: translateY(0);
}

.detail-panel.expanded {
  max-height: 85vh;
}

.detail-panel-handle {
  width: 40px;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.detail-panel-header {
  display: flex;
  flex-direction: column;
  padding: 12px 16px 0;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.detail-panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-panel-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--ci-red-700, #B91C1C);
  flex: 1;
  padding-right: 8px;
}

.detail-panel-header .status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ⚠️ v4.6e NOTĂ DIVERGENȚĂ CULORI: Badge-urile din Detail Panel (verde pentru execuție,
   albastru pentru finalizat) NU corespund cu culorile din 06-branding.md (roșu pentru
   execuție, verde pentru finalizat). Divergența e intenționată:
   - Harta folosește paleta RYG (Red-Yellow-Green) standard geospațial
   - Branding-ul WordPress folosește culori de accent per categorie */
.status-badge.in-executie,
.status-badge.in-executie-high,
.status-badge.in-executie-mid,
.status-badge.in-executie-low { background: #D1FAE5; color: #065F46; }
.status-badge.finalizat       { background: #DBEAFE; color: #1E40AF; }
.status-badge.suspendat       { background: #FEE2E2; color: #991B1B; }
.status-badge.neatribuit      { background: #FEE2E2; color: #7F1D1D; }
.status-badge.in-licitatie    { background: #FEF3C7; color: #92400E; }
.status-badge.planificat      { background: #E5E7EB; color: #374151; }
.status-badge.contract-semnat { background: #EDE9FE; color: #5B21B6; }
.status-badge.necunoscut      { background: #F3F4F6; color: #6B7280; }

/* ✨ v4.9d: Badge proiect (name_short) */
.project-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: #1E40AF;
  color: #fff;
  margin-left: 6px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: help;
}

/* ✨ v4.9d: Secțiune cross-linking proiect */
.detail-project-links {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #E5E7EB;
}
.detail-project-links-title {
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 8px;
}
.detail-project-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.detail-project-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  min-height: 36px;
}
.detail-project-link:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1E40AF;
}
.detail-project-link .link-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.detail-panel-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.detail-panel-close:hover {
  background: #E5E7EB;
}

/* ✨ v4.9a: Tabs Info/Video */
.detail-panel-tabs {
  display: flex;
  gap: 0;
  margin-top: 8px;
}

.detail-tab {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: #9CA3AF;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  min-height: 36px;
}

.detail-tab:hover {
  color: #374151;
}

.detail-tab.active {
  color: var(--ci-red-700, #B91C1C);
  border-bottom-color: var(--ci-red-700, #B91C1C);
}

/* Tab content */
.detail-tab-content {
  display: none;
}

.detail-tab-content.active {
  display: block;
}

/* Video tab placeholder */
.detail-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

/* ✨ v4.9a: Progres fizic+financiar vizibil implicit (sub summary grid) */
.detail-progress-summary {
  padding: 4px 0 8px;
}

.detail-progress-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.detail-progress-row .label {
  font-size: 13px;
  color: #6B7280;
  flex-shrink: 0;
  min-width: 110px;
}

.detail-progress-bar-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-panel-body {
  padding: 0 16px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* Rezumat compact (vizibil mereu) */
.detail-summary {
  padding: 12px 0;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-summary-item {
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 8px;
}

.detail-summary-item .label {
  font-size: 11px;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.detail-summary-item .value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

/* ✨ v4.9a: detail-actions eliminat — buton YouTube înlocuit de tab Video */

/* Buton expand/collapse */
.detail-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  background: none;
  border: 1px dashed #D1D5DB;
  border-radius: 8px;
  color: #6B7280;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.detail-expand-btn:hover,
.detail-expand-btn:active {
  background: #f8f9fa;
  border-color: #9CA3AF;
  color: #374151;
}

.detail-expand-btn .arrow {
  transition: transform 0.2s;
}

.detail-expand-btn.expanded .arrow {
  transform: rotate(180deg);
}

/* Detalii extinse (ascunse implicit) */
.detail-extended {
  display: none;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.detail-extended.visible {
  display: block;
}

.detail-extended-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f8f9fa;
}

.detail-extended-row:last-child {
  border-bottom: none;
}

.detail-extended-row .label {
  font-size: 13px;
  color: #6B7280;
  flex-shrink: 0;
  padding-right: 12px;
}

.detail-extended-row .value {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════════════
   YOUTUBE VIDEO PANEL — Panel video-uri per secțiune
   ═══════════════════════════════════════════════════════════════════ */

.youtube-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 80vh;
  background: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 260;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.youtube-panel.open {
  transform: translateY(0);
}

.youtube-panel-handle {
  width: 40px;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.youtube-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.youtube-panel-header h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.youtube-panel-header .yt-icon {
  color: #FF0000;
}

.youtube-panel-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.youtube-panel-close:hover {
  background: #E5E7EB;
}

.youtube-panel-body {
  padding: 12px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.youtube-video-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.youtube-video-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}

.youtube-video-card:hover,
.youtube-video-card:active {
  background: #e5e7eb;
}

.youtube-video-thumb {
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #e5e7eb;
}

.youtube-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.youtube-video-thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}

.youtube-video-thumb .play-overlay svg {
  width: 28px;
  height: 28px;
  opacity: 0.9;
}

.youtube-video-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.youtube-video-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.youtube-video-meta {
  font-size: 11px;
  color: #6B7280;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.youtube-video-channel {
  font-weight: 500;
}

/* ✨ v4.9b: Data publicării în card video */
.youtube-video-date {
  font-size: 11px;
  color: #9CA3AF;
}

.youtube-video-channel + .youtube-video-date::before {
  content: '·';
  margin: 0 4px;
  color: #D1D5DB;
}

/* ✨ v4.9b: Counter videoclipuri */
.youtube-video-count {
  font-size: 12px;
  color: #6B7280;
  padding: 0 0 8px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 12px;
}

.youtube-panel-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #9CA3AF;
}

.youtube-panel-empty {
  text-align: center;
  padding: 40px 20px;
  color: #9CA3AF;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   ✨ v4.8e: BOUNDARY MARKERS — Markeri graniță între loturi (pe linia drumului)
   ═══════════════════════════════════════════════════════════════════ */

/* Popup-ul de graniță (click pe marker) */
.boundary-popup {
  padding: 2px 0;
}

.boundary-popup-title {
  font-size: 15px;
  font-weight: 700;
  color: #1E40AF;
  margin-bottom: 4px;
}

.boundary-popup-lots {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.boundary-popup-location {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 6px;
}

.boundary-popup-details {
  padding-top: 6px;
  border-top: 1px solid #f0f0f0;
}

.boundary-popup-detail-row {
  font-size: 12px;
  color: #374151;
  padding: 3px 0;
  line-height: 1.4;
}

.boundary-popup-lot-label {
  font-weight: 600;
  color: #1E40AF;
}

/* ═══════════════════════════════════════════════════════════════════
   MAPLIBRE POPUP OVERRIDES
   ═══════════════════════════════════════════════════════════════════ */

.maplibregl-popup {
  max-width: 90vw !important;
}

.maplibregl-popup-content {
  padding: 16px;
  font-size: 14px;
  max-height: 60vh;
  overflow-y: auto;
}

.map-popup h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.popup-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — Mobile-First Progressive Enhancement
   ═══════════════════════════════════════════════════════════════════ */

/* ── SMALL TABLETS (576px+) ────────────────────────────────────── */
@media (min-width: 576px) {
  .search-container {
    left: 20px;
    right: 20px;
    max-width: 400px;
  }

  .maplibregl-popup {
    max-width: 350px !important;
  }

  .youtube-video-thumb {
    width: 140px;
    height: 79px;
  }
}

/* ── TABLETS (768px+) ──────────────────────────────────────────── */
@media (min-width: 768px) {
  .search-container {
    top: 20px;
    left: 20px;
    max-width: 450px;
  }

  /* Filter panel → side panel pe tablet */
  .filter-panel {
    position: absolute;
    bottom: auto;
    top: 80px;
    left: 20px;
    right: auto;
    width: 300px;
    max-height: calc(100vh - 120px);
    border-radius: 12px;
    transform: translateX(-110%);
  }

  .filter-panel.open {
    transform: translateX(0);
  }

  .filter-toggle-btn {
    left: 20px;
    bottom: 20px;
    transform: none;
  }

  /* ✨ v4.8d fix B26: Pe tablet+ panoul de filtre e side panel, nu bottom sheet.
     Overlay-ul nu trebuie să blocheze interacțiunea cu harta. */
  .filter-overlay {
    display: none;
  }

  /* ✨ v4.8e: legend responsive overrides eliminat — legenda e acum în filter-panel */

  /* Detail panel → side panel pe tablet */
  .detail-panel {
    position: absolute;
    bottom: auto;
    top: 80px;
    right: 20px;
    left: auto;
    width: 380px;
    max-height: calc(100vh - 120px);
    border-radius: 12px;
    transform: translateX(120%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }

  .detail-panel.open {
    transform: translateX(0);
  }

  /* YouTube panel → side panel pe tablet */
  .youtube-panel {
    position: absolute;
    bottom: auto;
    top: 80px;
    right: 20px;
    left: auto;
    width: 400px;
    max-height: calc(100vh - 120px);
    border-radius: 12px;
    transform: translateX(120%);
  }

  .youtube-panel.open {
    transform: translateX(0);
  }
}

/* ── LAPTOPS (1024px+) ─────────────────────────────────────────── */
@media (min-width: 1024px) {
  .search-container {
    max-width: 500px;
  }

  /* ✨ v4.8d fix B26: Filter panel pe desktop necesită clasa .open pentru a fi vizibil.
     Anterior, transform: translateX(0) era setat fără .open → butonul × nu avea efect
     (remove .open nu schimba nimic). Acum panoul e ascuns implicit și se deschide
     cu .open class, iar toggle button-ul rămâne vizibil pentru redeschidere. */
  .filter-panel {
    width: 320px;
  }

  .filter-panel:not(.open) {
    transform: translateX(-110%);
  }

  .filter-toggle-btn {
    left: 20px;
    bottom: 20px;
    transform: none;
  }

  /* ✨ v4.8e: legend desktop overrides eliminat — legenda e acum în filter-panel */

  .detail-panel {
    width: 420px;
  }

  .youtube-panel {
    width: 440px;
  }
}

/* ── DESKTOP (1280px+) ─────────────────────────────────────────── */
@media (min-width: 1280px) {
  .filter-panel {
    width: 350px;
  }

  .maplibregl-popup {
    max-width: 400px !important;
  }

  .detail-panel {
    width: 450px;
  }

  .youtube-panel {
    width: 480px;
  }
}
