/* Lepoun front styles (skeleton) */
:root {
  --lepoun-bg: #fff;
  --lepoun-text: #111;
  --lepoun-border-color: rgba(0,0,0,.08);
  --lepoun-border-width: 1px;
  --lepoun-shadow: 0 -8px 24px rgba(0,0,0,.08);
  --lepoun-font-size: 0.95rem;
  --lepoun-font-family: inherit;
  --lepoun-gap: 12px;
  --lepoun-item-width: 280px;
  --lepoun-thumb-aspect-ratio: 16/9;
  --lepoun-zindex: 9999;
  --lepoun-offset-y: 0;
}

.lepoun-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--lepoun-bg);
  color: var(--lepoun-text);
  border-top: var(--lepoun-border-width) solid var(--lepoun-border-color);
  box-shadow: var(--lepoun-shadow);
  font-size: var(--lepoun-font-size);
  font-family: var(--lepoun-font-family);
  z-index: var(--lepoun-zindex, 9999);
  transform: translateY(var(--lepoun-offset-y, 0));
  max-height: var(--lepoun-max-height, 120px);
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Hide bar on mobile - only show button */
@media (max-width: 768px) {
  .lepoun-root {
    display: none !important;
  }
}

/* Top position variant (JS může přidat .is-top) */
.lepoun-root.is-top {
  top: 0;
  bottom: auto;
  border-top: 0;
  border-bottom: var(--lepoun-border-width) solid var(--lepoun-border-color);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.lepoun-root[hidden] {
  display: none !important;
}

.lepoun-track {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: var(--lepoun-gap);
  padding: 8px 48px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  max-height: 100%;
  height: 100%;
}

.lepoun-item {
  display: flex;
  align-items: center;
  gap: var(--lepoun-gap);
  width: var(--lepoun-item-width);
  min-width: var(--lepoun-item-width);
  max-width: var(--lepoun-item-width);
  height: 100%;
  max-height: 100%;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
  overflow: hidden;
}

.lepoun-thumb {
  flex-shrink: 0;
  display: block;
  overflow: hidden;
  height: var(--lepoun-thumb-height, calc(120px - 16px));
  max-height: var(--lepoun-thumb-height, calc(120px - 16px));
  aspect-ratio: var(--lepoun-thumb-aspect-ratio);
  width: auto;
  min-width: 0;
  max-width: 40%;
}

.lepoun-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lepoun-title {
  font-weight: 500;
  line-height: 1.3;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: center;
  min-height: 0;
}

/* When no image, center title vertically */
.lepoun-item:not(:has(.lepoun-thumb)) .lepoun-title,
.lepoun-item .lepoun-title:only-child {
  align-self: center;
  display: flex;
  align-items: center;
  -webkit-box-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

/* Arrows */
.lepoun-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--lepoun-border-color);
  border-radius: 50%;
  color: var(--lepoun-text);
  cursor: pointer;
  font-size: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  z-index: 10;
  transition: opacity 0.2s, background 0.2s;
  pointer-events: auto;
}
.lepoun-arrow:hover {
  background: rgba(255, 255, 255, 1);
  opacity: 1;
}
.lepoun-arrow-prev {
  left: 6px;
}
.lepoun-arrow-next {
  right: 6px;
}

/* Mobile button */
.lepoun-mobile-btn {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: var(--lepoun-zindex, 9999);
  background: var(--lepoun-bg);
  color: var(--lepoun-text);
  border: var(--lepoun-border-width) solid var(--lepoun-border-color);
  box-shadow: var(--lepoun-shadow);
  font-size: var(--lepoun-font-size);
  font-family: var(--lepoun-font-family);
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  transform: translateY(var(--lepoun-offset-y, 0));
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  overflow: hidden;
}
.lepoun-mobile-btn.is-right {
  left: auto;
  right: 12px;
}

.lepoun-mobile-btn-thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.lepoun-mobile-btn-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lepoun-mobile-btn-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lepoun-root,
  .lepoun-track,
  .lepoun-item {
    scroll-behavior: auto;
    animation: none;
    transition: none;
  }
}

