/* Fil vertical public (Reels) — ATHENA dark + accent #12d18e */

.community-reels {
  --cr-emerald: #12d18e;
  --cr-ink: #f4f7f8;
  --cr-muted: rgba(244, 247, 248, 0.72);
  --cr-soft: rgba(244, 247, 248, 0.45);
  --cr-bg: #0c1116;
  --cr-bg-2: #070a0c;
  --cr-primary: var(--cr-tenant-primary, var(--cr-emerald));
  --cr-accent: var(--cr-tenant-accent, var(--cr-emerald));
  --cr-on-accent: #04231a;
  --cr-top-h: 3.25rem;

  position: relative;
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% 0%, #121a20 0%, var(--cr-bg) 45%, var(--cr-bg-2) 100%);
  color: var(--cr-ink);
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.community-reels__top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  height: var(--cr-top-h);
  padding: 0 0.75rem;
  background: linear-gradient(180deg, rgba(7, 10, 12, 0.88) 0%, rgba(7, 10, 12, 0.35) 70%, transparent 100%);
  pointer-events: none;
}

.community-reels__top > * {
  pointer-events: auto;
}

.community-reels__back,
.community-reels__gallery-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  color: var(--cr-ink);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.community-reels__back:hover,
.community-reels__gallery-link:hover,
.community-reels__back:focus-visible,
.community-reels__gallery-link:focus-visible {
  background: rgba(18, 209, 142, 0.16);
  border-color: rgba(18, 209, 142, 0.45);
  outline: none;
}

.community-reels__back span {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-reels__gallery-link {
  justify-self: end;
}

.community-reels__brand {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-accent);
}

.community-reels__scroller {
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.community-reels__scroller:focus {
  outline: none;
}

.community-reels__slide {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #000;
}

.community-reels__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.community-reels__media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.community-reels__media--image {
  object-fit: cover;
}

.community-reels__blur-host {
  position: relative;
  width: 100%;
  height: 100%;
}

.community-reels__blur-host .community-reels__media {
  position: absolute;
  inset: 0;
}

.community-reels__blur-patch {
  position: absolute;
  border-radius: 0.35rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(12, 17, 22, 0.18);
  pointer-events: none;
}

.community-reels__placeholder,
.community-reels__embed-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(145deg, rgba(18, 209, 142, 0.12), transparent 40%),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 50%),
    #10161b;
}

.community-reels__embed-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.community-reels__embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.community-reels__embed-hint {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(7, 10, 12, 0.72);
  border: 1px solid rgba(18, 209, 142, 0.35);
  color: var(--cr-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.community-reels__embed-wrap.is-playing .community-reels__embed-hint {
  display: none;
}

.community-reels__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 10, 12, 0.45) 0%, transparent 18%, transparent 58%, rgba(7, 10, 12, 0.82) 100%);
  pointer-events: none;
}

.community-reels__actions {
  position: absolute;
  right: 0.75rem;
  bottom: max(5.5rem, calc(env(safe-area-inset-bottom, 0px) + 5rem));
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.community-reels__action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 3rem;
  min-height: 3rem;
  padding: 0.45rem 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(7, 10, 12, 0.45);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.community-reels__action:hover,
.community-reels__action:focus-visible {
  background: rgba(18, 209, 142, 0.2);
  border-color: rgba(18, 209, 142, 0.5);
  outline: none;
}

.community-reels__action:active {
  transform: scale(0.94);
}

.community-reels__like.is-liked {
  color: var(--cr-accent);
  border-color: rgba(18, 209, 142, 0.55);
  background: rgba(18, 209, 142, 0.16);
}

.community-reels__like-count {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  min-height: 0.7rem;
}

.community-reels__mute[aria-pressed="false"] .community-reels__icon--muted {
  display: none;
}

.community-reels__mute[aria-pressed="false"] .community-reels__icon--unmuted {
  display: block;
}

.community-reels__mute[aria-pressed="true"] .community-reels__icon--unmuted {
  display: none;
}

.community-reels__meta {
  position: absolute;
  left: 0.9rem;
  right: 4.25rem;
  bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
}

.community-reels__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.community-reels__caption {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--cr-muted);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.community-reels__caption--soft {
  color: var(--cr-soft);
}

.community-reels__hint {
  position: fixed;
  left: 50%;
  bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  z-index: 30;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(7, 10, 12, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cr-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.community-reels__hint.is-hidden {
  opacity: 0;
}

.community-reels__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 100dvh;
  padding: 5rem 1.5rem 2rem;
  text-align: center;
}

.community-reels__empty-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.community-reels__empty-text {
  margin: 0;
  max-width: 22rem;
  color: var(--cr-muted);
  line-height: 1.5;
}

.community-reels__empty-cta {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--cr-accent);
  color: var(--cr-on-accent);
  font-weight: 700;
  text-decoration: none;
}

.community-reels__like-notice {
  position: fixed;
  left: 50%;
  top: calc(var(--cr-top-h) + 0.5rem);
  z-index: 50;
  transform: translateX(-50%);
  max-width: min(22rem, calc(100vw - 1.5rem));
  margin: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 0.75rem;
  background: rgba(7, 10, 12, 0.92);
  border: 1px solid rgba(18, 209, 142, 0.35);
  color: var(--cr-ink);
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
}

.community-reels__like-notice a {
  color: var(--cr-accent);
  font-weight: 700;
}

/* Layout chrome overrides when reels page is active */
body.community-reels-page {
  background: var(--cr-bg-2, #070a0c) !important;
}

body.community-reels-page .grain {
  display: none;
}

body.community-reels-page > main {
  min-height: 100dvh !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

@media (min-width: 768px) {
  .community-reels {
    display: flex;
    justify-content: center;
    background: #050708;
  }

  .community-reels__scroller,
  .community-reels__empty {
    width: min(100%, 28rem);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 80px rgba(0, 0, 0, 0.55);
  }

  .community-reels__top {
    left: 50%;
    right: auto;
    width: min(100%, 28rem);
    transform: translateX(-50%);
  }
}
