/* assets/css/profile-previews.css */

/* -------------------------------------------------
   Profile: video previews card wrapper
-------------------------------------------------- */

/* Card wrapper on profile page */
.vc-profile__previews-card {
  margin-top: 1.5rem;
}

/* Empty state text (when no previews yet) */
.vc-profile__previews-card--empty .vc-previews-empty {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* -------------------------------------------------
   ItemList grid
-------------------------------------------------- */

.vc-previews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 991px) {
  .vc-previews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .vc-previews-grid {
    grid-template-columns: 1fr;
  }
}

/* Each preview card acts as a schema.org VideoObject holder */
.vc-preview-card {
  position: relative;
}

/* -------------------------------------------------
   Clickable thumb
-------------------------------------------------- */

.vc-preview-thumb {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: left;
  background: transparent;
  cursor: pointer;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vc-preview-thumb:hover,
.vc-preview-thumb:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
  outline: none;
}

/* Media area (thumbnail image) */
.vc-preview-thumb__media {
  position: relative;
  overflow: hidden;
  background: #000;
}

.vc-preview-thumb__media img {
  display: block;
  width: 100%;
  height: auto;
}

/* Play icon overlay in the center of the thumbnail */
.vc-preview-thumb__play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  font-size: 1.9rem;
  line-height: 1;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  pointer-events: none;
}

/* Meta bar under image: username, date, duration */
.vc-preview-thumb__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.85)
  );
  color: #e5e7eb;
}

.vc-preview-thumb__user {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vc-preview-thumb__date,
.vc-preview-thumb__duration {
  opacity: 0.85;
  white-space: nowrap;
}

/* -------------------------------------------------
   Modal overlay
-------------------------------------------------- */

/* Global overlay container */
.vc-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
}

/* Visible state controlled via aria-hidden */
.vc-preview-modal[aria-hidden="false"] {
  display: block;
}

/* Dimmed backdrop */
.vc-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

/* -------------------------------------------------
   Modal dialog
-------------------------------------------------- */

.vc-preview-modal__dialog {
  position: relative;
  max-width: 960px;
  width: 100%;
  margin: 2rem auto;
  z-index: 1;
  background: #020617;
  color: #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 991px) {
  .vc-preview-modal__dialog {
    margin: 1.5rem auto;
    max-width: 96%;
  }
}

/* Close button in top-right corner */
.vc-preview-modal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  z-index: 2;
  border: 0;
  background: transparent;
  color: #e5e7eb;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

/* Prev / next navigation controls */
.vc-preview-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #e5e7eb;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  z-index: 2;
}

.vc-preview-modal__nav--prev {
  left: 0.4rem;
}

.vc-preview-modal__nav--next {
  right: 0.4rem;
}

/* -------------------------------------------------
   Modal body layout
-------------------------------------------------- */

.vc-preview-modal__body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 0.75rem;
  padding: 1.1rem 1.1rem 1rem;
}

@media (max-width: 767px) {
  .vc-preview-modal__body {
    grid-template-columns: 1fr;
  }
}

/* Video wrapper */
.vc-preview-modal__media-wrap {
  position: relative;
  background: #000;
  border-radius: 0.5rem;
  overflow: hidden;
}

.vc-preview-modal__video {
  width: 100%;
  height: auto;
  display: block;
}

/* Meta column on the right */
.vc-preview-modal__meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.vc-preview-modal__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #f9fafb;
}

.vc-preview-modal__desc {
  font-size: 0.85rem;
  margin: 0;
  color: #cbd5f5;
}

.vc-preview-modal__meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.vc-preview-modal__user {
  font-weight: 600;
  color: #e5e7eb;
}

.vc-preview-modal__date,
.vc-preview-modal__duration {
  opacity: 0.85;
}

/* -------------------------------------------------
   Action buttons (share / download)
-------------------------------------------------- */

.vc-preview-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

/* Generic button style reused here */
.vc-btn {
  border-radius: 999px;
  border: 0;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
}

.vc-btn--primary {
  background: #22c55e;
  color: #022c22;
}

.vc-btn--secondary {
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Visual feedback when share action is done */
.vc-preview-modal__share--done {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.7);
}

/* -------------------------------------------------
   Body scroll lock
-------------------------------------------------- */

/* Prevent body scroll while video preview modal is open */
.vc-preview-modal-open {
  overflow: hidden;
}
