/* === PARKOVANIE CSS v2.0 - 2026-03-28 === */
/* =========================================
   1. STYLE PODSTAWOWE I UKŁAD
========================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body { margin: 0; padding: 0; display: flex; flex-direction: column; height: 100vh; height: 100dvh; font-family: 'Google Sans', 'Segoe UI', sans-serif; background: #f8f9fa; }

/* NAGŁÓWEK */
header { background-color: #4A90E2; color: white; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; z-index: 1001; height: 75px; box-sizing: border-box; flex-shrink: 0; }

/* BANNER OFFLINE */
#offline-banner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ff9800;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    text-align: center;
    z-index: 1002;
    flex-shrink: 0;
}
#offline-banner.visible { display: flex; }
.logo-box { display: flex; align-items: center; gap: 10px; }
.logo-box span { font-weight: bold; font-size: 18px; text-transform: uppercase; letter-spacing: 1px; }
.menu-icon { background: white; border-radius: 6px; padding: 6px; display: flex; cursor: pointer; }

/* MAPA I GŁÓWNY KONTENER */
#main-content { flex: 1; width: 100%; position: relative; overflow: hidden; }
#map { position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 1; }

/* =========================================
   2. ELEMENTY NA MAPIE
========================================= */
/* Wyszukiwarka */
#search-bar-container { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 90%; z-index: 1002; }
#search-bar { background: white; border-radius: 25px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border: none; }
#search-bar input { border: none; outline: none; width: 75%; font-size: 14px; color: #333; }

/* Przycisk Szukaj w obszarze */
#search-area-btn { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); z-index: 1002; background: white; color: #4A90E2; border: none; padding: 10px 20px; border-radius: 25px; font-weight: bold; font-size: 13px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); cursor: pointer; display: none; }

/* Piny */
.custom-pin { display: flex; justify-content: center; align-items: center; border-radius: 8px; border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.pin-darmowe { background-color: #27ae60; } .pin-platne { background-color: #4A90E2; } .pin-serwis { background-color: #e74c3c; }

/* Karta Podglądu (Zdjęcie na górze, opis na dole) */
#preview-card { position: absolute; bottom: 85px; left: 15px; right: 15px; background: white; border-radius: 12px; z-index: 1005; display: none; box-shadow: 0 4px 20px rgba(0,0,0,0.15); overflow: hidden; flex-direction: column; }
.preview-img { width: 100%; height: 160px !important; object-fit: cover !important; display: block; background: #eee; }
.preview-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; background: rgba(0,0,0,0.5); color: #fff; border-radius: 50%; font-size: 20px; line-height: 28px; text-align: center; cursor: pointer; z-index: 2; transition: background 0.2s; }
.preview-close:hover { background: rgba(0,0,0,0.75); }
.preview-rating { position: absolute; bottom: 10px; left: 10px; background: white; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: bold; color: #555; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.preview-content { padding: 12px 15px; }
.preview-title { font-weight: bold; font-size: 16px; margin-bottom: 5px; color: #222; }
.preview-info { font-size: 11px; color: #777; display: flex; align-items: center; gap: 3px; }
.preview-actions { display: flex; align-items: center; margin-top: 10px; }
#view-details-btn { font-size: 13px; color: #4A90E2; text-decoration: none; font-weight: 600; }
.nav-btn-link { position: absolute; bottom: 10px; right: 10px; display: flex; flex-direction: column; align-items: center; cursor: pointer; color: #fff; font-size: 10px; font-weight: bold; background: rgba(0,0,0,0.5); border-radius: 8px; padding: 6px 10px; z-index: 2; transition: background 0.2s; }
.nav-btn-link:hover { background: rgba(0,0,0,0.75); }

/* DOLNY PASEK */
#bottom-bar { background-color: #ffffff; height: 70px; display: flex; justify-content: space-around; align-items: center; position: fixed; bottom: 0; width: 100%; z-index: 2000; border-top: 1px solid #eee; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -2px 5px rgba(0,0,0,0.02); overflow: visible; }
.nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #8e8e8e; font-size: 10px; flex: 1; cursor: pointer; min-width: 0; }
.nav-item svg { width: 22px; height: 22px; margin-bottom: 5px; fill: #8e8e8e; }
.nav-item.active { color: #4A90E2; } .nav-item.active svg { fill: #4A90E2; }

/* =========================================
   3. MENU BOCZNE (HAMBURGER)
========================================= */
#side-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 4000; display: none; backdrop-filter: blur(2px); }
#side-menu { position: fixed; top: 0; right: -280px; width: 260px; height: 100%; background: white; z-index: 4001; transition: right 0.3s ease-in-out; display: flex; flex-direction: column; box-shadow: -5px 0 15px rgba(0,0,0,0.1); }
#side-menu.open { right: 0; }
.side-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: #4A90E2; color: white; font-weight: bold; font-size: 18px; }
#close-side-menu { cursor: pointer; display: flex; align-items: center; }
.side-menu-links { display: flex; flex-direction: column; padding: 10px 0; }
.side-menu-links a { padding: 18px 20px; text-decoration: none; color: #333; font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #f8f9fa; transition: background 0.2s; }
.side-menu-links a:hover { background: #f0f6ff; }
.side-menu-links a svg { width: 22px; height: 22px; }

/* =========================================
   4. NAKŁADKI (SZCZEGÓŁY, LOGOWANIE, PROFIL)
========================================= */
/* Szczegóły miejsca */
#details-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #f8f9fa; z-index: 3000; display: none; flex-direction: column; overflow-y: auto; }
.det-image-container { width: 100%; height: 220px; background: #ddd; position: relative; }
#det-img { width: 100%; height: 100%; object-fit: cover; }
.photo-nav { position: absolute; bottom: 0; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; background: rgba(0, 0, 0, 0); }
.photo-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.5); border: none; border-radius: 50%; width: 45px; height: 45px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: background 0.3s; z-index: 10; }
.photo-nav-btn:hover { background: rgba(0, 0, 0, 0.7); }
.photo-prev { left: 10px; }
.photo-next { right: 10px; }
.photo-counter { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.6); color: white; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; z-index: 10; font-family: 'Segoe UI', sans-serif; }
.det-share-photo-btn { position: absolute; top: 10px; right: 10px; z-index: 10; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,0.5); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.det-share-photo-btn:hover { background: rgba(0,0,0,0.7); }

/* PRZYCISK ULUBIONE (SERCE) NA ZDJĘCIU */
.det-favorite-btn { position: absolute; bottom: 25px; right: 10px; z-index: 10; width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,0.5); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, transform 0.2s; }
.det-favorite-btn:hover { background: rgba(0,0,0,0.7); transform: scale(1.1); }
.det-favorite-btn:active { transform: scale(0.95); }

/* KARTY ULUBIONYCH */


.det-body { padding: 20px; padding-bottom: 100px; background: white; border-radius: 20px 20px 0 0; margin-top: -15px; position: relative; z-index: 2; box-shadow: 0 -4px 15px rgba(0,0,0,0.05); }
.det-top-section { margin-bottom: 0; }
.det-title-area { }
#det-name { margin: 0; font-size: 22px; color: #222; font-weight: 800; line-height: 1.2; }
.det-addr { font-size: 12px; color: #777; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.det-stats-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.det-rating { font-size: 12px; color: #777; }
.det-action-buttons { display: flex; gap: 10px; }
.det-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 55px; height: 55px; background: #f0f6ff; border-radius: 12px; cursor: pointer; color: #4A90E2; font-size: 10px; font-weight: bold; border: 1px solid #dcebfa; }
.det-btn svg { margin-bottom: 3px; }
#det-phone-btn { border-color: #27ae60; background: #eafaf1; }
#det-price-link-btn { border-color: #e67e22; background: #fef5e7; }
.det-section-title { color: #4A90E2; font-size: 15px; margin: 20px 0 10px; font-weight: bold; }
.det-text { color: #555; font-size: 13px; line-height: 1.6; margin: 0 0 15px 0; white-space: pre-line; }

/* Widget pogody */
#det-weather { background: linear-gradient(135deg, #e8f2ff 0%, #f0f6ff 100%); border-radius: 14px; padding: 14px 16px; border: 1px solid #dcebfa; }
#det-weather .weather-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
#det-weather .weather-title { font-size: 13px; font-weight: 700; color: #4A90E2; display: flex; align-items: center; gap: 5px; }
#det-weather .weather-days { display: flex; gap: 8px; }
#det-weather .weather-day { flex: 1; background: white; border-radius: 10px; padding: 10px 6px; text-align: center; border: 1px solid #e4edfa; }
#det-weather .weather-day-label { font-size: 10px; font-weight: 700; color: #888; text-transform: uppercase; margin-bottom: 4px; }
#det-weather .weather-day-icon { font-size: 26px; line-height: 1.2; }
#det-weather .weather-day-temp { font-size: 16px; font-weight: 800; color: #333; margin-top: 2px; }
#det-weather .weather-day-range { font-size: 10px; color: #999; margin-top: 2px; }
#det-weather .weather-link { display: block; text-align: center; margin-top: 10px; font-size: 11px; color: #4A90E2; text-decoration: none; font-weight: 600; }
#det-weather .weather-link:hover { text-decoration: underline; }
#det-weather .weather-skeleton { display: flex; gap: 8px; }
#det-weather .weather-skeleton > div { flex: 1; height: 90px; background: rgba(255,255,255,0.6); border-radius: 10px; animation: weatherPulse 1.2s ease-in-out infinite; }
@keyframes weatherPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }

#det-static-map { width: 100%; height: 150px; background: #eef5e4; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 25px; border: 1px solid #dcebfa; }
.det-review { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.det-review-avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.det-review-content { flex: 1; }
.det-review-author { font-weight: bold; font-size: 13px; color: #333; }
.det-review-stars { font-size: 10px; margin: 3px 0; }
.det-review-text { font-size: 12px; color: #666; line-height: 1.5; }
.det-login-prompt { font-size: 14px; color: #666; text-align: left; margin-bottom: 15px; }
.det-add-review-box textarea { width: 100%; height: 80px; border: 1px solid #dcebfa; border-radius: 8px; padding: 10px; font-family: inherit; font-size: 13px; outline: none; margin-bottom: 10px; box-sizing: border-box; resize: none; }
.det-add-review-box button { background: #4A90E2; color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; float: right; font-size: 13px; }

/* Logowanie i Rejestracja */
#auth-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #e8e8e8; z-index: 4000; display: none; flex-direction: column; overflow-y: auto; }
#pwa-install-banner { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 5000; background: #fff; box-shadow: 0 -2px 16px rgba(0,0,0,0.15); padding: 12px 16px; align-items: center; justify-content: center; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.pwa-install-content { display: flex; align-items: center; gap: 12px; max-width: 500px; width: 100%; }
.pwa-install-icon { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }
.pwa-install-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pwa-install-text strong { font-size: 15px; color: #333; }
.pwa-install-text span { font-size: 13px; color: #666; }
#pwa-install-btn { background: #4A90E2; color: #fff; border: none; padding: 8px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
#pwa-install-btn:hover { background: #357abd; }
#pwa-install-close { background: none; border: none; font-size: 24px; color: #999; cursor: pointer; padding: 0 4px; line-height: 1; }

#contact-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #e8e8e8; z-index: 4000; display: none; flex-direction: column; overflow-y: auto; }
.auth-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.auth-box { width: 100%; max-width: 350px; display: flex; flex-direction: column; align-items: center; position: relative; }
.auth-blue-card { background: linear-gradient(180deg, #4A90E2 0%, #296dc1 100%); border-radius: 18px; padding: 30px 20px; width: 100%; box-sizing: border-box; box-shadow: 0 10px 20px rgba(0,0,0,0.2); display: flex; flex-direction: column; z-index: 2; }
.auth-blue-card h2 { color: white; text-align: center; margin: 0 0 25px 0; font-size: 24px; font-weight: bold; }
.auth-blue-card input { width: 100%; padding: 14px 15px; margin-bottom: 15px; border: none; border-radius: 8px; box-sizing: border-box; font-size: 14px; }
.auth-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }
.forgot-password { color: white; font-size: 11px; text-decoration: none; line-height: 1.4; opacity: 0.9; }
.auth-btn { background: #4A90E2; color: white; border: 2px solid #5fa0ea; padding: 10px 25px; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 14px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); transition: background 0.2s; }
.password-hint { font-size: 11px; color: rgba(255,255,255,0.75); margin: -10px 0 12px 2px; line-height: 1.4; }
.password-field { position: relative; width: 100%; margin-bottom: 15px; }
.password-field input { width: 100%; padding: 14px 42px 14px 15px; border: none; border-radius: 8px; box-sizing: border-box; font-size: 14px; margin-bottom: 0; }
.password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 4px; cursor: pointer; display: flex; align-items: center; }
.auth-switch { background: white; width: 90%; padding: 15px; border-radius: 0 0 15px 15px; text-align: center; font-size: 13px; color: #777; box-shadow: 0 5px 15px rgba(0,0,0,0.05); margin-top: -15px; padding-top: 30px; z-index: 1; }
.auth-switch span { color: #4A90E2; font-weight: bold; cursor: pointer; }

/* Profil Użytkownika */
#profile-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fdfdfd; z-index: 3500; display: none; flex-direction: column; overflow-y: auto; padding-bottom: 80px; }
.profile-content { padding: 20px; }
.profile-title { font-size: 18px; color: #333; margin-top: 0; margin-bottom: 20px; font-weight: bold; }
.profile-header-card { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.profile-info-left { flex: 1; }
.profile-username { font-size: 20px; color: #4A90E2; font-weight: bold; margin-bottom: 8px; }
.profile-socials { display: flex; gap: 8px; }
.soc-icon { width: 22px; height: 22px; border-radius: 4px; display: flex; justify-content: center; align-items: center; }
.soc-icon svg { width: 14px; height: 14px; }
.soc-icon.yt { background: #FF0000; } .soc-icon.tw { background: #1DA1F2; } .soc-icon.fb { background: #3b5998; } .soc-icon.ig { background: #E1306C; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white; }
.profile-bio-text { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 30px; }

.profile-action-btn { background: white; border: 1px solid #eee; border-radius: 12px; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); cursor: pointer; }
.btn-left { display: flex; align-items: center; gap: 15px; color: #333; font-weight: 500; font-size: 15px; }
.btn-left svg { width: 24px; height: 24px; }
.btn-right { background: #4A90E2; color: white; width: 24px; height: 24px; border-radius: 6px; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 14px; }

/* Edycja Profilu */
.edit-section-title { color: #4A90E2; font-size: 13px; font-weight: bold; margin-bottom: 10px; }
.edit-bio-box { background: #f4f8fd; border: 1px solid #dcebfa; border-radius: 12px; padding: 5px; margin-bottom: 20px; }
#edit-bio-input { width: 100%; border: none; background: transparent; padding: 10px; box-sizing: border-box; font-size: 13px; color: #555; outline: none; resize: none; }
.social-edit-list { display: flex; flex-direction: column; gap: 15px; }
.social-edit-item { font-size: 13px; color: #4A90E2; display: flex; align-items: center; cursor: pointer; }

/* --- USTAWIENIA (TOGGLES) --- */
.settings-toggle { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.settings-toggle:last-of-type { border-bottom: none; }
.settings-toggle input[type="checkbox"] { display: none; }
.settings-toggle-slider { position: relative; width: 44px; min-width: 44px; height: 24px; background: #ccc; border-radius: 12px; transition: background 0.3s; }
.settings-toggle-slider::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; transition: transform 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.settings-toggle input:checked + .settings-toggle-slider { background: #4A90E2; }
.settings-toggle input:checked + .settings-toggle-slider::after { transform: translateX(20px); }
.settings-toggle-label { font-size: 14px; color: #333; line-height: 1.4; }

/* --- WIDOK PUBLICZNY PROFILU I KARUZELA --- */
.author-carousel { display: flex; overflow-x: auto; gap: 15px; padding: 10px 20px 20px 20px; scroll-snap-type: x mandatory; }
.author-carousel::-webkit-scrollbar { display: none; }
.author-spot-card { flex: 0 0 240px; background: white; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); scroll-snap-align: start; overflow: hidden; border: 1px solid #dcebfa; display: flex; flex-direction: column; position: relative; }
.author-spot-img-container { width: 100%; height: 130px; position: relative; background: #eee; }
.author-spot-img { width: 100%; height: 100%; object-fit: cover; }
.author-spot-rating { position: absolute; bottom: 8px; left: 8px; background: white; padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: bold; color: #555; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.author-spot-info { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.author-spot-title { font-weight: bold; font-size: 15px; color: #222; margin: 0 0 5px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author-spot-addr { font-size: 11px; color: #777; margin-bottom: 15px; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author-spot-actions { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.author-spot-detail-link { font-size: 11px; color: #555; text-decoration: none; cursor: pointer; font-weight: 500;}
.author-spot-nav-btn { display: flex; flex-direction: column; align-items: center; cursor: pointer; color: #4A90E2; font-size: 10px; font-weight: bold; gap: 2px;}

/* Lista wyników wyszukiwania */
#search-results-list {
    background: white;
    margin-top: 8px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
}

.search-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
    transition: background 0.2s;
}

.search-item:last-child { border-bottom: none; }
.search-item:hover { background: #f0f7ff; }

.search-item-icon {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.search-item-info { display: flex; flex-direction: column; }
.search-item-name { font-size: 14px; font-weight: bold; color: #333; }
.search-item-sub { font-size: 11px; color: #888; }

/* Styl dla systemu lajków (serca) */
.heart-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 12px;
    gap: 5px;
}

.heart-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.heart-count {
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

/* Dostosowanie pozycji na karcie podglądu - serce/lajki */
/* .preview-rating - usunięto nadpisanie, korzysta z definicji wyżej */

/* --- CZAT GŁÓWNY (Wysuwany Panel) --- */
.chat-panel {
    position: fixed;
    top: 0;
    right: -100%; /* Domyślnie schowany poza ekranem */
    width: 100%;
    max-width: 450px; /* Na komputerach nie rozciągnie się na całą szerokość */
    height: 100vh;
    height: 100dvh; /* Lepsza obsługa ekranów mobilnych z paskiem adresu */
    background: #fff;
    z-index: 99999; /* Zawsze na samym wierzchu */
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.chat-panel.open {
    right: 0; /* Wyjeżdża na ekran */
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.chat-title h3 { margin: 0; font-size: 16px; color: #333; }
.chat-online { font-size: 12px; color: #76D19E; font-weight: bold; }
.close-btn { background: none; border: none; font-size: 28px; cursor: pointer; color: #888; padding: 0; line-height: 1; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #fafafa;
}

/* Dymki wiadomości */
.chat-msg { display: flex; flex-direction: column; max-width: 85%; }
.chat-msg.left { align-self: flex-start; }
.chat-msg.right { align-self: flex-end; align-items: flex-end; }

.chat-author { font-size: 11px; color: #888; margin-bottom: 4px; padding: 0 4px; }
.chat-time { font-size: 10px; color: #aaa; margin-top: 2px; padding: 0 4px; }
.chat-bubble { padding: 10px 15px; border-radius: 18px; font-size: 14px; line-height: 1.4; word-wrap: break-word; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

.chat-msg.left .chat-bubble { background: #f1f0f0; color: #333; border-top-left-radius: 4px; }
.chat-msg.right .chat-bubble { background: #4A90E2; color: #fff; border-top-right-radius: 4px; }

/* --- KULOODPORNY PASEK CZATU --- */
.chat-input-area {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 15px !important;
    background: #fff !important;
    border-top: 1px solid #eee !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.chat-input-field {
    flex: 1 1 auto !important; /* Pozwala się rozciągać, ale też ściskać */
    min-width: 0 !important; /* Zapobiega wypychaniu guzika na małych ekranach */
    padding: 12px 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 20px !important;
    outline: none !important;
    font-size: 14px !important;
    background: #f9f9f9 !important;
    margin: 0 !important;
}

.chat-send-btn {
    flex: 0 0 44px !important; /* Sztywna szerokość 44px, zero kompromisów */
    height: 44px !important;
    background: #4A90E2 !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* --- KARUZELA POLECANYCH LOKALIZACJI --- */
#featured-carousel-container {
    position: fixed;
    bottom: 70px;
    left: 0;
    width: 100%;
    background: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: transform 0.3s ease-in-out, visibility 0s 0s;
    padding-bottom: 15px;
}

/* Klasa używana w JS do chowania karuzeli pod ekran */
.featured-carousel-hidden {
    transform: translateY(120%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease-in-out, visibility 0s 0.3s;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 10px;
}

.featured-header h3 { margin: 0; font-size: 16px; color: #333; }

.close-featured-btn {
    cursor: pointer;
    background: #f0f6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.featured-spots-list {
    display: flex;
    overflow-x: auto; /* Przewijanie na boki */
    gap: 15px;
    padding: 0 20px 10px 20px;
    scroll-snap-type: x mandatory; /* Karty będą się "przyklejać" do środka */
}
.featured-spots-list::-webkit-scrollbar { display: none; } /* Ukrywa brzydki pasek */

/* Karta pojedynczej miejscówki */
.featured-spot-card {
    flex: 0 0 220px; /* Sztywna szerokość karty */
    background: #fff;
    border: 1px solid #dcebfa;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.featured-spot-img-wrapper {
    position: relative;
    height: 120px;
    width: 100%;
    background: #eee;
}

.featured-spot-img-wrapper > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-spot-likes {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #333;
}

.featured-spot-info { padding: 12px; position: relative; }
.featured-spot-title { font-weight: bold; font-size: 14px; margin-bottom: 4px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.featured-spot-author { font-size: 11px; color: #888; }
.fav-remove-btn { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(220, 40, 40, 0.85); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: white; padding: 0; transition: background 0.2s, transform 0.2s; z-index: 2; }
.fav-remove-btn:hover { background: rgba(200, 20, 20, 1); transform: scale(1.15); }
.fav-remove-btn:active { transform: scale(0.9); }

/* --- STYLIZACJA IKON DOLNEGO PASKA (POPRAWKA) --- */

/* Standardowe ikony */
.nav-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-bottom: 4px;
    transition: filter 0.3s ease;
}

/* Filtr zmieniający czarne ikony na szare (zmniejszona przezroczystość dla lepszego efektu) */
.grey-filter {
    filter: grayscale(1) opacity(0.5) !important;
}

/* Aktywny stan ikon (niebieski filtr na czarnych obrazkach) */
.nav-item.active .nav-icon-img {
    filter: drop-shadow(0 0 0 #4A90E2) brightness(0.7) !important;
}

/* Tekst pod ikonami w dolnym pasku - zapobieganie zawijaniu */
.nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

/* === KLUCZOWE POPRAWKI DLA PLUSA === */
/* Uwaga: główna definicja #bottom-bar jest wyżej - tu tylko plus-item */

.plus-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2100;
}

.nav-icon-plus {
    width: 32px; /* Mniejszy, zgrabniejszy plus (wcześniej 50px) */
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); /* Większy cień pod wysuniętym plusem */
    margin-bottom: 3px;
}

.plus-text {
    font-size: 10px;
    font-weight: bold;
    color: #4A90E2;
}
/* Kontener mapy w oknie szczegółów musi mieć wysokość! */
#det-map, .det-location-map {
    width: 100% !important;
    height: 180px !important; /* Lub inna wartość, która pasuje do Twojego projektu */
    background: #eee;
    border-radius: 12px;
    margin-top: 10px;
}

/* Stylizacja panelu filtrów */
#filter-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

#filter-panel div {
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
}

#filter-panel label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: background-color 0.2s, box-shadow 0.2s;
}

#filter-panel label:hover {
    background-color: #f9f9f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#filter-panel input[type="checkbox"] {
    accent-color: #4A90E2;
    width: 18px;
    height: 18px;
}

#filter-panel img {
    width: 24px;
    height: 24px;
}

#filter-panel button {
    width: 100%;
    padding: 12px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#filter-panel button:hover {
    background-color: #357ABD;
}

/* =========================================
   CHECK-IN
========================================= */
.det-checkin-info {
    font-size: 12px;
    color: #777;
    display: flex;
    align-items: center;
    gap: 5px;
}
.det-checkin-active {
    color: #27ae60;
    font-weight: bold;
}

/* Badge na markerach z aktywnymi check-inami */
.marker-with-badge {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
.marker-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e74c3c;
    color: white !important;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    border: 1.5px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 10;
}

/* Tabs karuzeli */
.featured-tabs {
    display: flex;
    gap: 0;
}
.featured-tab {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.featured-tab.active {
    color: #4A90E2;
    border-bottom-color: #4A90E2;
}

/* =========================================
   FAVORITES OVERLAY (ULUBIONE)
========================================= */
#favorites-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    z-index: 3500;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
#favorites-overlay header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #4A90E2;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
    box-sizing: border-box;
    flex-shrink: 0;
}
#favorites-map {
    flex: 1 1 auto;
    width: 100% !important;
    min-height: 0;
    height: 100% !important;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    z-index: 1;
    position: relative;
}

/* =========================================
   STORIES (RELACJE)
========================================= */

/* Overlay viewer */
#stories-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 5000;
    display: none;
    flex-direction: column;
}

.stories-header {
    position: fixed;
    top: 0; right: 0;
    z-index: 5002;
    padding: 15px;
}

.stories-close-btn {
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.stories-feed {
    width: 100%; height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.stories-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    gap: 15px;
    font-size: 16px;
}

.stories-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.stories-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #4A90E2;
    border-radius: 50%;
    animation: storySpinAnim 0.8s linear infinite;
}

@keyframes storySpinAnim {
    to { transform: rotate(360deg); }
}

/* Karta pojedynczej relacji */
.story-card {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    position: relative;
    flex-shrink: 0;
}

.story-media-container {
    width: 100%; height: 100%;
    position: relative;
    background: #000;
    overflow: hidden;
}

.story-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

video.story-media {
    object-fit: contain;
    background: #000;
    position: absolute;
    top: 0; left: 0;
}

.story-poster {
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.story-poster-placeholder {
    width: 100%;
    height: 100%;
    background: #111;
}

.story-video-data {
    display: none;
}

.story-overlay-gradient {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
    pointer-events: none;
    z-index: 1;
}

.story-media-container::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    pointer-events: none;
}

.story-header-info {
    position: absolute;
    top: 15px; left: 15px; right: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.story-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}

.story-username {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.story-time {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    margin-left: auto;
}

.story-delete-btn {
    background: rgba(255,0,0,0.6);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
}

.story-bottom-info {
    position: absolute;
    bottom: 30px; left: 15px; right: 15px;
    z-index: 2;
}

.story-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.story-caption {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.story-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    background: rgba(74,144,226,0.8);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Story form — field wraps, emoji picker, char counters */
.story-field-wrap {
    position: relative;
    margin-bottom: 15px;
}
.story-field-wrap input,
.story-field-wrap textarea {
    width: 100%;
    padding: 14px 44px 14px 15px;
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
}
.story-field-wrap textarea {
    resize: none;
}
.story-emoji-btn {
    position: absolute;
    right: 6px;
    top: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s;
}
.story-emoji-btn:hover {
    background: rgba(0,0,0,0.08);
}
.story-emoji-btn-textarea {
    top: 8px;
}
.story-char-counter {
    display: block;
    text-align: right;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 3px;
    padding-right: 4px;
    transition: color 0.2s;
}
.story-char-counter.story-char-warn {
    color: #ffc107;
}
.story-char-counter.story-char-full {
    color: #ff5252;
    font-weight: 600;
}
.story-emoji-picker {
    display: none;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    margin-top: 6px;
    max-height: 180px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10;
}
.story-emoji-item {
    font-size: 22px;
    text-align: center;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.12s;
    line-height: 1.2;
    user-select: none;
}
.story-emoji-item:hover {
    background: rgba(74,144,226,0.15);
}

.story-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    width: 64px; height: 64px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.story-mute-btn {
    position: absolute;
    bottom: 90px; right: 15px;
    z-index: 3;
    display: flex;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px; height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.story-like-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.story-like-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.story-like-btn.liked .story-like-icon {
    background: rgba(0,0,0,0.4);
}

.story-like-count {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    min-height: 14px;
}

.story-actions-col {
    position: absolute;
    bottom: 145px; right: 15px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.story-view-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.story-view-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
}

.story-view-count {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    min-height: 14px;
}

.story-like-pop {
    animation: storyLikePop 0.4s ease;
}

@keyframes storyLikePop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.5); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Add Story Form */
#add-story-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #e8e8e8;
    z-index: 4000;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.story-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 200px;
    border: 2px dashed rgba(255,255,255,0.4);
    border-radius: 12px;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    transition: border-color 0.3s;
}

.story-upload-label:hover {
    border-color: rgba(255,255,255,0.7);
}

.story-media-preview {
    position: relative;
    width: 100%;
    max-height: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.story-media-preview img,
.story-media-preview video {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
}

.story-media-remove {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.story-progress-fill {
    height: 100%;
    background: #4A90E2;
    border-radius: 2px;
    transition: width 0.3s;
}

.story-progress-text {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

/* Bottom bar: SVG icon w relacjach */
#bottom-stories-btn .nav-icon-img {
    width: 24px; height: 24px;
}
#bottom-stories-btn svg {
    fill: #8e8e8e;
    transition: fill 0.3s;
}
#bottom-stories-btn.active svg {
    fill: #4A90E2;
}
