/**
 * BYF Bunny Stream - stilovi za upload preview kartice i video player u feedu.
 */

/* =========================================================
   1. Upload preview kartice (u dnevnom logu)
   ========================================================= */

.byf-bunny-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.byf-bunny-preview {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f3f3;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  flex: 0 0 auto;
}

.byf-bunny-preview__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #e6e6e6;
}

.byf-bunny-preview__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
  text-align: center;
  font-weight: 500;
}

.byf-bunny-preview__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.3);
  z-index: 2;
}

.byf-bunny-preview__fill {
  height: 100%;
  width: 0;
  background: #ff6b1a; /* Bunny narandzasta - moze se promeniti na brand boju */
  transition: width 0.25s ease;
}

.byf-bunny-preview__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  z-index: 3;
}
.byf-bunny-preview__remove:hover { background: rgba(0,0,0,0.85); }

/* Status varijante */
.byf-bunny-preview--processing .byf-bunny-preview__fill {
  width: 100% !important;
  animation: byfBunnyPulse 1.4s ease-in-out infinite;
}
.byf-bunny-preview--ready .byf-bunny-preview__bar { display: none; }
.byf-bunny-preview--ready::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  font-size: 22px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  pointer-events: none;
}
.byf-bunny-preview--error {
  outline: 2px solid #d33;
}
.byf-bunny-preview--error .byf-bunny-preview__label {
  background: rgba(180,30,30,0.9);
}

@keyframes byfBunnyPulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

.byf-bunny-error {
  width: 100%;
  padding: 8px 12px;
  background: #fee;
  color: #a11;
  border: 1px solid #f3bfbf;
  border-radius: 6px;
  font-size: 13px;
}

/* =========================================================
   2. Video player u community feedu (stories i wall)
   ========================================================= */

.byf-bunny-player {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.byf-bunny-player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mute toggle */
.byf-bunny-player__mute {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0;
}
.byf-bunny-player__mute:hover { background: rgba(0,0,0,0.75); }

/* Indikator videa (mali "play" badge u uglu thumbnaila u stories baru) */
.byf-bunny-video-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Loading dots dok se thumbnail jos nije generisao */
.byf-bunny-player--loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #1a1a1a url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><circle cx='20' cy='20' r='8' fill='none' stroke='%23fff' stroke-width='2' stroke-dasharray='12 12'><animateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='1s' repeatCount='indefinite'/></circle></svg>") no-repeat center / 40px;
}

/* Mobilni: manji preview thumbnaili */
@media (max-width: 480px) {
  .byf-bunny-preview {
    width: 80px;
    height: 80px;
  }
  .byf-bunny-preview__label { font-size: 10px; }
}

/* =========================================================
   3. Lightbox video (kad korisnica otvori story sa videom)
   ========================================================= */

.byf-lb-video {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  display: block;
  background: #000;
  cursor: pointer;
  outline: none;
}

.byf-lb-mute {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0;
  transition: background 0.15s ease;
}
.byf-lb-mute:hover { background: rgba(0,0,0,0.85); }
.byf-lb-mute[hidden] { display: none !important; }

@media (max-width: 480px) {
  .byf-lb-mute {
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}
