/* ============================================================
   BOR-MASTEN.FROM.HR — videos.css
   Video stranica i admin panel
   ============================================================ */

/* ---- VIDEO GRID (javna stranica) ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* ---- VIDEO CARD ---- */
.video-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow 0.25s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.video-card.video-draft {
  opacity: 0.6;
  border-style: dashed;
}

.video-card.video-private {
  border-color: var(--accent);
}

/* ---- THUMBNAIL ---- */
.video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-dark);
  cursor: pointer;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.video-thumb-wrap:hover .video-thumb {
  transform: scale(1.04);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  pointer-events: none;
}

.video-thumb-wrap:hover .video-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}

/* ---- BADGES ---- */
.video-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-draft   { background: #fef3c7; color: #92400e; }
.badge-private { background: #ede9fe; color: #5b21b6; }
.badge-public  { background: #d1fae5; color: #065f46; }

/* ---- VIDEO INFO ---- */
.video-info {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.video-category {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.video-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

.video-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.video-yt-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.video-yt-link:hover {
  text-decoration: underline;
}

.video-owner-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ---- VIDEO LIGHTBOX ---- */
#video-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.video-lightbox-inner {
  width: 100%;
  max-width: 960px;
}

.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---- GALLERY FILTERS (reuse iz galerija.css) ---- */
.gallery-filters {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-group select,
.filter-group input[type="text"] {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  min-width: 140px;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
  border-color: var(--primary);
  outline: none;
}

/* ---- LOGIN GATE (reuse) ---- */
.login-gate {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}

.login-gate-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.login-gate h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-gate p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ---- ADMIN — video lista ---- */
.video-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.video-admin-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  flex-wrap: wrap;
}

.video-admin-thumb {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #000;
}

.video-admin-info {
  flex: 1;
  min-width: 0;
}

.video-admin-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.pub-select {
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-admin-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-admin-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .video-admin-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .video-lightbox-inner {
    max-width: 100%;
  }
}
