/* /srv/docker/plesaty-map/public/css/app.css — Plešatý na cestách styles */
:root {
  --bg: #f8fafc;
  --panel-bg: rgba(255, 255, 255, 0.95);
  --panel-border: rgba(226, 232, 240, 0.8);
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #b45309;
  --accent-light: #fef3c7;
  --accent-hover: #92400e;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.18);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --pin-color: #b45309;
  --star-color: #f59e0b;
}

[data-theme="dark"] {
  --bg: #09090b;
  --panel-bg: rgba(24, 24, 27, 0.92);
  --panel-border: rgba(63, 63, 70, 0.6);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #f59e0b;
  --accent-light: rgba(245, 158, 11, 0.15);
  --accent-hover: #d97706;
  --card-bg: #18181b;
  --card-border: #27272a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.7);
}

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

[hidden] {
  display: none !important;
}

html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text); background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

#map {
  position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%;
}

/* ---- Topbar ---- */
.topbar {
  position: absolute; top: 12px; left: 12px; right: 12px;
  height: 52px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 14px;
  background: var(--panel-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; user-select: none;
  min-width: fit-content;
}
.brand-icon { width: 28px; height: 28px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-weight: 800; font-size: 0.95rem; letter-spacing: 0.5px; }
.brand-title .accent { color: var(--accent); }
.brand-sub { font-size: 0.68rem; color: var(--text-muted); font-weight: 500; }

.search-box {
  position: relative; flex: 1; max-width: 420px;
  display: flex; align-items: center;
}
.search-icon { position: absolute; left: 10px; font-size: 0.85rem; pointer-events: none; opacity: 0.6; }
.search-box input {
  width: 100%; height: 36px;
  padding: 0 32px 0 32px;
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.85rem; outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.search-box input:focus {
  border-color: var(--accent);
  background: var(--card-bg);
}
.search-clear {
  position: absolute; right: 8px;
  background: none; border: none; font-size: 1.1rem; color: var(--text-muted);
  cursor: pointer; padding: 2px 6px; line-height: 1;
}

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  max-height: 280px; overflow-y: auto;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  list-style: none; z-index: 30;
}
.search-item {
  padding: 10px 14px; border-bottom: 1px solid var(--card-border);
  cursor: pointer; transition: background 0.15s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item.active { background: var(--accent-light); }
.search-item-title { font-weight: 600; font-size: 0.88rem; display: block; }
.search-item-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  height: 36px; padding: 0 12px;
  display: flex; align-items: center; gap: 6px;
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.topbar-btn:hover { background: rgba(125, 125, 125, 0.15); border-color: var(--text-muted); }
.topbar-btn.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

/* ---- Filter Dock (Tags) ---- */
.filter-dock {
  position: absolute; top: 72px; left: 12px; right: 12px; z-index: 15;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 6px;
}
.filter-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; }
.filter-title { font-weight: 700; color: var(--text-muted); letter-spacing: 0.5px; }
.clear-filter-btn {
  background: none; border: none; color: var(--accent); font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.tag-chips {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: thin;
}
.tag-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; font-size: 0.8rem; font-weight: 500;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; cursor: pointer; color: var(--text);
  transition: all 0.15s;
}
.tag-chip:hover { border-color: var(--accent); }
.tag-chip.active { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---- Pin Detail: Expedition Card ---- */
.pin-detail {
  position: absolute; z-index: 25;
  left: 0; right: 0; bottom: 0;
  max-height: 80vh; overflow-y: auto;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  padding: 20px 18px 24px;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.expedition-card { position: relative; }
.card-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;
}
.expedition-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--accent); background: var(--accent-light);
  padding: 3px 8px; border-radius: 4px;
}
.card-close {
  background: rgba(125, 125, 125, 0.1); border: none;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 1.2rem; line-height: 1; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.card-close:hover { background: rgba(125, 125, 125, 0.2); color: var(--text); }

.card-title {
  font-size: 1.35rem; font-weight: 800; line-height: 1.25; margin-bottom: 4px;
}
.card-meta {
  font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.card-rating-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.rating-stars { color: var(--star-color); font-size: 1rem; letter-spacing: 1px; }
.rating-score { font-weight: 700; font-size: 0.95rem; }

.card-thumb-wrap {
  position: relative; margin-bottom: 14px; border-radius: var(--radius-md); overflow: hidden;
  background: #000; box-shadow: var(--shadow-sm);
}
.card-thumb-wrap a { display: block; position: relative; }
.card-thumb-wrap img {
  width: 100%; height: 190px; object-fit: cover; display: block;
  transition: transform 0.2s;
}
.card-thumb-wrap:hover img { transform: scale(1.02); }
.play-badge {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(220, 38, 38, 0.9); color: #ffffff;
  padding: 5px 10px; border-radius: 6px;
  font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; gap: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.card-tags {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
.card-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.75rem; font-weight: 600; padding: 3px 8px;
  border-radius: 12px; background: rgba(125, 125, 125, 0.08);
  border: 1px solid var(--card-border);
}

.card-note {
  font-size: 0.88rem; line-height: 1.5; margin-bottom: 16px;
  color: var(--text); background: rgba(125, 125, 125, 0.04);
  padding: 10px 12px; border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.card-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px;
}
.btn-action {
  height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; font-size: 0.82rem; font-weight: 700;
  border-radius: var(--radius-sm); transition: opacity 0.15s, transform 0.1s;
}
.btn-action.video {
  background: #dc2626; color: #ffffff;
}
.btn-action.gmaps {
  background: rgba(125, 125, 125, 0.1); color: var(--text); border: 1px solid var(--card-border);
}
.btn-action:hover { opacity: 0.9; transform: translateY(-1px); }

.card-address {
  font-size: 0.75rem; color: var(--text-muted); text-align: center;
}

/* ---- Desktop: Left floating sidebar ---- */
@media (min-width: 768px) {
  .pin-detail {
    left: 16px; right: auto; top: 76px; bottom: 16px;
    width: 380px; max-height: calc(100vh - 92px);
    border-radius: var(--radius-md);
    border: 1px solid var(--panel-border);
    animation: slideRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes slideRight {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
  .filter-dock {
    max-width: 480px;
  }
}

/* ---- Map Markers ---- */
.maplibre-marker {
  cursor: pointer;
}
.custom-pin {
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
  background: var(--pin-color);
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease-out, box-shadow 0.15s;
}
.custom-pin::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ffffff;
}
.custom-pin:hover, .custom-pin.selected {
  transform: rotate(-45deg) scale(1.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

/* ---- Status / Loading Overlay ---- */
.map-status {
  position: absolute; top: 0; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.25); backdrop-filter: blur(4px);
  z-index: 50;
}
.status-card {
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  padding: 20px 24px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--card-border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-msg { font-size: 0.9rem; font-weight: 600; color: var(--text); }
