/* Manifest Hilal bölümü: platformların kendi gömme iframe'leri, etrafı uygulamanın sade çerçevesi */

.hilal {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  padding: 2px 16px 16px;
}

/* ---------- Başlık ---------- */

.hl-hero {
  flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.hl-hero-icon { width: 34px; height: 34px; filter: drop-shadow(0 2px 8px color-mix(in srgb, var(--accent) 45%, transparent)); }
.hl-hero-text { flex: 1; min-width: 160px; }
.hl-hero-text h2 { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }
.hl-hero-text p { color: var(--muted); font-size: 12px; }
.hl-hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; }
.hl-search { display: flex; gap: 8px; color: var(--faint); }
.hl-search-links { display: flex; gap: 8px; }
.hl-search-link { color: var(--muted); text-decoration: none; }
.hl-search-link:hover, .hl-search-link:focus-visible { color: var(--accent); }
.hl-open { color: var(--accent); font-size: 12px; text-decoration: none; white-space: nowrap; }
.hl-open:hover { text-decoration: underline; }

/* ---------- Yerleşim: akış + keşfet ---------- */

.hl-body { display: grid; gap: 16px; align-items: start; }
.hl-feed { display: grid; gap: 10px; min-width: 0; }
.hl-discover { order: -1; } /* dar ekranda üstte */

@container (min-width: 780px) {
  .hl-body { grid-template-columns: minmax(0, 1fr) 320px; }
  .hl-discover { order: 0; position: sticky; top: 0; }
}

/* ---------- Ekleme kutusu ---------- */

.hl-form {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 4px 0 10px;
  background: var(--raise); border: 1px solid var(--line); border-radius: 10px;
}
.hl-form:focus-within { border-color: var(--accent); }
.hl-form input { flex: 1; min-width: 0; background: none; border: 0; outline: none; }
.hl-form input::placeholder { color: var(--faint); }
.hl-paste { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; color: var(--muted); }
.hl-paste:hover { color: var(--fg); background: var(--panel); }
.hl-add { height: 32px; padding: 0 16px; border-radius: 7px; background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.hl-add:disabled { opacity: 0.6; cursor: wait; }
.hl-msg { color: var(--err); font-size: 12px; }
.hl-msg.ok { color: var(--ok); }
.hl-msg:empty { display: none; }

/* Platform rozetleri */
.hl-badge {
  flex: none; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: #fff; background: #555;
}
.hl-badge.tiktok { background: #111; box-shadow: inset 2px 0 #25f4ee, inset -2px 0 #fe2c55; }
.hl-badge.x { background: #000; }
.hl-badge.instagram { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af); }

/* ---------- Süzgeç, sıralama ---------- */

.hl-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.hl-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.hl-chip {
  flex: none; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; white-space: nowrap;
  color: var(--muted); background: var(--raise); border: 1px solid var(--line);
}
.hl-chip:hover { color: var(--fg); border-color: var(--faint); }
.hl-chip.on { color: var(--fg); border-color: var(--accent); }
.hl-chip.small { height: 24px; padding: 0 10px; font-size: 11px; }

/* ---------- Boş durum ---------- */

.hl-empty {
  display: grid; justify-items: center; gap: 6px; padding: 28px 20px; text-align: center;
  border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 12px; line-height: 1.6;
}
.hl-empty .icon { width: 42px; height: 42px; opacity: 0.9; }
.hl-empty > b { color: var(--fg); font-size: 13px; }
.hl-empty p b { color: var(--fg); font-weight: 600; }

/* ---------- Gönderi kartları ---------- */

/* Farklı boylar (dikey video, tweet, Instagram): sütunlara akan düzen */
.hl-pins { columns: 3 220px; column-gap: 14px; }
.hl-pin { break-inside: avoid; margin: 0 0 16px; display: grid; gap: 7px; }
.hl-frame { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); }
.hl-pin.tiktok .hl-frame { aspect-ratio: 325 / 578; background: #000; }
.hl-pin.instagram .hl-frame { background: #fff; }
.hl-post { display: block; width: 100%; height: 100%; border: 0; }
/* Yüklenirken nazik parıltı (boş beyaz/siyah kutu yerine) */
.hl-frame.loading::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--fg) 7%, transparent) 50%, transparent 70%) var(--raise);
  background-size: 250% 100%;
  animation: hl-shimmer 1.4s linear infinite;
}
@keyframes hl-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.hl-pin figcaption {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who actions" "when when";
  align-items: center; gap: 0 8px; font-size: 12px;
}
.hl-meta { display: contents; }
.hl-who { grid-area: who; display: flex; align-items: center; gap: 6px; min-width: 0; }
.hl-when { grid-area: when; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-new { flex: none; padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 700; color: var(--accent-fg); background: var(--accent); }
.hl-meta small { color: var(--faint); font-size: 11px; }
.hl-actions { grid-area: actions; display: flex; align-items: center; gap: 2px; }
.hl-like {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: 7px;
  color: var(--muted); font-size: 12px;
}
.hl-like:hover { color: #ff5c8a; background: var(--raise); }
.hl-like.on { color: #ff5c8a; }
.hl-like.on svg.i { fill: currentColor; }
.hl-like.on svg.i { animation: hl-pop 0.25s ease-out; }
@keyframes hl-pop { 50% { transform: scale(1.3); } }
.hl-actions .hl-open { padding: 0 6px; }
.hl-del { width: 28px; height: 28px; border-radius: 7px; color: var(--faint); }
.hl-del:hover { color: var(--err); background: var(--raise); }
.hl-more { justify-self: center; height: 32px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.hl-more:hover { color: var(--fg); border-color: var(--faint); }

/* ---------- TikTok'ta keşfet ---------- */

.hl-discover {
  display: grid; gap: 10px; padding: 12px; border-radius: 12px;
  background: var(--raise); border: 1px solid var(--line);
}
.hl-discover-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hl-discover-head b { font-size: 13px; }
.hl-collapse { height: 24px; padding: 0 10px; border-radius: 6px; color: var(--muted); font-size: 11px; }
.hl-collapse:hover { color: var(--fg); background: var(--panel); }
.hl-discover.collapsed .hl-discover-body { display: none; }
.hl-discover-body { display: grid; gap: 10px; }
.hl-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.hl-tab {
  flex: none; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11px; white-space: nowrap;
  color: var(--muted); border: 1px solid var(--line); background: var(--panel);
}
.hl-tab:hover { color: var(--fg); }
.hl-tab.on { color: var(--fg); border-color: var(--accent); }
/* TikTok gömmeleri beyaz: köşeleri yuvarla, altına kendi künyesini koy */
.hl-embed { overflow: hidden; border-radius: 10px; background: #fff; }
.hl-embed-frame { display: block; width: 100%; height: 400px; border: 0; }
.hl-embed.tag .hl-embed-frame { height: 380px; }
.hl-embed-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: var(--panel); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.hl-tip { color: var(--faint); font-size: 11px; line-height: 1.5; }
.hl-tip b { color: var(--muted); font-weight: 600; }

/* Dar ekran (telefon): tek sütun; X ve Instagram gömmelerinin en az genişliği var */
@container (max-width: 520px) {
  .hl-pins { columns: 1; }
  .hl-hero-links { width: 100%; }
  .hl-embed-frame { height: 360px; }
  .hl-embed.tag .hl-embed-frame { height: 350px; }
}
