/* reels.css · AaG TLSHive Reels v1.1 · Desria
 * Modes: phone (embed vertical) · strip (mini)
 * Sin fullscreen de navegador — el “fullscreen” es el frame del teléfono.
 */

:root {
  --tr-bg: #020617;
  --tr-surface: rgba(8, 20, 35, 0.92);
  --tr-border: rgba(34, 211, 238, 0.22);
  --tr-cyan: #22d3ee;
  --tr-emerald: #34d399;
  --tr-magenta: #e879f9;
  --tr-text: #e2e8f0;
  --tr-muted: rgba(226, 232, 240, 0.55);
  --tr-phone-w: 320px;
  --tr-phone-h: 640px;
}

.tr-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 14px;
}
.tr-filter {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--tr-border); background: transparent;
  color: var(--tr-muted); transition: all 0.15s;
}
.tr-filter:hover { color: var(--tr-cyan); border-color: var(--tr-cyan); }
.tr-filter.active {
  background: rgba(34, 211, 238, 0.12); color: var(--tr-cyan);
  border-color: var(--tr-cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
}
.tr-count {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--tr-muted); margin-left: auto;
}

.tr-phone-wrap {
  display: flex; justify-content: center; align-items: flex-start;
  width: 100%;
}
.tr-phone {
  width: min(100%, var(--tr-phone-w));
  height: var(--tr-phone-h);
  max-height: min(72vh, 720px);
  border-radius: 28px;
  border: 2px solid rgba(34, 211, 238, 0.35);
  background: #000;
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.15),
    0 24px 64px rgba(0, 0, 0, 0.55),
    inset 0 0 40px rgba(34, 211, 238, 0.04);
  position: relative;
  overflow: hidden;
}
.tr-phone::before {
  content: '';
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 72px; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,0.12); z-index: 5; pointer-events: none;
}
.tr-phone-feed {
  cursor: grab;

  height: 100%; width: 100%;
  overflow-y: auto; scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tr-phone-feed::-webkit-scrollbar { display: none; }

.tr-item {
  height: 100%; min-height: 100%;
  scroll-snap-align: start; scroll-snap-stop: normal;
  position: relative; display: flex; flex-direction: column;
  background: #050b14;
}

/* Media fill — absolute (no depende de height %) */
.tr-item-media {
  flex: 1 1 auto;
  position: relative;
  min-height: 180px;
  overflow: hidden;
  background: #050b14;
}
.tr-item-media img,
.tr-item-media video,
.tr-item-media .tr-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 0;
  pointer-events: none;
  background: #0a1628;
}
.tr-item-media .tr-text-card {
  position: relative;
  z-index: 1;
  padding: 28px 20px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.tr-item-media .tr-text-card h3 {
  margin: 0 0 12px; font-size: 20px; line-height: 1.2; color: #fff;
}
.tr-item-media .tr-text-card p {
  margin: 0; font-size: 13px; line-height: 1.5; color: var(--tr-muted);
}
.tr-media-img.tr-media-broken {
  object-fit: contain;
  opacity: 0.4;
}

.tr-item-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 56px 14px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 100%);
  pointer-events: none;
}
.tr-item-overlay .tr-actions { pointer-events: auto; display: flex; gap: 8px; margin-top: 10px; }
.tr-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  color: var(--tr-cyan); letter-spacing: 0.08em; text-transform: uppercase;
}
.tr-title { font-size: 16px; font-weight: 700; color: #fff; margin: 4px 0 8px; line-height: 1.25; }
.tr-body {
  font-size: 12px; line-height: 1.4; color: rgba(255,255,255,0.75);
  max-height: 7.2em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
}
.tr-side {
  position: absolute; right: 10px; bottom: 100px; z-index: 3;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.tr-side button {
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.45); color: #fff; cursor: pointer; font-size: 15px;
  backdrop-filter: blur(8px);
}
.tr-side button.fav.active { color: #f472b6; border-color: #f472b6; }
.tr-btn {
  padding: 7px 12px; border-radius: 4px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
  border: 1px solid var(--tr-border); background: rgba(34,211,238,0.1);
  color: var(--tr-cyan);
}
.tr-btn:hover { background: rgba(34,211,238,0.2); }
.tr-badge {
  position: absolute; top: 28px; left: 12px; z-index: 3;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700;
  padding: 3px 8px; border-radius: 3px;
  background: rgba(0,0,0,0.55); border: 1px solid var(--tr-border); color: var(--tr-emerald);
}
.tr-badge.draft { color: #fde68a; border-color: rgba(253,230,138,0.4); }
.tr-empty {
  width: 100%; height: 100%; min-height: 180px;
  display: grid; place-items: center; text-align: center; padding: 24px;
  color: var(--tr-muted); font-family: 'JetBrains Mono', monospace; font-size: 11px;
}

.tr-phone.fill {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 12px;
  border-color: rgba(34, 211, 238, 0.25);
}

@media (max-width: 640px) {
  :root {
    --tr-phone-w: 100%;
    --tr-phone-h: min(78vh, 680px);
  }
  .tr-phone {
    border-radius: 16px;
    max-height: 78vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tr-phone-feed {
  scroll-behavior: auto; }
}

/* Media images — fill phone frame reliably */
.tr-phone-feed {
  will-change: transform;
}
