/*
 * "Panel" layout — [instagram_feed layout="panel"]. A compact stacked list
 * (thumbnail + time + caption) meant to sit next to the hero, not carry the
 * whole feed on its own — that's what layout="wall" is for. jpif-* classes
 * only. Tokenized like the rest of this file so body.home can flip it dark.
 *
 * Only the first few items show by default — 4 on desktop, 2 on phones,
 * where the hero row needs to fit hero + games + this panel on one screen
 * without scrolling (see .jp-top in the theme's style.css). "Mehr laden"
 * (jungpanther_insta_feed.js) adds .is-expanded to reveal the rest, already
 * sitting in the DOM — no fetch needed.
 */

.jpif-panel-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.jpif-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jpif-panel__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 6px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.jpif-panel__item::before{
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--jpif-accent, #003d80);
  opacity: 0;
  transition: opacity .2s ease;
}

.jpif-panel__item:hover,
.jpif-panel__item:focus-visible {
  background: var(--jpif-panel-hover-bg, rgba(0,0,0,0.04));
  transform: translateX(2px);
}
.jpif-panel__item:hover::before,
.jpif-panel__item:focus-visible::before{
  opacity: 1;
}
.jpif-panel__item:focus-visible {
  outline: 2px solid var(--jpif-accent, #003d80);
  outline-offset: 2px;
}

.jpif-panel__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--jpif-card-bg, #f0f0f0);
}
.jpif-panel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.jpif-panel__item:hover .jpif-panel__thumb img {
  transform: scale(1.08);
}

.jpif-panel__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.28);
  color: #fff;
  font-size: 0.85rem;
}

.jpif-panel__body {
  min-width: 0;
  flex: 1 1 auto;
}

.jpif-panel__time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jpif-time, #003d80);
  margin-bottom: 4px;
}
.jpif-panel__time svg{
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex: 0 0 auto;
}

.jpif-panel__text {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.36;
  color: var(--jpif-text, #333);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.jpif-panel__text strong{ font-weight: 800; }

/* Default visible count: 4 on desktop, 2 on phones. */
.jpif-panel__item:nth-child(n+5){ display: none; }
@media (max-width: 640px) {
  .jpif-panel__thumb{ width: 58px; height: 58px; }
  .jpif-panel__item:nth-child(n+3){ display: none; }
}

.jpif-panel-wrap.is-expanded .jpif-panel__item{ display: flex; }

.jpif-panel__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  padding: 9px 14px;
  border: 1px solid var(--jpif-more-border, rgba(0,0,0,.12));
  border-radius: 9px;
  background: var(--jpif-more-bg, transparent);
  color: var(--jpif-accent, #003d80);
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.jpif-panel__more svg{
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  transition: transform .2s ease;
}
.jpif-panel__more:hover{
  background: var(--jpif-panel-hover-bg, rgba(0,0,0,0.04));
}
.jpif-panel__more:focus-visible{
  outline: 2px solid var(--jpif-accent, #003d80);
  outline-offset: 2px;
}
.jpif-panel-wrap.is-expanded .jpif-panel__more svg{
  transform: rotate(180deg);
}
