/* ==== single-ev-adjustments.css (TEMİZLENMİŞ + GÜNCEL) ============================
   - Single Ev sayfası: başlık + açıklama + profil konuşma balonu
   - Haritalar: anasayfa + hesabım popup düzeni
   - Yeni Pin sayfası: mobil grid düzeni
   ============================================================================== */

/* ----- VAR OLAN single-ev düzenleri (başlık, adres, yorum, vs.) ----- */

/* Tekil ev sayfasında sol küçük haritadaki eski yazar bloğunu gizle */
.km-detail__map .km-post-author,
.km-detail__map .km-post-author__link {
  display: none !important;
}

/* Author mini box: stars + likes altta, dikey */
.km-author-mini--boxed .km-author-mini__meta {
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:flex-start;
}
.km-author-mini--boxed .review-card-stars { margin:0; }
.km-author-mini--boxed .km-author-mini__likes {
  color:#ff6b6b;
  font-weight:700;
}

/* Adres rozeti: siyah bar, beyaz yazı (hem başlık altında hem harita altında) */
.km-badge--address {
  font-size:13px;
  padding:6px 10px;
  border-radius:8px;
  background:#000;
  color:#fff;
  display:inline-block;
  margin-top:8px;
  box-shadow:0 8px 18px rgba(0,0,0,.06);
}

/* Adres rozetini harita kutusu / başlık altında ortala */
.km-detail__map .km-badge-wrap,
.km-detail__head-left .km-badge-wrap {
  text-align:center;
  margin-top:10px;
}
.km-detail__map .km-badge--address,
.km-detail__head-left .km-badge--address {
  margin-left:auto;
  margin-right:auto;
}

/* Tekil ev başlık satırı (masaüstü): sol başlık + adres, sağ profil kartı */
.km-detail__head {
  display:flex;
  gap:18px;
  align-items:flex-start;
  justify-content:space-between;
}
.km-detail__head-left {
  min-width:0;
  flex:1 1 auto;
  overflow-wrap:break-word;
  word-break:break-word;
}
.km-detail__head-right {
  flex:0 0 auto;
}

/* Yorum formu: gönder butonunu sağa al */
.form-submit {
  text-align:right;
  margin-top:12px;
}
@media (min-width:981px){
  .form-submit { text-align:right; }
}

/* Yorum alanı: genişlik ve yüksekliği sınırlı tut */
.km-comments {
  padding-left:6px;
  padding-right:6px;
  box-sizing:border-box;
}
.km-comment-textarea {
  width:100%;
  min-height:80px;
  max-height:260px;
  padding:12px;
  border-radius:10px;
  resize:vertical;
}

/* Küçük ekran genel hizalama: profil box solda kalsın, başlık üstte */
@media (max-width:520px){
  .km-author-mini--boxed {
    width:100%;
    max-width:none;
    align-items:flex-start;
    padding:10px;
  }
  .km-detail__head {
    flex-direction:column;
    gap:12px;
  }
  .km-detail__head-right { align-self:flex-start; }
  .km-badge--address { font-size:13px; }
  .km-container { padding-left:18px; padding-right:18px; }
}

/* Genel yatay taşıp gitmeleri engelle */
html, body { overflow-x:hidden; }

/* ----------------------------
   Yeni Pin (pin-bırak) – mobil grid
----------------------------- */
@media (max-width:768px){
  #km-newpin-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-template-rows:auto auto !important;
    gap:12px !important;
  }
  #km-newpin-map{
    order:0 !important;
    width:100% !important;
    height:320px !important;
    border-radius:12px !important;
  }
  #km-newpin-form{
    order:1 !important;
    width:100% !important;
    margin:0 !important;
    padding:14px !important;
    box-sizing:border-box !important;
    border-radius:12px !important;
  }
  #km-newpin-form input[type="text"],
  #km-newpin-form textarea,
  #km-newpin-form input[readonly]{
    width:100% !important;
    box-sizing:border-box !important;
  }
  #km-newpin-form .km-latlng-row{
    display:flex;
    gap:8px;
    align-items:center;
    justify-content:space-between;
  }
  #km-newpin-form .km-latlng-row input{
    flex:1 1 48%;
    min-width:0;
  }
  @media (max-width:420px){
    #km-newpin-form .km-latlng-row{ flex-direction:column; gap:8px; }
    #km-newpin-form .km-latlng-row input{ width:100%; }
  }
  #km-newpin-form .km-btn{
    display:inline-flex !important;
    margin-left:auto !important;
    margin-top:12px !important;
  }
  .km-mapbox,
  #km-newpin-map{
    box-shadow:0 10px 28px rgba(0,0,0,.08) !important;
  }
  html, body { overflow-x:hidden !important; }
}

/* ----------------------------
   Single ev: küçük harita altındaki adres / attribution bar'ı siyah
----------------------------- */
#ev-map-small .leaflet-control-attribution{
  background:#000 !important;
  color:#fff !important;
  padding:6px 10px;
  border-radius:0 0 12px 12px;
  font-size:11px;
}
#ev-map-small .leaflet-control-attribution a{
  color:#fff !important;
  text-decoration:underline;
}

/* ----------------------------
   HARİTA KONUŞMA BALONU – 3 BÖLÜMLÜ (anasayfa + hesabım)
----------------------------- */

/* Popup gövdesi: dikey flex, 3 bölümlü yapı */
.km-map__box .km-pop-wrap .leaflet-popup-content-wrapper,
#km-account-map .km-pop-wrap .leaflet-popup-content-wrapper{
  background:#ffffff;
  border-radius:14px;
  padding:10px 12px 8px;
  box-shadow:0 14px 40px rgba(0,0,0,.18);
  border:1px solid rgba(0,0,0,.08);
  max-width:260px !important;
  min-width:200px;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
  box-sizing:border-box;
  font-size:13px;
  line-height:1.36;
}

/* İç container: başlık (üst) + açıklama (orta) + footer (alt) */
.km-map__box .km-pop,
#km-account-map .km-pop{
  display:flex;
  flex-direction:column;
  min-height:80px;
}

/* Açıklama – esnek alan, ~3 satır clamp */
.km-map__box .km-pop__excerpt,
#km-account-map .km-pop__excerpt{
  margin:0;
  font-size:12px;
  line-height:1.4;
  color:#333;
  flex:1 1 auto;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
  text-overflow:ellipsis;
  word-break:break-word;
}

/* Footer – her zaman en altta */
.km-map__box .km-pop__footer,
#km-account-map .km-pop__footer{
  margin-top:6px;
  padding-top:4px;
  border-top:1px solid rgba(0,0,0,0.05);
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px;
  font-size:12px;
  flex:0 0 auto;
}

/* Aç linki */
.km-map__box .km-pop__avatar,
#km-account-map .km-pop__avatar{
  display:inline-flex;
  align-items:center;
  gap:4px;
  white-space:nowrap;
  color:#0b5d91;
  font-weight:700;
  font-size:12px;
  text-decoration:none;
}

/* Like */
.km-map__box .km-pop__likes,
#km-account-map .km-pop__likes{
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:#e63946;
  font-weight:700;
  font-size:12px;
  white-space:nowrap;
}

/* Rating satırını bu balonlarda tamamen gizle (puanı göstermiyoruz) */
.km-map__box .km-pop__rating,
.km-map__box .km-pop__avg,
.km-map__box .km-stars-inline,
#km-account-map .km-pop__rating,
#km-account-map .km-pop__avg,
#km-account-map .km-stars-inline{
  display:none !important;
}

/* Popup çarpı butonu */
.km-map__box .km-pop-wrap .leaflet-popup-close-button,
#km-account-map .km-pop-wrap .leaflet-popup-close-button{
  right:4px !important;
  top:4px !important;
  width:24px !important;
  height:24px !important;
  line-height:24px !important;
  border-radius:999px !important;
  background:transparent !important;
  color:#999 !important;
  border:0 !important;
  box-shadow:none !important;
  font-size:11px !important;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Popup kuyruğu */
.km-map__box .leaflet-popup-tip-container,
#km-account-map .leaflet-popup-tip-container{
  height:16px !important;
  pointer-events:none;
}
.km-map__box .leaflet-popup-tip,
#km-account-map .leaflet-popup-tip{
  width:28px !important;
  height:16px !important;
  margin-left:-14px !important;
  background:transparent !important;
}
.km-map__box .leaflet-popup-tip::before,
#km-account-map .leaflet-popup-tip::before{
  content:"";
  display:block;
  width:100%;
  height:100%;
  background:#fff;
  transform:translateY(-2px);
  clip-path:polygon(50% 0%,0% 100%,100% 100%);
  box-shadow:0 8px 18px rgba(0,0,0,.10);
  border-radius:0 0 6px 6px;
}

/* ----------------------------
   SINGLE EV – Konuşma balonu (başlık + açıklama + profil)
----------------------------- */

/* Balon: başlık + açıklama + profil + yorum girişini sarar */
.km-detail__info{
  position:relative;
  background:#fff;
  border-radius:22px;
  box-shadow:0 18px 48px rgba(0,0,0,.18);
  padding:16px 18px 18px;
  box-sizing:border-box;
  margin-top:14px;
}

/* Tek balon ucu */
.km-detail__info::after{
  content:"";
  position:absolute;
  left:34px;
  top:-10px;
  width:26px;
  height:16px;
  background:#fff;
  clip-path:polygon(50% 0,0 100%,100% 100%);
  box-shadow:0 10px 20px rgba(0,0,0,.12);
}

/* Masaüstü başlık satırı: sol başlık+adres+açıklama, sağ profil kartı */
.km-detail__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:6px;
}
.km-detail__head-left{
  flex:1 1 auto;
  min-width:0;
}
.km-detail__head-right{
  flex:0 0 260px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
}

/* Başlık */
.km-detail__info .km-title{
  margin:0 0 4px;
  font-size:1.4rem;
  font-weight:800;
  line-height:1.18;
}

/* İlk paragraf: başlığın hemen altında kısa açıklama */
.km-detail__info .km-single__content > p:first-of-type{
  margin-top:6px;
  margin-bottom:10px;
  font-size:14px;
  line-height:1.35;
}

/* Yorumlardan önce separator spacing */
.km-detail__info .km-sep{
  margin-top:10px;
  margin-bottom:10px;
}

/* Profil kartının arka planını balon ile bütünleştiriyoruz */
.km-detail__head-right .km-author-mini--boxed{
  background:transparent !important;
  box-shadow:none !important;
  padding:0;
}

/* ----------------------------
   SINGLE EV – Mobil düzen (profil üstte, başlık + açıklama hemen altında)
----------------------------- */
@media (max-width:720px){

  /* Balon padding’i sıkı: içerik yukarı taşınsın */
  .km-detail__info{
    padding-top:6px;
    padding-bottom:14px;
    margin-top:12px;
    border-radius:18px;
  }
  .km-detail__info::after{
    left:24px;
  }

  /* Profil üstte, hemen altında başlık + açıklama – tek kolon */
  .km-detail__head{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:4px;             /* profil – başlık arası */
    margin-bottom:4px;
  }

  .km-detail__head-right{
    order:1;
    align-self:flex-start;
    align-items:flex-start;
    width:100%;
  }

  .km-detail__head-right .km-author-mini--boxed{
    padding:6px 8px;
    border-radius:12px;
    gap:8px;
    max-width:210px;
    margin:2px 0;       /* profil ile başlık arası minimum */
  }
  .km-author-mini__avatar{
    width:44px;
    height:44px;
  }
  .km-author-mini__info{
    font-size:12px;
    line-height:1.2;
  }

  .km-detail__head-left{
    order:2;
    width:100%;
  }

  .km-detail__info .km-title{
    margin-top:4px;
    margin-bottom:2px;
    font-size:1.18rem;
    line-height:1.18;
  }

  .km-detail__info .km-single__content > p:first-of-type{
    margin-top:2px;
    margin-bottom:6px;
    font-size:13px;
    line-height:1.34;
  }

  .km-detail__info .km-sep{
    margin-top:8px;
    margin-bottom:8px;
  }
}

/* ----------------------------
   Küçük siyah geri buton (Single ev)
----------------------------- */
.km-back--icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:999px;
  background:#111;
  color:#fff;
  text-decoration:none;
  margin-bottom:12px;
  box-shadow:0 8px 20px rgba(0,0,0,.12);
  border:0;
  line-height:1;
}
.km-back--icon:hover{ opacity:.94; }
.km-back--icon:active{ transform:translateY(1px); }
.km-back--icon .km-back__chev{
  font-size:18px;
  line-height:1;
  font-weight:700;
  display:inline-block;
  transform:translateX(1px);
}
.km-back .km-back__text{ display:none !important; }
@media (max-width:520px){
  .km-back--icon{ width:36px; height:36px; }
  .km-back--icon .km-back__chev{ font-size:16px; }
}
/* SINGLE EV – mobilde profil, başlık ve açıklama arasındaki boşluğu minimuma indir */
@media (max-width: 720px) {

  /* Balon üst padding'i çok az olsun */
  .km-detail__info {
    padding-top: 4px;
  }

  /* Header altındaki ilk ayırıcıyı (hr) sıfıra yakın hale getir */
  .km-detail__info > .km-sep:first-of-type {
    margin-top: 4px;
    margin-bottom: 2px;
  }

  /* Açıklama bloğunun üst boşluğunu kaldır */
  .km-detail__info .km-single__content {
    margin-top: 0;
  }

  /* İlk paragrafı başlığa çok yaklaştır */
  .km-detail__info .km-single__content > p:first-of-type {
    margin-top: 0;
    margin-bottom: 6px;
  }
}
/* === SINGLE EV – Mobilde profi̇l + başlık + açıklama boşluğunu mi̇ni̇muma i̇ndi̇r (override) === */
@media (max-width: 720px) {

  /* Balonun üst padding'i: neredeyse sıfır */
  .km-detail__info {
    padding-top: 2px !important;
    padding-bottom: 12px;
    margin-top: 8px;
  }

  /* Profil + başlık grubu tamamen sıkı */
  .km-detail__head {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;          /* profil–başlık arası çok az */
    margin-top: 2px !important;
    margin-bottom: 2px !important;
  }

  /* PROFİL kartı: daha ufak ve alçak */
  .km-detail__head-right {
    order: 1;
    align-self: flex-start;
    align-items: flex-start;
    width: 100%;
  }

  .km-detail__head-right .km-author-mini--boxed {
    padding: 4px 6px !important;  /* iç boşluğu iyice düşür */
    border-radius: 10px;
    gap: 6px;
    max-width: 190px;
    margin: 2px 0 0 0 !important;
  }

  .km-author-mini__avatar {
    width: 40px;
    height: 40px;
  }

  .km-author-mini__info {
    font-size: 11px;
    line-height: 1.15;
  }

  /* BAŞLIK bloğu: profilin hemen peşine, çok az boşlukla */
  .km-detail__head-left {
    order: 2;
    width: 100%;
  }

  .km-detail__info .km-title {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    font-size: 1.12rem;
    line-height: 1.16;
  }

  /* İlk paragraf (kısa açıklama) başlığa yapışık dursun */
  .km-detail__info .km-single__content {
    margin-top: 0 !important;
  }

  .km-detail__info .km-single__content > p:first-of-type {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
    font-size: 13px;
    line-height: 1.3;
  }

  /* Header ile açıklama arasındaki ayırıcıyı (ilk hr) iyice daralt */
  .km-detail__info > .km-sep:first-of-type {
    margin-top: 4px !important;
    margin-bottom: 2px !important;
  }
}
/* === SINGLE EV – Mobilde profil ile başlık + açıklama arasındaki boşluğu tamamen sıkıştır === */
@media (max-width: 720px) {

  /* Balonun iç üst paddingi çok küçük olsun */
  .km-detail__info {
    padding-top: 2px !important;
    padding-bottom: 12px;
    margin-top: 8px;
  }

  /* Header + profil grubu: profil üstte, başlık hemen altında, araları çok az */
  .km-detail__head {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;             /* profil–başlık arası */
    margin-top: 2px !important;
    margin-bottom: 0 !important;     /* header altındaki boşluğu sıfırla */
  }

  .km-detail__head-right {
    order: 1;
    align-self: flex-start;
    align-items: flex-start;
    width: 100%;
  }

  .km-detail__head-right .km-author-mini--boxed {
    padding: 4px 6px !important;
    border-radius: 10px;
    gap: 6px;
    max-width: 190px;
    margin: 2px 0 0 0 !important;
  }

  .km-author-mini__avatar {
    width: 40px;
    height: 40px;
  }

  .km-author-mini__info {
    font-size: 11px;
    line-height: 1.15;
  }

  .km-detail__head-left {
    order: 2;
    width: 100%;
  }

  .km-detail__info .km-title {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    font-size: 1.12rem;
    line-height: 1.16;
  }

  /* İlk separator (header ile açıklama arasındaki çizgi) neredeyse yok olsun
     hatta istersen tamamen gizleyebiliriz: display:none */
  .km-detail__info > .km-sep:first-of-type {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-top: none !important;   /* çizgiyi gizle */
    height: 0 !important;
  }

  /* Açıklama bloğunun üst boşluğunu kaldır, başlığa yapışsın */
  .km-detail__info .km-single__content {
    margin-top: 0 !important;
  }

  .km-detail__info .km-single__content > p:first-of-type {
    margin-top: 2px !important;
    margin-bottom: 6px !important;
    font-size: 13px;
    line-height: 1.3;
  }

  /* Açıklama ile yorumlar arasındaki separator mesafesi de kısa */
  .km-detail__info .km-sep {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
  }
}