/* ============================================================
   GiPSigo — common.css
   Stili condivisi tra tutte le pagine
   ============================================================ */

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

/* --- Logo --- */
.logo { font-weight: 800; letter-spacing: -.5px; }
.logo .g { color: #22c55e; }
.logo .p { color: #f97316; }
.logo .s { color: #3b82f6; }

/* --- Tagline --- */
.tagline { color: #22c55e; font-style: italic; font-weight: 600; }

/* --- Privacy box --- */
.privacy-box {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 12px; padding: 14px 18px;
  font-size: .82rem; color: #166534;
}
.privacy-box .privacy-title {
  font-weight: 700; margin-bottom: 8px;
}
.privacy-box ul {
  padding-left: 18px; display: flex; flex-direction: column; gap: 4px;
}

.page-register .privacy-box {
  max-width: 480px; margin: 18px auto 0;
}

/* --- Social bar (map.php + trip.php) --- */
#socialbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 12px;
  background: #fff;
  border-top: 1px solid #e9eef4;
  flex-shrink: 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
}
.social-link:hover { opacity: .85; transform: scale(1.04); }
.social-link svg { width: 14px; height: 14px; flex-shrink: 0; }

.social-ig { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
.social-tt { background: #000; color: #fff; }
.social-fb { background: #1877f2; color: #fff; }

/* --- Viewer badge (👁 N) --- */
.viewer-badge {
  align-items: center; gap: 3px;
  background: rgba(59,130,246,.12); color: #3b82f6;
  border: 1px solid rgba(59,130,246,.25);
  border-radius: 12px; padding: 2px 9px;
  font-size: .75rem; font-weight: 600;
  white-space: nowrap;
}

/* --- Leaflet popup custom --- */
.custom-popup .leaflet-popup-content-wrapper {
  background: #fff; color: #1e293b; border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15); border: 1px solid #e9eef4;
}
.custom-popup .leaflet-popup-tip { background: #fff; }
.custom-popup .leaflet-popup-content { margin: 10px 14px; font-size: .85rem; line-height: 1.6; }
.wp-popup .leaflet-popup-content-wrapper {
  background: #fff; color: #1e293b; border-radius: 14px;
  box-shadow: 0 6px 28px rgba(0,0,0,.18); border: none;
  overflow: hidden; padding: 0 !important;
}
.wp-popup .leaflet-popup-tip { background: #fff; }
.wp-popup .leaflet-popup-content { margin: 0 !important; padding: 0; font-size: .85rem; line-height: 1.5; }
.wp-popup-body { padding: 11px 14px 10px; }
.wp-popup-meta { font-size: .72rem; color: #f97316; font-weight: 700; margin-bottom: 4px; }
.wp-popup-text { color: #1e293b; font-size: .88rem; }
.wp-img { width: 100%; display: block; max-height: 240px; object-fit: cover; }

/* --- Address bar (map + trip) --- */
#addressbar {
  background: #f8fafc; padding: 6px 16px; display: flex; align-items: center; gap: 8px;
  font-size: .78rem; color: #64748b; flex-shrink: 0; border-bottom: 1px solid #e9eef4; min-height: 32px;
}
#addressbar a {
  color: #3b82f6; text-decoration: none; font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
#addressbar a:hover { text-decoration: underline; }
#addr-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- FAB luoghi vicini --- */
#fab-nearby {
  position: absolute; bottom: 16px; right: 16px; z-index: 800;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.18);
  font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: box-shadow .2s, transform .15s;
}
#fab-nearby:hover { box-shadow: 0 4px 20px rgba(0,0,0,.25); transform: scale(1.05); }

/* --- Nearby drawer --- */
#nearby-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.35); z-index: 1100;
}
#nearby-overlay.open { display: block; }
#nearby-drawer {
  position: fixed; bottom: 0; left: 0; right: 0; max-height: 65vh;
  background: #fff; border-radius: 20px 20px 0 0; z-index: 1101;
  overflow: hidden; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .3s ease;
  box-shadow: 0 -4px 24px rgba(0,0,0,.12);
}
#nearby-drawer.open { transform: translateY(0); }
#nearby-header {
  padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #f1f5f9; flex-shrink: 0;
}
#nearby-header h3 { font-size: .95rem; color: #1e293b; }
#nearby-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #94a3b8; }
#nearby-list { overflow-y: auto; flex: 1; padding: 8px 0; }
.poi-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid #f8fafc;
}
.poi-item:last-child { border-bottom: none; }
.poi-icon { font-size: 1.4rem; flex-shrink: 0; width: 32px; text-align: center; }
.poi-info { flex: 1; min-width: 0; }
.poi-name {
  font-size: .88rem; font-weight: 600; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.poi-meta { font-size: .75rem; color: #94a3b8; margin-top: 1px; }
.poi-maps { font-size: .75rem; color: #3b82f6; text-decoration: none; flex-shrink: 0; }
.poi-maps:hover { text-decoration: underline; }
#nearby-loading { text-align: center; padding: 32px; color: #94a3b8; font-size: .9rem; }

/* --- Emoji bar (map + trip) --- */
#emojibar {
  background: #fff; border-top: 1px solid #e9eef4; padding: 10px 16px;
  display: flex; justify-content: center; gap: 10px; flex-shrink: 0; z-index: 1000;
}
.emoji-btn {
  font-size: 1.6rem; width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid #e9eef4; background: #f8fafc; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, border-color .15s; user-select: none;
}
.emoji-btn:hover  { transform: scale(1.15); border-color: #cbd5e1; }
.emoji-btn.sent   { transform: scale(1.3);  border-color: #22c55e; background: #f0fdf4; }
.emoji-btn:active { transform: scale(.9); }

/* --- Floating emoji reactions (tracker) --- */
#reaction-stage {
  pointer-events: none; position: fixed; inset: 0; z-index: 200; overflow: hidden;
}
.floating-emoji {
  position: absolute; bottom: 80px; font-size: 2.4rem;
  animation: floatUp 2.2s ease-out forwards; user-select: none;
}
@keyframes floatUp {
  0%   { transform: translateY(0) scale(1);    opacity: 1; }
  60%  { transform: translateY(-180px) scale(1.3); opacity: 1; }
  100% { transform: translateY(-300px) scale(.8);  opacity: 0; }
}
