/* TalkChat Hayal v0.24.2 - profile photo lightbox + mobile spacing fix */

/* Avatar remains exactly where it is; only indicate that it can be enlarged. */
#profilePanel .profile-avatar-wrap img {
  cursor: zoom-in;
}

/* Site-internal original profile photo viewer. */
#hayalProfilePhotoLightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(2px);
}

#hayalProfilePhotoLightbox.open {
  display: flex;
}

#hayalProfilePhotoLightbox .hayal-profile-photo-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(94vw, 1500px);
  height: min(90vh, 1100px);
}

#hayalProfilePhotoLightbox .hayal-profile-photo-original {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 4px;
  background: #0b1118;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .65);
  cursor: default;
}

#hayalProfilePhotoLightbox .hayal-profile-photo-close {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(18, 27, 39, .92);
  color: #fff;
  font: 400 25px/1 Arial, sans-serif;
  cursor: pointer;
}

#hayalProfilePhotoLightbox .hayal-profile-photo-close:hover {
  background: rgba(35, 48, 63, .98);
}

/*
 * Mobile: preserve the current one-row layout and button order.
 * Only give the existing profile content more horizontal/vertical room.
 */
body.mobile-layout .profile-scroll {
  padding-top: 12px;
  padding-bottom: 34px;
}

body.mobile-layout .profile-wide {
  width: calc(100% - 20px);
}

body.mobile-layout .profile-followers {
  margin-top: 15px;
  margin-bottom: 18px;
}

body.mobile-layout .profile-two {
  height: 36px;
  margin-bottom: 9px;
}

body.mobile-layout .profile-actions {
  height: 62px;
  margin-bottom: 11px;
}

body.mobile-layout .profile-action {
  min-width: 0;
}

body.mobile-layout .profile-action span:last-child {
  white-space: nowrap;
}

body.mobile-layout .joined-title,
body.mobile-layout .joined-room {
  min-height: 34px;
  height: auto;
}

@media (max-width: 760px) {
  #hayalProfilePhotoLightbox {
    padding: 10px;
    background: rgba(0, 0, 0, .94);
  }

  #hayalProfilePhotoLightbox .hayal-profile-photo-stage {
    width: 100%;
    height: 100%;
  }

  #hayalProfilePhotoLightbox .hayal-profile-photo-original {
    max-width: 96vw;
    max-height: 92dvh;
    border-radius: 2px;
    cursor: pointer;
  }

  #hayalProfilePhotoLightbox .hayal-profile-photo-close {
    top: calc(10px + env(safe-area-inset-top));
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 23px;
  }
}

/* =========================================================
   HAYAL MOBILE PROFILE COLLAPSE FIX
   Mevcut tasarım korunur. Yalnız flex shrink engellenir.
   ========================================================= */
@media (max-width:760px) {

  body.mobile-layout .profile-scroll {
    padding-top: 10px !important;
    padding-bottom: 24px !important;
  }

  body.mobile-layout .profile-avatar-wrap,
  body.mobile-layout .profile-name,
  body.mobile-layout .profile-role,
  body.mobile-layout .profile-followers,
  body.mobile-layout .profile-two,
  body.mobile-layout .profile-actions,
  body.mobile-layout .profile-wide {
    flex-shrink: 0 !important;
  }

  /* Takip Et | Favori ekle — mevcut iki sütun */
  body.mobile-layout .profile-two {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;

    height: 32px !important;
    min-height: 32px !important;
    flex-basis: 32px !important;

    margin-bottom: 7px !important;
    overflow: hidden !important;
  }

  body.mobile-layout .profile-two button {
    min-width: 0 !important;
    height: 30px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Engelle | Görüntülü | Sesli | Mesaj — mevcut tek satır */
  body.mobile-layout .profile-actions {
    display: grid !important;
    grid-template-columns: repeat(4,1fr) !important;

    height: 59px !important;
    min-height: 59px !important;
    flex-basis: 59px !important;

    margin-bottom: 8px !important;
    overflow: hidden !important;
  }

  body.mobile-layout .profile-action {
    min-width: 0 !important;
    height: 57px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    visibility: visible !important;
    opacity: 1 !important;
  }

  body.mobile-layout .profile-action .icon-svg {
    display: block !important;
  }

  body.mobile-layout .profile-action span {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /*
   * Alanı yalnızca biraz genişlet.
   * Tasarım ve buton sırası değişmez.
   */
  body.mobile-layout .profile-wide {
    width: calc(100% - 24px) !important;
  }

  body.mobile-layout .profile-followers {
    margin-top: 14px !important;
    margin-bottom: 16px !important;
  }

  body.mobile-layout .joined-title,
  body.mobile-layout .joined-room {
    height: 32px !important;
    min-height: 32px !important;
  }
}
