    :root {
  --bg: #F7F7F7;
  --fg: #0b0b0b;
  --ring: #e5e7eb;
  --card: #ffffff;
  --blue: #2563eb;
  --green: green;
}

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

/* === GLOBAL === */
html, body {
  height: 100%;
  font-family: 'Poppins', system-ui, Inter, sans-serif;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
}

/* === HEADER === */
header {
  background: var(--card);
  padding: 12px 16px;
  border-bottom: 1px solid var(--ring);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 6000;
}

.logo-header {
  height: 25px;
  object-fit: contain;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  background: #fff;
  transition: transform 0.2s ease;
}
.profile-icon:hover { transform: scale(1.05); }

.header-name {
  font-weight: 600;
  font-size: 15px;
  color: #000;
  margin-left: 6px;
  user-select: none;
}

/* === PROFILE EDITOR === */
#profileEditor {
  position: fixed;
  top: 60px;
  bottom: 70px;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  padding: 20px;
  background: #fff;
  overflow-y: auto;
  z-index: 5000;
  box-sizing: border-box;
}

/* Nadpis */
#profileEditor h3 {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
}

/* Avatar upload */
.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}
.avatar-upload img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid #e5e5e5;
  object-fit: cover;
  margin-bottom: 8px;
}

/* Upload tlačítka */
.upload-btn,
.upload-vehicle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: #333;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  padding: 10px 14px;
  min-height: 38px;
}
.upload-btn:hover,
.upload-vehicle-btn:hover {
  background: #f5f5f5;
}

/* Inputs */
#profileEditor input[type="text"],
#profileEditor select,
#profileEditor textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  padding: 10px 12px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
#bioInput {
  min-height: 80px;
  resize: none;
}

/* Vehicle preview */
#vehiclePhotoPreview {
  display: none;
  width: 100%;
  max-height: 200px;
  border-radius: 10px;
  margin-bottom: 10px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
}

/* Save + Logout */
.btn-save {
  background: #161616;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-save:hover { background: #000000; }

.btn-logout {
  background: #e9e9e9;
  color: #555;
  border: 1px solid #d5d5d5;
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-logout:hover { background: #dcdcdc; }


/* === MAP / EXPLORE === */
#exploreMap,
#mapContainer {
  position: absolute;
  top: 60px;
  bottom: 70px;
  left: 0;
  right: 0;
  display: none;
  z-index: 1;
}
#map, #froadMap {
  width: 100%;
  height: 100%;
}

/* === USER DETAIL PANEL (People marker popup replacement) === */
#userDetailPanel {
  position: fixed;
  bottom: -100%;
  left: 20px;
  right: 20px;
  margin: 0;
  width: calc(100% - 40px);
  height: 40%;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  transition: bottom 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px 16px;
  display: none;
  margin-bottom: 20px;
  border-radius: 20px 20px 20px 20px;
  overflow: hidden;          /* schová scrollbar */
  overscroll-behavior: none; /* zabraňuje protažení */
}

#userDetailPanel.active {
  bottom: var(--footer-btn-height);
}

#userDetailContent {
  overflow-y: auto;          /* scroll uvnitř */
  height: 100%;
  padding-right: 10px;       /* prostor pro scrollbar */
  box-sizing: border-box;
}

/* === PANEL SECTION STYLY === */

.user-section {
  margin-bottom: 20px;
}

.user-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
  border-left: 3px solid #ff5200;
  padding-left: 8px;
}

.user-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  word-wrap: break-word;
}

#userVehiclePhotoWrapper {
  border-radius: 12px;
  overflow: hidden;
  background: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 250px;
}

#userVehiclePhoto {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  display: none; /* zobrazí se jen pokud má fotku */
}

#userVehiclePhoto.show {
  display: block;
}


/* User markers */
.user-marker,
.leaflet-marker-icon.user-icon,
.leaflet-marker-icon.live-user-marker {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #fff;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  background: #ccc;
  transform: translate(-50%, -100%);
}
/* === Pulsující zelený outline pro LIVE uživatele === */
.leaflet-marker-icon.user-icon.live-outline {
  box-shadow: 0 0 0 2px #3ddc97, 0 0 8px 2px rgba(61, 220, 151, 0.6);
  animation: pulseRing 1.8s infinite;
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.user-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-marker::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: white;
}

/* Go live */
#goLiveBtn {
  padding: 10px 16px;
  background: var(--green);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: none;
}

/* Share location floating button */
.share-location-btn {
  position: fixed;
  top: 80px;              /* ✅ nad footerem */
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #000;
  border: none;
  box-shadow: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-location-btn .live-icon {
  width: 18px;
  height: 18px;
  position: relative;
  vertical-align: middle;
}


/* === CHAT === */
#chat {
  position: absolute;
  top: 110px;
  bottom: calc(var(--footer-btn-height) + 0px); /* ⬅️ bylo +10px */
  left: 0;
  right: 0;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 100px; /* 🧩 přidá prostor pod poslední zprávou */
  display: none;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
  z-index: 1;
}


/* === CHAT === */
/* === CHAT === */
.msg {
  display: flex;
  align-items: flex-end;
  margin: 8px 12px;
  gap: 8px;
  max-width: 90%;
}

/* Avatar – vpravo u mých zpráv, vlevo u ostatních */
.msg .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Základní styl bubliny */
.bubble {
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

/* Meta – jméno + čas */
.meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

/* Ostatní zprávy */
.msg.other {
  justify-content: flex-start;
}
.msg.other .bubble {
  background: #f4f4f4;
  color: #111;
}
.msg.other .avatar {
  order: 0;
}

/* Moje zprávy */
.msg.me {
  justify-content: flex-end;
  flex-direction: row-reverse;
}
.msg.me .bubble {
  background: #1b1b1b;
  color: #fff;
}
.msg.me .meta {
  color: rgba(225, 225, 225, 0.9);
}
.msg.me .avatar {
  order: 1;
}

/* Chat input */
#form {
  position: fixed;
  bottom: var(--footer-btn-height);
  left: 0;
  right: 0;
  display: none;
  padding: 14px;
  border-top: 1px solid var(--ring);
  background: var(--card);
  gap: 8px;
  z-index: 4000;
}
#form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--ring);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;              /* 🔥 zvětší text i placeholder */
}

#form input::placeholder {
  font-size: 14px;              /* 🔥 stejná velikost jako Send */
  color: #777;                  /* decentní šedá */
}
#form button {
  padding: 10px 16px;
  border: none;
  background: #000;
  color: #fff;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
}

/* === LOGIN SCREEN === */
#loginScreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: row;
}
.login-left {
  flex: 1;
  background: url('https://cdn.prod.website-files.com/687ebffd20183c0459d68784/68de881d8b749db696f9bd75_f223.jpg') center/cover no-repeat;
}
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 40px;
}
.login-box {
  max-width: 400px;
  width: 100%;
  padding: 32px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}
.login-box img { width: 60px; margin: 0 auto; }
.login-box input {
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid var(--ring);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  outline: none;
}
.login-box input:focus { border-color: var(--blue); }

.login-email-btn {
  padding: 12px 20px;
  background: #121d12;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.login-email-btn:hover { background: #1a2b1a; }

.toggle-auth {
  font-size: 14px;
  text-align: center;
}
.toggle-auth a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.toggle-auth a:hover { text-decoration: underline; }

.legal-text {
  font-size: 13px;
  color: var(--fg);
  line-height: 1.4;
}
.legal-text a {
  text-decoration: underline;
  font-weight: 500;
}

/* === FOOTER === */
:root {
  --footer-font-size: 13px;
  --footer-btn-height: 70px;
  --active-color: #ff4500;
  --inactive-color: #000;
}

#appFooter {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-btn-height);
  background: #fff;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  z-index: 5000;
}

.footer-btn {
  background: none;
  border: none;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  font-size: var(--footer-font-size);
  color: var(--inactive-color);
  cursor: pointer;
  transition: all 0.2s ease;
}
.footer-btn img {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}
.footer-btn.active {
  color: var(--active-color);
  font-weight: 600;
}
.footer-btn span {
  margin-top: 2px;
  height: 16px;
  line-height: 16px;
  font-weight: 500;
  opacity: 0.85;
}

/* === RESPONSIVE LOGIN === */
@media (max-width: 1024px) {
  #loginScreen {
    flex-direction: column;
    background: url('https://cdn.prod.website-files.com/687ebffd20183c0459d68784/68de881d8b749db696f9bd75_f223.jpg') center/cover no-repeat;
  }
  .login-left { display: none; }
  .login-right {
    background: rgba(255,255,255,0);
    width: 100%;
    padding: 32px;
  }
  .login-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  }
}

/* === LEAFLET POPUPS === */
.leaflet-popup.custom-popup .leaflet-popup-content-wrapper,
.leaflet-popup-content-wrapper.custom-popup {
  max-width: 280px !important;
  background: #fff !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
  padding: 10px 14px !important;
  color: #222;
}
.leaflet-popup-tip.custom-popup { background: #fff !important; }
.custom-popup .popup-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.custom-popup strong {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}
.popup-content .gps,
.popup-content .vehicle {
  font-size: 13px;
  color: #555;
  font-style: italic;
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.popup-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eee;
}
.popup-bio {
  font-size: 13px;
  color: #333;
  margin: 6px 0;
  line-height: 1.4;
}
.popup-vehicle-photo {
  width: 100%;
  height: 300px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 6px;
  border: 1px solid #eee;
}
.popup-instagram-link {
  color: #222 !important;
  text-decoration: none !important;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  transition: color 0.2s ease;
}
.popup-instagram-link:hover {
  color: #555 !important;
  text-decoration: underline !important;
}

.popup-vehicle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  color: #444;
}
.popup-vehicle-icon {
  width: 24;
  height: 24px;
  flex-shrink: 0;
}
.verified-icon {
  width: 16px;
  height: 16px;
  margin-left: 4px;
  position: relative;
  margin-right: 4px;
}

.bubble .meta {
  font-size: 12px;
  font-weight: 400; /* tenčí jako předtím */
  color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bubble .meta strong {
  font-weight: 500; /* dřív to bylo lehčí než bold */
  color: inherit;
}

.bubble .meta .msg-time {
  font-size: 11px;
  opacity: 0.7;
}


/* === Panel header layout fix === */
.panel-header {
  display: flex;
  align-items: center;
  gap: 14px;              /* mezera mezi fotkou a texty */
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee; /* decentní oddělení od zbytku */
}

.panel-header .popup-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0f0f0;
  flex-shrink: 0;
}

.panel-userinfo {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-userinfo strong {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
  margin-bottom: 2px;
}

.panel-userinfo .popup-instagram a {
  color: #444;
  font-size: 13px;
  text-decoration: none;
  line-height: 1.2;
}

.panel-userinfo .popup-instagram a:hover {
  text-decoration: underline;
}

/* === Lepší spacing mezi sekcemi === */
.user-section {
  margin-top: 14px;
  margin-bottom: 24px;
}
.user-section h3 {
  margin-bottom: 8px;
}

/* Verified icon alignment beside name */
.panel-name-row {
  display: flex;
  align-items: baseline; /* 👈 ZAROVNÁ ikonku k textové základně místo středu */
  gap: 6px;
}

.panel-name-row strong {
  font-size: 16px;
  font-weight: 600;
  color: #111;
}

.mini-popup-inner {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  padding: 5px 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #111;
  white-space: nowrap;
  transform: translateX(-50%); /* ✅ bublina vždy vycentrovaná */
  position: relative;
  left: 50%;
}

.mini-popup-name {
  font-weight: 600;
}

.mini-popup-status.live {
  color: #3ddc97;  /* 🌿 světle pastelová zelená */
  font-weight: 600;
}

.mini-popup-status.inactive {
  color: #8a8a8a;
}

/* === Visibility Button === */
.visibility-btn {
  right: 20px;
  left: auto;
  transform: none;
  background: #ffffff;
  border: none;
  box-shadow: none;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.visibility-btn img {
  width: 20px;
  height: 20px;
}
.visibility-btn:hover {
  background: #f3f3f3;
}

#customActionBtn {
  position: fixed;
  right: 20px;
  background: rgb(255, 255, 255);
  border: none;
  border-radius: 10px;
  padding: 13px;
  cursor: pointer;
  display: none; /* jen v People sekci */
  justify-content: center;
  align-items: center;
  z-index: 500;
  transition: transform 0.15s ease, background 0.15s ease;
}
#customActionBtn:hover {
  background: #f3f3f3;
}
#customActionBtn img {
  width: 16px;
  height: 16px;
}

#globalLoader {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.loader-logo {
  width: 80px;
  margin-bottom: 20px;
}

.loader-spinner {
  width: 28px;
  height: 28px;
  border: 4px solid #000;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* === CUSTOM ZOOM BUTTONS (styled like Visibility/Layers) === */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  background: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  color: #000 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 10px 0 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
  background: #f3f3f3 !important;
}

/* Optional – spacing from top & left edge */
.leaflet-top.leaflet-left {
  top: 0px !important;
  left: 10px !important;
}

.close-profile-btn {
  color: #000;
  position: absolute;
  top: 12px;
  right: 12px;
  background: white;
  border: none;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 32px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease;
  z-index: 10;
}
.close-profile-btn:hover {
  background: #f5f5f5;
}

/* === AVATAR COMPONENT === */
.profile-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.avatar-container {
  position: relative;
  width: 100px;
  height: 100px;
}

.avatar-container img#currentAvatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eee;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* Delete ikonka */
.avatar-delete-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  transform: translate(1%, 1%); /* ⚙️ posun blíž dovnitř – 50 % překrytí */
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #444444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}
.avatar-delete-btn img {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s ease;
}
.upload-icon:hover {
  background: rgba(0, 0, 0, 0.05);
}
.upload-icon img {
  width: 22px;
  height: 22px;
  opacity: 0.8;
}
.upload-info {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #212121;
  margin: 8px;
  font-family: "Poppins", sans-serif;
}
.upload-info.error {
  color: #e74c3c;
}
.cancel-upload {
  cursor: pointer;
  font-weight: bold;
}

/* === FIX: Upload info bar visible above footer === */
#uploadInfo {
  position: fixed;
  bottom: calc(var(--footer-btn-height) + 70px); /* těsně nad inputem */
  left: 10px;
  right: 10px;
  z-index: 5000; /* nad mapou i chatem */
  display: none; /* výchozí stav */
}

/* === Chat image modal === */
#imageModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}
#imageModal img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
#closeImageModal {
  position: absolute;
  top: 20px;
  right: 25px;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
/* === CHAT GROUPS === */
.chat-groups {
  position: absolute;
  top: 60px;
  bottom: var(--footer-btn-height);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  background: var(--bg);
  overflow-y: auto;
  z-index: 1;
  padding: 40px 20px;
}

.chat-groups-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.chat-group {
  background: linear-gradient(145deg, #818181, #3a3a3a);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 16px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  overflow: hidden;
}

.chat-group:hover {
  background: linear-gradient(145deg, #3b3b3b, #4a4a4a);
  transform: translateY(-3px);
}

.chat-group span {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 5px;
  word-wrap: break-word;
  width: 100%;
}

.chat-group .desc {
  font-size: 12px;
  font-weight: 500; /* ← musí tam být středník */
  color: #ffffff;
  opacity: 0.4;
  line-height: 1.3;
}

.chat-groups h3 {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 24px auto;
  text-align: left;
  font-size: 24px;
  font-weight: 600;
  color: var(--fg);
}


.chat-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  position: sticky;
  top: 0;
  background: white;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  z-index: 50;
}

.chat-header .back-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #000 !important; /* 🖤 zajistí černou barvu */
}
.chat-header .back-btn:focus {
  outline: none;
}

#chatGroupTitle {
  font-weight: 600;
  font-size: 16px;
}

/* === EMAIL VERIFICATION BANNER === */
#emailVerificationBanner {
  position: fixed;
  top: 110px;
  left: 0;
  right: 0;
  background: #fff3cd;
  border-bottom: 2px solid #ffc107;
  padding: 16px;
  z-index: 4500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.banner-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.banner-text {
  flex: 1;
}

.banner-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #856404;
  margin-bottom: 4px;
}

.banner-text p {
  margin: 0;
  font-size: 13px;
  color: #856404;
  line-height: 1.4;
}

.resend-btn {
  background: #856404;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.resend-btn:hover {
  background: #6c5003;
}

/* Adjust chat position when banner is visible */
#chat.with-banner {
  top: 190px;
}

.chat-group[data-group="general"] {
  border: 3px solid #ff8a00;
}

.chat-avatars {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
  gap: 6px;
}

.chat-avatars img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
.chat-avatars img:hover {
  transform: scale(1.1);
}

/* === Ranger icon === */
.ranger-icon {
  width: 16px;
  height: 16px;
  margin-left: 4px;
  vertical-align: middle;
  position: relative;
  top: 1px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  font-size: 12px;
  background: #f1f1f1;
  padding: 3px 12px 3px 6px;
  border-radius: 12px;
  color: #333;
}

.verified-badge {
  background-color: #e0f7ff;
  color: #007acc;
}

.ranger-badge {
  background-color: #e8ffe8;
  color: #2e7d32;
}

/* === DESKTOP RESPONSIVE === */
@media (min-width: 769px) {
  #profileEditor {
    width: 30%;
    left: auto;
    right: 0;
    top: 61px;
    border-left: 1px solid #e0e0e0;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    border-radius: 0; /* ✅ bez zaoblených rohů na desktopu */
  }

  /* User detail panel (People marker popup) - vycentrovaný s 40% šířkou */
  #userDetailPanel {
    width: 30%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin: 20px;
    border-radius: 20px;
  }

  #userDetailPanel.active {
    transform: translateX(-50%);
  }
}

/* === HOME SECTION === */
#homeSection {
  overflow-y: auto;
  height: calc(100vh - 60px - 70px); /* header + footer */
  background: var(--bg);
}

.home-content {
  padding: 40px 20px;
  max-width: 600px;
  margin: 0 auto;
}

#homeWelcome {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--fg);
}

.home-description {
  color: #666;
  line-height: 1.6;
  font-size: 16px;
}

/* Desktop: wider layout, full width with spacing */
@media (min-width: 768px) {
  .home-content {
    max-width: 1380px;
    padding: 60px 120px;
    margin: 0 auto;
  }

  #homeWelcome {
    font-size: 36px;
  }

  .home-description {
    font-size: 18px;
  }
}

/* === HOME SECTIONS === */
.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 24px;
  color: var(--fg);
}

/* === UPDATES SECTION === */
.updates-section {
  margin-top: 40px;
}

.updates-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.update-item {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.update-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.update-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.update-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.type-warning {
  background: #fef3c7;
  color: #92400e;
}

.type-info {
  background: #dbeafe;
  color: #1e40af;
}

.type-notice {
  background: #e5e7eb;
  color: #374151;
}

.update-time {
  font-size: 13px;
  color: #6b7280;
  font-weight: 400;
}

.update-text {
  color: #111827;
  line-height: 1.6;
  font-size: 14px;
}

/* === ROAD STATUS === */
.road-status-section {
  margin-top: 40px;
}

.road-status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.status-card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 2px solid;
}

.status-card.status-open {
  border-color: #10b981;
  background: #f0fdf4;
}

.status-card.status-caution {
  border-color: #9ca3af;
  background: #f9fafb;
}

.status-card.status-closed {
  border-color: #ef4444;
  background: #fef2f2;
}

.status-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.status-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  margin-right: auto;
}

.status-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

/* === FAQ === */
.faq-section {
  margin-top: 40px;
  margin-bottom: 40px;
}

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

.faq-item {
  border: 1px solid var(--ring);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.faq-question {
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  text-align: left;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: #f9fafb;
}

.faq-icon {
  font-size: 24px;
  font-weight: 300;
  color: #666;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 20px 20px 18px 20px;
}

.faq-answer p {
  color: #666;
  line-height: 1.6;
  font-size: 15px;
  margin: 0;
}

  .chat-groups {
  background: var(--bg);
  padding: 40px 20px;
  max-width: 1380px;
  margin: 0 auto;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--fg);
}

.chat-groups h3 {
  width: 100%;
  max-width: 1380px;
  margin: 0 0 12px 0; /* ✅ odstraněno auto centrování */
  padding: 0 px;   /* stejné odsazení jako .home-content */
  text-align: left;
  font-size: 28px;
  font-weight: 600;
  color: var(--fg);
}

.chat-groups .subtitle {
  font-size: 16px;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.6;
  text-align: left;
  padding: 0 ; /* ✅ stejné odsazení */
}

/* Desktop styles */
@media (min-width: 768px) {
  .section-title {
    font-size: 32px;
    margin-top: 60px;
    margin-bottom: 32px;
  }

  .load-more-btn {
    max-width: 300px;
    margin: 0 auto;
  }

  .road-status-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .status-card {
    flex-direction: column;
    text-align: center;
  }

  .status-value {
    margin-right: 0;
  }

    .chat-groups {
  background: var(--bg);
  padding: 40px 20px;
  max-width: 1380px;
  margin: 0 auto;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--fg);
}

.chat-groups h3 {
  font-size: 36px;

}

.chat-groups .subtitle {
  font-size: 18px;
}

/* Desktop: Zajistí stejné chování gridu jako Home sekce */
.chat-groups-container {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1320px;
}
}

