/* Anasayfa Canlı Sohbet — Kairatoon tema */
.hlc {
  --hlc-radius: var(--radius, 0.875rem);
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  border-radius: var(--hlc-radius);
  border: 1px solid hsl(var(--border) / 0.85);
  background:
    linear-gradient(165deg, hsl(var(--primary) / 0.07), transparent 42%),
    hsl(var(--card));
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / 0.06);
  overflow: hidden;
  min-height: 300px;
  max-height: 440px;
  box-sizing: border-box;
}
.hlc *,
.hlc *::before,
.hlc *::after {
  box-sizing: border-box;
}
.hlc--expanded {
  max-height: min(72vh, 680px);
  min-height: 460px;
}
.hlc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid hsl(var(--border) / 0.7);
  background: hsl(var(--secondary) / 0.35);
  min-width: 0;
}
.hlc-head__left {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}
.hlc-head__icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.14);
  border: 1px solid hsl(var(--primary) / 0.28);
  flex-shrink: 0;
}
.hlc-head__titles {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.hlc-head__title {
  font-size: 0.92rem;
  font-weight: 800;
  color: hsl(var(--foreground));
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.hlc-head__sub {
  font-size: 0.7rem;
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hlc-head__right {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.hlc-live {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(150 55% 72%);
  background: hsl(150 45% 14% / 0.9);
  border: 1px solid hsl(150 50% 40% / 0.35);
}
.hlc-live--off {
  color: hsl(var(--muted-foreground));
  background: hsl(var(--secondary));
  border-color: hsl(var(--border));
}
.hlc-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: hsl(150 70% 45%);
  box-shadow: 0 0 0 3px hsl(150 70% 45% / 0.2);
  flex-shrink: 0;
}
.hlc-live--off .hlc-dot {
  background: hsl(var(--muted-foreground));
  box-shadow: none;
}
.hlc-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  color: hsl(var(--muted-foreground));
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hlc-iconbtn:hover,
.hlc-iconbtn:active {
  color: hsl(var(--foreground));
  background: hsl(var(--secondary));
  border-color: hsl(var(--border));
}
.hlc-body {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.4rem 0.45rem 0.55rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--primary) / 0.35) transparent;
}
.hlc-empty {
  margin: 1.75rem 1rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.5;
}
.hlc-empty strong {
  color: hsl(var(--foreground));
}
.hlc-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: 0.5rem;
  align-items: start;
  padding: 0.5rem 0.5rem;
  margin: 0.15rem 0;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  background: hsl(var(--secondary) / 0.45);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.hlc-row--staff {
  border-color: hsl(var(--primary) / 0.22);
  background:
    linear-gradient(120deg, hsl(var(--primary) / 0.08), transparent 55%),
    hsl(var(--secondary) / 0.55);
}
.hlc-row__main {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.hlc-row__top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
  min-width: 0;
  width: 100%;
}
.hlc-row__who {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.hlc-row__end {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.15rem;
  flex: 0 0 auto;
}
.hlc-row__actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.hlc-row__actions .hlc-iconbtn {
  width: 1.65rem;
  height: 1.65rem;
  opacity: 0.7;
}
.hlc-row:hover .hlc-row__actions .hlc-iconbtn,
.hlc-row:focus-within .hlc-row__actions .hlc-iconbtn {
  opacity: 1;
}
.hlc-iconbtn--danger:hover,
.hlc-iconbtn--danger:active {
  color: hsl(0 84% 68%);
  background: hsl(0 45% 14% / 0.85);
  border-color: hsl(0 72% 51% / 0.35);
}
.hlc-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  overflow: hidden;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: hsl(var(--foreground));
  flex-shrink: 0;
}
.hlc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hlc-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: hsl(var(--foreground));
  text-decoration: none;
  min-width: 0;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}
.hlc-name:hover {
  color: hsl(var(--primary));
}
.hlc-time {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}
.hlc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.05rem;
  padding: 0 0.35rem;
  border-radius: 0.3rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
  max-width: 3.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hlc-badge--level {
  color: hsl(var(--muted-foreground));
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
}
.hlc-badge--role {
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.hlc-badge--rainbow {
  background: linear-gradient(90deg, #fde047, #f97316, #ec4899, #a855f7, #3b82f6);
  background-size: 200% 100%;
}
.hlc-quote {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.1rem 0 0.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.5rem;
  background: hsl(0 0% 100% / 0.03);
  border-left: 2px solid hsl(var(--primary) / 0.55);
  font-size: 0.72rem;
  color: hsl(var(--muted-foreground));
  min-width: 0;
  max-width: 100%;
}
.hlc-quote__user {
  font-weight: 800;
  color: hsl(var(--primary));
  white-space: nowrap;
  flex-shrink: 0;
}
.hlc-quote__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.hlc-text {
  margin: 0.1rem 0 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: hsl(var(--foreground) / 0.92);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.hlc-emote {
  display: block;
  object-fit: contain;
  margin-top: 0.25rem;
  user-select: none;
  -webkit-user-drag: none;
}
.hlc-emote--emoji {
  width: 1.85rem;
  height: 1.85rem;
}
.hlc-emote--sticker {
  width: min(7.5rem, 42vw);
  height: auto;
  max-height: 7.5rem;
}
.hlc-compose {
  position: relative;
  border-top: 1px solid hsl(var(--border) / 0.75);
  padding: 0.55rem 0.65rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: hsl(var(--secondary) / 0.28);
}
.hlc-emoji-btn.is-active {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
}
.hlc-picker {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: calc(100% + 0.35rem);
  z-index: 20;
  max-height: 14.5rem;
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border) / 0.85);
  background: hsl(var(--card));
  box-shadow: 0 10px 28px hsl(0 0% 0% / 0.28);
  overflow: hidden;
}
.hlc-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem 0.25rem;
  border-bottom: 1px solid hsl(var(--border) / 0.55);
}
.hlc-picker__tabs {
  display: flex;
  gap: 0.2rem;
  min-width: 0;
  overflow-x: auto;
}
.hlc-picker__tab {
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.hlc-picker__tab.is-active {
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}
.hlc-picker__upload {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid hsl(var(--border) / 0.45);
}
.hlc-picker__kinds {
  display: flex;
  gap: 0.2rem;
}
.hlc-picker__kind {
  border: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  cursor: pointer;
}
.hlc-picker__kind.is-active {
  border-color: hsl(var(--primary) / 0.55);
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
}
.hlc-picker__uploadbtn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}
.hlc-picker__uploadbtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.hlc-picker__hint {
  margin: 0;
  padding: 0 0.55rem 0.35rem;
  font-size: 0.65rem;
  line-height: 1.3;
  color: hsl(var(--muted-foreground));
}
.hlc-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.1rem, 1fr));
  gap: 0.35rem;
  padding: 0.45rem;
  overflow-y: auto;
  min-height: 5.5rem;
}
.hlc-picker__empty {
  grid-column: 1 / -1;
  margin: 0.75rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}
.hlc-picker__item {
  position: relative;
}
.hlc-picker__btn {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid hsl(var(--border) / 0.55);
  border-radius: 0.55rem;
  background: hsl(var(--secondary) / 0.35);
  display: grid;
  place-items: center;
  padding: 0.2rem;
  cursor: pointer;
}
.hlc-picker__btn:hover {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary) / 0.08);
}
.hlc-picker__btn .hlc-emote {
  margin: 0;
  width: 85%;
  height: 85%;
  max-height: none;
}
.hlc-picker__fav {
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--card) / 0.92);
  box-shadow: 0 1px 4px hsl(0 0% 0% / 0.25);
}
.hlc-picker__fav.is-on {
  color: #fbbf24;
}
.hlc-picker__del {
  position: absolute;
  bottom: 0.1rem;
  right: 0.1rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fecaca;
  background: hsl(0 70% 35% / 0.92);
  box-shadow: 0 1px 4px hsl(0 0% 0% / 0.25);
}
.hlc-picker__del:hover {
  color: #fff;
  background: hsl(0 75% 42% / 0.95);
}
.hlc-replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.22);
  font-size: 0.72rem;
  color: hsl(var(--muted-foreground));
  min-width: 0;
}
.hlc-replying > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hlc-replying strong {
  color: hsl(var(--primary));
}
.hlc-inputrow {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}
.hlc-input {
  flex: 1;
  min-width: 0;
  height: 2.55rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  padding: 0 0.85rem;
  font-size: 16px; /* iOS zoom önleme */
  outline: none;
}
.hlc-input:focus {
  border-color: hsl(var(--primary) / 0.55);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}
.hlc-input::placeholder {
  color: hsl(var(--muted-foreground) / 0.85);
  font-size: 0.9rem;
}
.hlc-send {
  width: 2.55rem;
  height: 2.55rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  border: 0;
  display: grid;
  place-items: center;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hlc-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.hlc-guest {
  border-top: 1px solid hsl(var(--border) / 0.75);
  padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  background: hsl(var(--secondary) / 0.3);
}
.hlc-guest__text {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-align: center;
}
.hlc-guest__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.hlc-guest__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.35rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.hlc-guest__btn--primary {
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}
.hlc-guest__btn--ghost {
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary) / 0.6);
}

/* —— Mobil —— */
@media (max-width: 640px) {
  .hlc {
    min-height: 280px;
    max-height: min(58vh, 380px);
    border-radius: 0.85rem;
  }
  .hlc--expanded {
    max-height: min(78vh, 560px);
    min-height: 360px;
  }
  .hlc-head {
    padding: 0.55rem 0.65rem;
  }
  .hlc-head__icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.5rem;
  }
  .hlc-head__sub {
    display: none;
  }
  .hlc-head__title {
    font-size: 0.88rem;
  }
  .hlc-live {
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    justify-content: center;
    border-radius: 999px;
  }
  .hlc-live > span:last-child {
    display: none;
  }
  .hlc-body {
    padding: 0.3rem 0.35rem 0.4rem;
  }
  .hlc-row {
    grid-template-columns: 1.85rem minmax(0, 1fr);
    column-gap: 0.4rem;
    padding: 0.4rem 0.4rem;
    margin: 0.1rem 0;
    border-radius: 0.55rem;
  }
  .hlc-avatar {
    width: 1.85rem;
    height: 1.85rem;
  }
  .hlc-name {
    max-width: 38%;
    font-size: 0.78rem;
  }
  .hlc-badge {
    max-width: 2.8rem;
    font-size: 0.55rem;
    height: 1rem;
    padding: 0 0.28rem;
  }
  .hlc-row__actions .hlc-iconbtn {
    width: 1.55rem;
    height: 1.55rem;
    opacity: 0.9;
  }
  .hlc-text {
    font-size: 0.82rem;
    line-height: 1.35;
    margin-top: 0.15rem;
  }
  .hlc-compose {
    padding: 0.5rem 0.55rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  }
  .hlc-input {
    height: 2.45rem;
    border-radius: 0.7rem;
  }
  .hlc-send {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.7rem;
  }
  .hlc-guest {
    padding: 0.65rem 0.6rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  }
  .hlc-guest__btn {
    height: 2.45rem;
  }
}

@media (min-width: 641px) {
  .hlc-guest {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }
  .hlc-guest__actions {
    display: inline-flex;
    grid-template-columns: none;
  }
  .hlc-guest__btn {
    min-width: 6.5rem;
  }
  .hlc-row__actions {
    opacity: 0.35;
    transition: opacity 0.15s;
  }
  .hlc-row:hover .hlc-row__actions,
  .hlc-row:focus-within .hlc-row__actions {
    opacity: 1;
  }
  .hlc-input {
    font-size: 0.9rem;
  }
}
