:root {
  --creaves-bg: #f7f9fb;
  --creaves-panel: #ffffff;
  --creaves-text: #102336;
  --creaves-muted: #4f6378;
  --creaves-line: #d6e0ea;
  --creaves-primary: #005f73;
  --creaves-primary-strong: #084c61;
  --creaves-warning: #9a5609;
  --creaves-danger: #9f1d1d;
  --creaves-ok: #1d6b3a;
  --creaves-neutral: #596a7a;
  --creaves-pill-bg: #edf2f7;
  --creaves-shadow: 0 10px 25px rgba(16, 35, 54, 0.08);
  --creaves-radius: 12px;
}

.creaves,
.creaves * {
  box-sizing: border-box;
}

.creaves {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  color: var(--creaves-text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.creaves h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  line-height: 1.2;
}

.creaves p {
  margin: 0.4rem 0 1rem;
  color: var(--creaves-muted);
}

.creaves-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--creaves-panel);
  border: 1px solid var(--creaves-line);
  border-radius: var(--creaves-radius);
  box-shadow: var(--creaves-shadow);
}

.creaves-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.creaves-field {
  grid-column: span 12;
  min-width: 0;
}

.creaves label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.creaves input[type="search"],
.creaves select {
  width: 100%;
  min-height: 44px;
  padding: 0.58rem 0.7rem;
  color: var(--creaves-text);
  background: #fff;
  border: 1px solid #a9bac9;
  border-radius: 10px;
  font-size: 1rem;
}

.creaves input[type="search"]:focus,
.creaves select:focus,
.creaves button:focus,
.creaves a:focus {
  outline: 3px solid rgba(0, 95, 115, 0.25);
  outline-offset: 2px;
}

.creaves input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.creaves-checkbox-line {
  display: inline-flex !important;
  align-items: center;
  min-height: 44px;
  margin-bottom: 0 !important;
  font-weight: 600;
}

.creaves-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.creaves-button {
  min-height: 44px;
  padding: 0.62rem 0.85rem;
  color: #fff;
  background: var(--creaves-primary);
  border: 1px solid var(--creaves-primary);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 700;
}

.creaves-button:hover {
  background: var(--creaves-primary-strong);
}

.creaves-button--secondary {
  color: var(--creaves-primary-strong);
  background: #fff;
  border-color: #8fb0c8;
}

.creaves-button--secondary:hover {
  background: #f1f7fb;
}

.creaves-button[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.creaves-status,
.creaves-data-note {
  margin-top: 0.75rem;
  color: var(--creaves-muted);
  font-size: 0.92rem;
}

.creaves-data-note--fallback {
  color: var(--creaves-warning);
  font-weight: 600;
}

.creaves-alert {
  margin-top: 0.8rem;
  padding: 0.8rem;
  color: #7f1d1d;
  background: #fff1f1;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

.creaves-map {
  width: 100%;
  height: 420px;
  background: linear-gradient(145deg, #edf4fb, #f9fbfd);
  border: 1px solid var(--creaves-line);
  border-radius: var(--creaves-radius);
}

.creaves-map-note {
  margin: 0.55rem 0 0 !important;
  font-size: 0.9rem;
}

.creaves-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.creaves-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.95rem;
  background: var(--creaves-panel);
  border: 1px solid var(--creaves-line);
  border-left-width: 5px;
  border-left-color: #bac7d3;
  border-radius: var(--creaves-radius);
  box-shadow: var(--creaves-shadow);
}

.creaves-card--open {
  border-left-color: var(--creaves-ok);
}

.creaves-card--restricted {
  border-left-color: var(--creaves-warning);
}

.creaves-card--capacity_reached,
.creaves-card--temporarily_closed {
  border-left-color: var(--creaves-danger);
}

.creaves-card--unknown {
  border-left-color: var(--creaves-neutral);
}

.creaves-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.creaves-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.creaves-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.56rem;
  color: #17344d;
  background: var(--creaves-pill-bg);
  border: 1px solid #cbd7e3;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.creaves-badge--hedgehog {
  color: #115e37;
  background: #ecfdf3;
  border-color: #7dd3a6;
}

.creaves-badge--review {
  color: var(--creaves-warning);
  background: #fff9ec;
  border-color: #f7c88b;
}

.creaves-badge--status-open {
  color: #14532d;
  background: #ecfdf3;
  border-color: #86efac;
}

.creaves-badge--status-restricted {
  color: #854d0e;
  background: #fffbeb;
  border-color: #facc15;
}

.creaves-badge--status-capacity_reached,
.creaves-badge--status-temporarily_closed {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fca5a5;
}

.creaves-badge--status-unknown {
  color: #475569;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.creaves-reception-box {
  padding: 0.72rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.creaves-reception-box strong {
  display: block;
  margin-bottom: 0.2rem;
}

.creaves-reception-box p {
  margin: 0.25rem 0 0;
  color: inherit;
}

.creaves-reception-box--open {
  color: #14532d;
  background: #f0fdf4;
  border-color: #86efac;
}

.creaves-reception-box--restricted {
  color: #854d0e;
  background: #fffbeb;
  border-color: #facc15;
}

.creaves-reception-box--capacity_reached,
.creaves-reception-box--temporarily_closed {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fca5a5;
}

.creaves-reception-box--unknown {
  color: #475569;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.creaves-region-line {
  color: #1f3f59;
  font-weight: 600;
}

.creaves-contact {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  color: #17344d;
  overflow-wrap: anywhere;
}

.creaves-contact strong {
  color: #12273b;
}

.creaves-phone {
  display: inline-block;
  padding: 0.45rem 0.65rem;
  color: #0b3a5e;
  background: #ecf6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.2;
}

.creaves-phone a {
  color: inherit;
  text-decoration: none;
}

.creaves-card a:hover,
.creaves-phone a:hover {
  text-decoration: underline;
}

.creaves-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.3rem;
}

.creaves-link-button {
  display: inline-block;
  padding: 0.52rem 0.72rem;
  color: #fff;
  background: var(--creaves-primary);
  border: 1px solid var(--creaves-primary);
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.creaves-link-button--secondary {
  color: var(--creaves-primary-strong);
  background: #fff;
  border-color: #a8c3d4;
  font-weight: 600;
}

.creaves-empty-state {
  padding: 1rem;
  color: #2e455b;
  background: #f7fafc;
  border: 1px dashed #b8c7d5;
  border-radius: var(--creaves-radius);
}

.creaves .leaflet-popup-content {
  line-height: 1.45;
}

.creaves .leaflet-popup-content a {
  overflow-wrap: anywhere;
}

.creaves-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 2px 8px rgba(16, 35, 54, 0.35);
  transform: rotate(-45deg);
}

.creaves-marker::after {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  content: "";
}

.creaves-marker--open {
  background: var(--creaves-ok);
}

.creaves-marker--restricted {
  background: var(--creaves-warning);
}

.creaves-marker--capacity_reached,
.creaves-marker--temporarily_closed {
  background: var(--creaves-danger);
}

.creaves-marker--unknown {
  background: var(--creaves-neutral);
}

@media (min-width: 700px) {
  .creaves-field--search {
    grid-column: span 4;
  }

  .creaves-field--province {
    grid-column: span 2;
  }

  .creaves-field--network {
    grid-column: span 2;
  }

  .creaves-field--status {
    grid-column: span 2;
  }

  .creaves-field--hedgehog {
    grid-column: span 2;
  }
}

@media (min-width: 900px) {
  .creaves-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .creaves {
    padding: 0.65rem;
  }

  .creaves-map {
    height: 360px;
  }

  .creaves-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .creaves-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .creaves *,
  .creaves *::before,
  .creaves *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
