/* Bu dosya YALNIZCA harita sayfası (index.php) için yüklenir.
   Ortak değişkenler ve temel bileşenler assets/css/base.css içinde. */

html,body{
  height: 100%;
  overflow: hidden; /* tam ekran uygulama hissi — sadece harita sayfasında istiyoruz */
}

#map{
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--paper);
}
.leaflet-control-attribution{ font-size: 10px; }

.topbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding: max(14px, env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--paper) 92%, transparent), transparent);
  pointer-events: none;
}
.topbar-inner{
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.brand-mark{
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--route-blue);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(6,20,35,.18);
}

.search-pill{
  flex: 1; height: 42px; border-radius: 21px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px; font-size: 14px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(6,20,35,.1);
  transition: border-color .15s ease;
}
.search-pill:hover{ border-color: var(--route-blue); }
.search-pill:focus-visible{ outline: 2px solid var(--route-blue); outline-offset: 2px; }

.icon-btn{
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 21px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(6,20,35,.1);
  transition: border-color .15s ease;
}
.icon-btn:hover{ border-color: var(--route-blue); color: var(--route-blue); }
.icon-btn:focus-visible{ outline: 2px solid var(--route-blue); outline-offset: 2px; }

.menu-backdrop{
  position: fixed; inset: 0; z-index: 25;
  background: rgba(10,16,20,.25);
  opacity: 0; transition: opacity .2s ease;
}
.menu-backdrop.open{ opacity: 1; }

.menu-panel{
  position: fixed;
  top: max(66px, calc(env(safe-area-inset-top) + 60px));
  right: 16px;
  z-index: 30;
  width: 240px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(6,20,35,.18);
  padding: 14px;
  transform-origin: top right;
  transform: scale(.95) translateY(-6px);
  opacity: 0;
  transition: transform .16s ease, opacity .16s ease;
}
.menu-panel.open{ transform: scale(1) translateY(0); opacity: 1; }

.menu-label{
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); margin: 2px 2px 8px;
}

.theme-switch{
  display: flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.theme-opt{
  flex: 1;
  border: none; background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  padding: 7px 0;
  border-radius: 7px;
  cursor: pointer;
}
.theme-opt.active{ background: var(--route-blue); color: #fff; }

.menu-divider{ height: 1px; background: var(--line); margin: 12px 0; }

.menu-list{ display: flex; flex-direction: column; }
.menu-item{
  display: block;
  padding: 9px 4px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 7px;
}
.menu-item:hover{ background: var(--paper); color: var(--route-blue); }

.sheet{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.sheet.ready{ transform: translateY(0); }
.sheet.collapsed{ transform: translateY(var(--collapse-offset, calc(100% - 78px))); }
.sheet.dragging{ transition: none; }

@media (prefers-reduced-motion: reduce){
  .sheet{ transition: none; }
}

.sheet-inner{
  width: 100%; max-width: 480px;
  background: var(--white);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 24px rgba(6,20,35,.12);
}

.sheet-drag{
  padding: 12px 22px 6px;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.sheet.dragging .sheet-drag{ cursor: grabbing; }

.sheet-handle{
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--line);
  margin: 0 auto 14px;
}

.cta-group{ padding: 0 22px max(20px, env(safe-area-inset-bottom)); }

.sheet-top-row{ display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

.sign-badge{
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: var(--route-blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background-color .15s ease;
}

.tier-chip{
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.tier-chip.tier-resmi{ background: color-mix(in srgb, var(--route-blue) 16%, transparent); color: var(--route-blue-deep); }
.tier-chip.tier-gpx{ background: color-mix(in srgb, #1C8C6B 18%, transparent); color: #10573F; }
.tier-chip.tier-osm{ background: color-mix(in srgb, var(--sky) 30%, transparent); color: #2b5f8a; }
.tier-chip.tier-topluluk{ background: color-mix(in srgb, var(--amber) 24%, transparent); color: #8a5a10; }

.close-btn{
  margin-left: auto;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.close-btn:hover{ border-color: var(--route-blue); color: var(--route-blue); }

.source-line{
  font-size: 12px;
  color: var(--ink-soft);
  margin: -6px 0 14px;
}

.cover-thumb{
  width: 34px; height: 34px;
  object-fit: cover;
  border-radius: 8px;
  margin-left: 4px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.photo-lightbox{
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8,12,15,.86);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.photo-lightbox img{
  max-width: 100%; max-height: 100%;
  border-radius: 12px;
  display: block;
}

.feature-tags{ display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.feature-tags span{
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.elevation-row{ margin: -2px 0 14px; }
.elevation-row svg{ width: 100%; height: 34px; display: block; }
.elevation-row polyline{ fill: none; stroke: var(--route-blue); stroke-width: 2; }
.elevation-row polygon{ fill: color-mix(in srgb, var(--route-blue) 10%, transparent); stroke: none; }
.elevation-numbers{ display: flex; gap: 14px; margin-top: 2px; font-family: var(--font-mono); font-size: 11px; }
.elevation-numbers .up{ color: var(--route-blue-deep); }
.elevation-numbers .down{ color: var(--ink-soft); }
.elevation-numbers .up::before{ content: "↑ "; }
.elevation-numbers .down::before{ content: "↓ "; }

h1{
  font-family: var(--font-display);
  font-weight: 600; font-size: 27px; line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0 0 6px; color: var(--ink);
}

.lede{
  font-size: 13.5px; line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 16px; max-width: 46ch;
}

.stat-row{
  display: flex; gap: 22px;
  margin: 0 0 18px; padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-row dt{ font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 2px; }
.stat-row dd{ font-family: var(--font-mono); font-size: 14px; font-weight: 500; margin: 0; color: var(--ink); }

.cta-group{ display: flex; flex-direction: column; gap: 9px; }

.route-sign{
  background: var(--route-blue-deep);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .03em;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(6,20,35,.25);
}

.leaflet-popup-content-wrapper{ border-radius: var(--radius-sm); }
.leaflet-popup-content{ font-family: var(--font-body); font-size: 13px; margin: 10px 12px; }

.user-dot-wrap{ position: relative; width: 20px; height: 20px; }
.user-dot-core{
  position: absolute; inset: 5px;
  border-radius: 50%;
  background: var(--route-blue);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(6,20,35,.35);
}
.user-dot-pulse{
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--route-blue);
  opacity: .35;
}
@media (prefers-reduced-motion: no-preference){
  .user-dot-pulse{ animation: userPulse 2s ease-out infinite; }
}
@keyframes userPulse{
  0%{ transform: scale(.6); opacity: .5; }
  100%{ transform: scale(2.4); opacity: 0; }
}


