/* GymLog — "No Insta": convite pra seguir o @app.gymlog, faixa de posts e visualizador estilo story. */
:root {
  --ig-grad: linear-gradient(45deg, #feda75 0%, #fa7e1e 22%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
  --ig-grad-soft: linear-gradient(135deg, rgba(250,126,30,.22), rgba(214,41,118,.22) 50%, rgba(79,91,213,.22));
}

/* ---------- Modal (folha de baixo no celular, cartão no computador) ---------- */
.ig-modal { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(3, 6, 10, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .28s ease; }
.ig-modal.is-open { opacity: 1; }
.ig-modal[hidden] { display: none; }
.ig-sheet { position: relative; width: 100%; max-width: 440px; max-height: 94vh; overflow-y: auto; overscroll-behavior: contain;
  background: #10151c; color: #f3f6f9; border-radius: 26px 26px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.55);
  transform: translateY(40px); transition: transform .42s cubic-bezier(.2,.9,.25,1.15); padding-bottom: env(safe-area-inset-bottom); }
.ig-modal.is-open .ig-sheet { transform: none; }
@media (min-width: 576px) {
  .ig-modal { align-items: center; }
  .ig-sheet { border-radius: 26px; transform: translateY(24px) scale(.97); }
}
.ig-sheet::-webkit-scrollbar { display: none; }

.ig-hero { position: relative; padding: 20px 22px 14px; text-align: center; overflow: hidden; isolation: isolate; }
.ig-hero::before { content: ""; position: absolute; inset: -40% -20% 30%; z-index: -1; background: var(--ig-grad);
  filter: blur(46px); opacity: .55; animation: igGlow 7s ease-in-out infinite alternate; }
.ig-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16,21,28,0) 0%, #10151c 92%); }
@keyframes igGlow { from { transform: translateX(-8%) rotate(-4deg); } to { transform: translateX(8%) rotate(4deg); } }

.ig-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.35); color: #fff; font-size: 20px; line-height: 34px; padding: 0; }

.ig-ring { width: 74px; height: 74px; margin: 2px auto 8px; border-radius: 50%; padding: 3px; background: var(--ig-grad);
  animation: igSpin 6s linear infinite; }
.ig-ring > span { display: block; width: 100%; height: 100%; border-radius: 50%; padding: 3px; background: #10151c; animation: igSpin 6s linear infinite reverse; }
.ig-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #0d1117; }
@keyframes igSpin { to { transform: rotate(360deg); } }
.ig-handle { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .95rem; color: #fff; text-decoration: none; }
.ig-handle svg { width: 16px; height: 16px; }
.ig-kicker { display: inline-block; margin-top: 8px; padding: 4px 11px; border-radius: 999px; font-size: .72rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
.ig-title { font-size: 1.75rem; line-height: 1.08; font-weight: 900; letter-spacing: -.02em; margin: 8px 0 6px; }
.ig-title em { font-style: normal; background: var(--ig-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ig-sub { color: #c4ccd6; font-size: .98rem; line-height: 1.45; margin: 0 auto; max-width: 340px; }
.ig-sub b { color: #fff; }

.ig-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 18px; margin: 2px 0 14px; }
.ig-step { background: #171e27; border: 1px solid #252e3a; border-radius: 16px; padding: 10px 6px 9px; text-align: center; }
.ig-step i { display: grid; place-items: center; width: 26px; height: 26px; margin: 0 auto 6px; border-radius: 50%; font-style: normal;
  font-weight: 900; font-size: .8rem; color: #fff; background: var(--ig-grad); }
.ig-step span { display: block; font-size: .78rem; line-height: 1.2; font-weight: 700; color: #e9eef3; }

.ig-strip-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 20px; margin-bottom: 8px; }
.ig-strip-head h3 { font-size: .95rem; font-weight: 800; margin: 0; }
.ig-strip-head a { font-size: .82rem; color: #fb923c; text-decoration: none; font-weight: 700; }

/* ---------- Faixa de cards 9:16 ---------- */
.ig-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; padding: 2px 20px 6px; scrollbar-width: none; }
.ig-strip::-webkit-scrollbar { display: none; }
.ig-card { position: relative; flex: 0 0 auto; width: 108px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; scroll-snap-align: start;
  background: #1a212b; border: 0; padding: 0; color: #fff; text-align: left; cursor: pointer; isolation: isolate;
  box-shadow: 0 8px 22px rgba(0,0,0,.35); transition: transform .2s ease; }
.ig-card:active { transform: scale(.97); }
.ig-card img, .ig-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.ig-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 28%, transparent 55%, rgba(0,0,0,.78) 100%); }
.ig-card .ig-badge { position: absolute; top: 7px; left: 7px; }
.ig-card .ig-who { position: absolute; left: 8px; right: 8px; bottom: 8px; font-size: .72rem; font-weight: 700; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ig-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; font-size: .62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); color: #fff; }
.ig-badge.k-story { background: var(--ig-grad); }
.ig-badge svg { width: 10px; height: 10px; }
.ig-card.is-you { outline: 2px dashed rgba(251,146,60,.8); outline-offset: -2px; display: grid; place-items: center; text-align: center;
  background: var(--ig-grad-soft), #141a22; }
.ig-card.is-you::after { display: none; }
.ig-card.is-you b { display: block; font-size: 1.9rem; line-height: 1; margin-bottom: 6px; }
.ig-card.is-you span { display: block; font-size: .78rem; font-weight: 800; padding: 0 10px; line-height: 1.25; }

.ig-actions { padding: 14px 20px 16px; }
.ig-follow { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; border-radius: 16px;
  padding: 15px 18px; font-weight: 900; font-size: 1.05rem; color: #fff; text-decoration: none; background: var(--ig-grad);
  background-size: 160% 160%; animation: igShift 5s ease infinite; box-shadow: 0 10px 28px rgba(214,41,118,.35); }
.ig-follow:hover { color: #fff; filter: brightness(1.06); }
.ig-follow svg { width: 22px; height: 22px; }
@keyframes igShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.ig-second { display: flex; gap: 8px; margin-top: 10px; }
.ig-second a, .ig-second button { flex: 1; border-radius: 14px; padding: 11px 10px; font-weight: 700; font-size: .9rem; text-align: center;
  text-decoration: none; border: 1px solid #2a3340; background: #161c25; color: #e6edf3; }
.ig-later { display: block; width: 100%; margin-top: 8px; background: none; border: 0; color: #8b97a5; font-size: .88rem; padding: 6px; }
.ig-tagline { text-align: center; font-size: .78rem; color: #8b97a5; margin-top: 10px; }
.ig-tagline b { color: #fb923c; }

/* ---------- Página /Instagram ---------- */
.ig-page-hero { position: relative; border-radius: 26px; overflow: hidden; isolation: isolate; padding: 28px 20px 22px; text-align: center;
  background: #10151c; border: 1px solid #222a35; margin-bottom: 18px; }
.ig-page-hero::before { content: ""; position: absolute; inset: -50% -10% 40%; z-index: -1; background: var(--ig-grad); filter: blur(60px); opacity: .5;
  animation: igGlow 8s ease-in-out infinite alternate; }
.ig-page-hero .ig-follow { max-width: 340px; margin: 16px auto 0; }
.ig-page-hero .ig-steps { padding: 0; max-width: 420px; margin: 16px auto 0; }
.ig-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.ig-tabs button { flex: 0 0 auto; border: 1px solid #2a3340; background: #161c25; color: #c4ccd6; border-radius: 999px; padding: 7px 14px;
  font-weight: 700; font-size: .85rem; }
.ig-tabs button.on { background: #f3f6f9; color: #0d1117; border-color: #f3f6f9; }
.ig-sec-title { font-size: 1.05rem; font-weight: 800; margin: 18px 0 10px; }
.ig-sec-title small { color: #8b97a5; font-weight: 600; font-size: .8rem; margin-left: 6px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 14px; overflow: hidden; }
@media (min-width: 768px) { .ig-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; } }
.ig-grid .ig-card { width: auto; border-radius: 0; box-shadow: none; }
@media (min-width: 768px) { .ig-grid .ig-card { border-radius: 10px; } }
.ig-empty { border: 1px dashed #344050; border-radius: 18px; padding: 22px 16px; text-align: center; color: #aab4c0; background: #121820; }
.ig-empty b { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 4px; }
.ig-howto { background: #141a22; border: 1px solid #232c38; border-radius: 18px; padding: 16px; margin-top: 18px; }
.ig-howto h3 { font-size: 1rem; font-weight: 800; }
.ig-howto ol { margin: 0; padding-left: 1.2rem; color: #c4ccd6; }
.ig-howto li + li { margin-top: 6px; }
.ig-howto code { color: #fb923c; background: #1d2530; padding: 1px 6px; border-radius: 6px; }

/* ---------- Visualizador (tela cheia, estilo story) ---------- */
.ig-viewer { position: fixed; inset: 0; z-index: 1090; background: #000; color: #fff; display: flex; align-items: center; justify-content: center;
  touch-action: pan-y; animation: igIn .22s ease; }
@keyframes igIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.ig-stage { position: relative; width: 100%; height: 100%; max-width: 480px; background: #000; overflow: hidden; }
@media (min-width: 576px) { .ig-stage { height: min(100%, 860px); border-radius: 18px; } }
.ig-stage video, .ig-stage img.ig-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.ig-bars { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.ig-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.ig-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.ig-bars i.done b { width: 100%; }
.ig-top { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 3; display: flex; align-items: center; gap: 9px;
  text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ig-top .ig-av { width: 34px; height: 34px; border-radius: 50%; padding: 2px; background: var(--ig-grad); flex: 0 0 auto; }
.ig-top .ig-av span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #111; font-weight: 800; font-size: .85rem; overflow: hidden; }
.ig-top .ig-av img { width: 100%; height: 100%; object-fit: cover; }
.ig-top .ig-name { font-weight: 800; font-size: .92rem; line-height: 1.1; min-width: 0; }
.ig-top .ig-name small { display: block; font-weight: 600; opacity: .8; font-size: .72rem; }
.ig-top .ig-sp { flex: 1; }
.ig-top button { border: 0; background: rgba(0,0,0,.35); color: #fff; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.ig-top button svg { width: 18px; height: 18px; }
.ig-tap { position: absolute; top: 80px; bottom: 150px; width: 34%; z-index: 2; border: 0; background: transparent; }
.ig-tap.l { left: 0; } .ig-tap.r { right: 0; }
.ig-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 50px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.8) 45%); }
.ig-bottom p { font-size: .9rem; line-height: 1.35; margin: 0 0 12px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ig-open { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; border-radius: 14px; font-weight: 800;
  color: #fff; text-decoration: none; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px); }
.ig-open:hover { color: #fff; background: rgba(255,255,255,.22); }
.ig-open svg { width: 18px; height: 18px; }
.ig-cta-you { margin-top: 8px; text-align: center; font-size: .8rem; opacity: .85; }
.ig-cta-you b { color: #fdba74; }

@media (prefers-reduced-motion: reduce) {
  .ig-hero::before, .ig-page-hero::before, .ig-ring, .ig-ring > span, .ig-follow { animation: none; }
}

/* ---------- Faixa compacta entre os stories e o feed (ViewComponent InstaFaixa) ---------- */
.ig-faixa { max-width: 640px; margin: -.6rem auto 1rem; background: #121820; border: 1px solid #232c38; border-radius: 14px; overflow: hidden; }
.ig-faixa > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 7px 12px; cursor: pointer; user-select: none;
  font-size: .8rem; color: #c9d1da; line-height: 1.25; }
.ig-faixa > summary::-webkit-details-marker { display: none; }
.ig-fx-ico { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(45deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); }
.ig-fx-ico svg { width: 14px; height: 14px; }
.ig-fx-msg { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-fx-msg b { color: #fff; }
.ig-fx-chev { flex: 0 0 auto; width: 8px; height: 8px; margin: 0 2px 3px; border-right: 2px solid #8a96a3; border-bottom: 2px solid #8a96a3;
  transform: rotate(45deg); transition: transform .2s ease; }
.ig-faixa:not([open]) .ig-fx-chev { transform: rotate(-45deg); margin-bottom: 0; }
.ig-fx-row { display: flex; gap: 7px; overflow-x: auto; padding: 0 12px 10px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ig-fx-row::-webkit-scrollbar { display: none; }
.ig-fx-it { position: relative; flex: 0 0 auto; width: 44px; height: 68px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; cursor: pointer;
  scroll-snap-align: start; background: #1f2732; box-shadow: inset 0 0 0 1.5px #3a4552; }
.ig-fx-it.is-comm { box-shadow: none; padding: 2px; background: linear-gradient(45deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); }
.ig-fx-it img, .ig-fx-it video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 7px; background: #1f2732; pointer-events: none; }
.ig-fx-it:active { transform: scale(.95); }
.ig-fx-you { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: #fb923c;
  box-shadow: inset 0 0 0 1.5px rgba(251,146,60,.7); background: rgba(251,146,60,.08); }
.ig-fx-you b { font-size: 1.1rem; line-height: 1; }
.ig-fx-you span { font-size: .55rem; font-weight: 800; line-height: 1.1; text-align: center; padding: 0 2px; }
