/**
 * WorkCampConnect — Video Vault Styles
 * /assets/css/video-vault.css
 */

/* ── Container ──────────────────────────────────────────────────── */
.vv-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }

.vv-breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin-bottom: 1.5rem; opacity: 0.7; }
.vv-breadcrumb a { color: var(--color-accent, #E8AC25); text-decoration: none; }
.vv-breadcrumb a:hover { text-decoration: underline; }

/* ── Hero ────────────────────────────────────────────────────────── */
.vv-hero { text-align: center; margin-bottom: 2.5rem; }
.vv-hero__title { font-size: 2rem; font-weight: 800; margin: 0 0 0.5rem; }
.vv-hero__sub { font-size: 1.05rem; opacity: 0.75; max-width: 700px; margin: 0 auto; line-height: 1.6; }

/* ── Tab bar ────────────────────────────────────────────────────── */
.vv-tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--color-border); margin-bottom: 2rem; overflow-x: auto; }
.vv-tab { padding: 0.75rem 1.25rem; font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none; background: none; color: inherit; opacity: 0.6; border-bottom: 3px solid transparent; transition: all 0.2s; white-space: nowrap; }
.vv-tab:hover { opacity: 0.85; }
.vv-tab.is-active { opacity: 1; border-bottom-color: var(--color-accent, #E8AC25); color: var(--color-accent, #E8AC25); }

/* ── Upload Section ─────────────────────────────────────────────── */
.vv-upload-card { background: var(--color-surface, rgba(255,255,255,0.04)); border: 1px solid rgba(255,255,255,0.22); border-radius: 12px; padding: 2rem; margin-bottom: 2rem; }
.vv-upload-card h2 { font-size: 1.3rem; margin: 0 0 0.5rem; }
.vv-upload-card p { opacity: 0.7; margin-bottom: 1.5rem; line-height: 1.5; }

.vv-drop-zone { border: 2px dashed rgba(255,255,255,0.22); border-radius: 10px; padding: 3rem 2rem; text-align: center; cursor: pointer; transition: all 0.2s; position: relative; }
.vv-drop-zone:hover, .vv-drop-zone.is-dragover { border-color: var(--color-accent, #E8AC25); background: rgba(232,172,37,0.05); }
.vv-drop-zone__icon { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.vv-drop-zone__text { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.vv-drop-zone__hint { font-size: 0.85rem; opacity: 0.6; }
.vv-drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.vv-upload-preview { display: none; margin-top: 1.5rem; }
.vv-upload-preview.is-visible { display: block; }
.vv-upload-preview video { max-width: 100%; max-height: 300px; border-radius: 8px; background: #000; }
.vv-preview-info { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; }
.vv-preview-name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-preview-size { font-size: 0.85rem; opacity: 0.6; }
.vv-preview-remove { font-size: 0.85rem; color: var(--color-danger, #D92516); cursor: pointer; background: none; border: none; padding: 0.25rem 0.5rem; }

/* Upload form fields */
.vv-form-fields { margin-top: 1.5rem; display: grid; gap: 1rem; }
.vv-field { display: flex; flex-direction: column; gap: 0.35rem; }
.vv-field label { font-weight: 600; font-size: 0.9rem; }
.vv-field input, .vv-field textarea, .vv-field select { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 6px; padding: 0.6rem 0.75rem; color: inherit; font-size: 0.95rem; font-family: inherit; }
.vv-field input:focus, .vv-field textarea:focus, .vv-field select:focus { outline: none; border-color: var(--color-accent, #E8AC25); }
.vv-field textarea { resize: vertical; min-height: 80px; }
.vv-field .vv-hint { font-size: 0.8rem; opacity: 0.55; }
.vv-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.vv-upload-actions { display: flex; gap: 1rem; margin-top: 1.5rem; align-items: center; }

/* Progress bar */
.vv-progress { display: none; margin-top: 1rem; }
.vv-progress.is-visible { display: block; }
.vv-progress__bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.vv-progress__fill { height: 100%; background: var(--color-accent, #E8AC25); border-radius: 4px; width: 0%; transition: width 0.3s; }
.vv-progress__text { font-size: 0.85rem; opacity: 0.7; margin-top: 0.35rem; text-align: center; }

/* ── Video Grid ─────────────────────────────────────────────────── */
.vv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.vv-card { background: var(--color-surface, rgba(255,255,255,0.04)); border: 1px solid rgba(255,255,255,0.22); border-radius: 10px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.vv-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

.vv-card__thumb { position: relative; aspect-ratio: 16/9; background: #0a1a28; overflow: hidden; cursor: pointer; }
.vv-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.vv-card__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.35); opacity: 0; transition: opacity 0.2s; }
.vv-card__thumb:hover .vv-card__play { opacity: 1; }
.vv-card__play-icon { width: 56px; height: 56px; background: rgba(232,172,37,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; padding-left: 4px; }

.vv-card__body { padding: 0.75rem 1rem 1rem; }
.vv-card__title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vv-card__meta { font-size: 0.8rem; opacity: 0.6; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.vv-card__meta span { display: flex; align-items: center; gap: 0.25rem; }

/* Status badge on cards */
.vv-status { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.vv-status--approved { background: #16a34a; color: #ffffff; border: 1.5px solid #22c55e; font-weight: 700; }
.vv-status--pending_review { background: rgba(232,172,37,0.15); color: #E8AC25; }
.vv-status--pending_upload { background: rgba(100,149,237,0.15); color: #6495ed; }
.vv-status--rejected { background: rgba(217,37,22,0.12); color: #ff6b6b; }
.vv-status--processing { background: rgba(100,149,237,0.15); color: #6495ed; }

/* ── Video Modal ────────────────────────────────────────────────── */
.vv-modal { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.85); align-items: center; justify-content: center; padding: 2rem; }
.vv-modal.is-open { display: flex; }
.vv-modal__inner { background: var(--color-surface-solid, #1a3548); border-radius: 12px; max-width: 900px; width: 100%; max-height: 90vh; overflow: hidden; }
.vv-modal__close { position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; color: var(--color-text); cursor: pointer; background: none; border: none; z-index: 10; opacity: 0.7; }
.vv-modal__close:hover { opacity: 1; }
.vv-modal__video { aspect-ratio: 16/9; width: 100%; background: #000; }
.vv-modal__video iframe { width: 100%; height: 100%; border: none; }
.vv-modal__info { padding: 1.25rem 1.5rem; }
.vv-modal__title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.vv-modal__desc { font-size: 0.9rem; opacity: 0.7; line-height: 1.5; margin-bottom: 0.75rem; }
.vv-modal__meta { font-size: 0.85rem; opacity: 0.6; display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── My Videos (user dashboard) ─────────────────────────────────── */
.vv-my-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

.vv-my-card { display: flex; gap: 1rem; background: var(--color-surface, rgba(255,255,255,0.04)); border: 1px solid rgba(255,255,255,0.22); border-radius: 8px; padding: 1rem; }
.vv-my-card__thumb { width: 160px; min-width: 160px; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: #0a1a28; flex-shrink: 0; }
.vv-my-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.vv-my-card__body { flex: 1; display: flex; flex-direction: column; }
.vv-my-card__title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.35rem; }
.vv-my-card__meta { font-size: 0.8rem; opacity: 0.6; margin-bottom: 0.5rem; }
.vv-my-card__actions { margin-top: auto; display: flex; gap: 0.5rem; }
.vv-my-card__actions button { font-size: 0.8rem; padding: 0.3rem 0.6rem; border-radius: 4px; border: 1px solid rgba(255,255,255,0.22); background: transparent; color: inherit; cursor: pointer; }
.vv-my-card__actions .vv-btn-delete { border-color: rgba(217,37,22,0.3); color: #ff6b6b; }
.vv-my-card__actions .vv-btn-delete:hover { background: rgba(217,37,22,0.12); }

/* ── Empty state ────────────────────────────────────────────────── */
.vv-empty { text-align: center; padding: 3rem 2rem; }
.vv-empty__icon { font-size: 3rem; margin-bottom: 0.75rem; display: block; opacity: 0.4; }
.vv-empty__text { font-size: 1.1rem; opacity: 0.6; margin-bottom: 0.5rem; }
.vv-empty__hint { font-size: 0.9rem; opacity: 0.45; }

/* ── Loading ────────────────────────────────────────────────────── */
.vv-loading { text-align: center; padding: 3rem; opacity: 0.5; }

/* ── Buttons ────────────────────────────────────────────────────── */
.vv-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.65rem 1.5rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; }
.vv-btn--primary { background: var(--color-accent, #E8AC25); color: var(--color-text-on-accent); }
.vv-btn--primary:hover { background: var(--color-accent-dark, #C8920F); }
.vv-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.vv-btn--outline { background: transparent; border: 1px solid rgba(255,255,255,0.22); color: inherit; }
.vv-btn--outline:hover { border-color: var(--color-accent, #E8AC25); }
.vv-btn--sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* ── Error/success messages ─────────────────────────────────────── */
.vv-message { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.vv-message--error { background: rgba(217,37,22,0.12); border: 1px solid rgba(217,37,22,0.25); color: #ff6b6b; }
.vv-message--success { background: rgba(67,142,37,0.12); border: 1px solid rgba(67,142,37,0.25); color: #6ddb3e; }

/* ── Guidelines ─────────────────────────────────────────────────── */
.vv-guidelines { background: var(--color-surface, rgba(255,255,255,0.04)); border: 1px solid rgba(255,255,255,0.22); border-radius: 10px; padding: 1.5rem 2rem; margin-top: 2rem; }
.vv-guidelines h3 { font-size: 1.1rem; margin: 0 0 0.75rem; }
.vv-guidelines ul { margin: 0; padding-left: 1.25rem; line-height: 1.8; font-size: 0.9rem; opacity: 0.8; }

/* ── Job listing widget ─────────────────────────────────────────── */
.vv-listing-section { margin: 1.5rem 0; }
.vv-listing-section h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.vv-listing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.vv-listing-card { background: var(--color-surface, rgba(255,255,255,0.04)); border: 1px solid rgba(255,255,255,0.22); border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 0.2s; }
.vv-listing-card:hover { transform: translateY(-1px); }
.vv-listing-card__thumb { aspect-ratio: 16/9; overflow: hidden; background: #0a1a28; position: relative; }
.vv-listing-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.vv-listing-card__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); opacity: 0; transition: opacity 0.2s; }
.vv-listing-card:hover .vv-listing-card__play { opacity: 1; }
.vv-listing-card__play span { width: 40px; height: 40px; background: rgba(232,172,37,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.vv-listing-card__title { padding: 0.5rem 0.75rem; font-size: 0.85rem; font-weight: 600; }

/* ── Pagination ─────────────────────────────────────────────────── */
.vv-pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
.vv-pagination button { padding: 0.5rem 0.9rem; border-radius: 6px; border: 1px solid rgba(255,255,255,0.22); background: transparent; color: inherit; cursor: pointer; font-size: 0.85rem; }
.vv-pagination button.is-active { background: var(--color-accent, #E8AC25); color: var(--color-text-on-accent); border-color: var(--color-accent, #E8AC25); }
.vv-pagination button:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .vv-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .vv-my-grid { grid-template-columns: 1fr; }
    .vv-my-card__thumb { width: 120px; min-width: 120px; }
    .vv-field-row { grid-template-columns: 1fr; }
    .vv-listing-grid { grid-template-columns: 1fr; }
    .vv-hero__title { font-size: 1.5rem; }
    .vv-modal__inner { max-width: 100%; border-radius: 8px; }
}

@media (max-width: 480px) {
    .vv-container { padding: 1rem 1rem 2rem; }
    .vv-grid { grid-template-columns: 1fr; }
    .vv-my-card { flex-direction: column; }
    .vv-my-card__thumb { width: 100%; min-width: unset; }
    .vv-tabs { gap: 0; }
    .vv-tab { padding: 0.6rem 0.75rem; font-size: 0.85rem; }
}

/* ── Browse Filters ────────────────────────────────────────────── */
.vv-filters { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.vv-filter-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    background: var(--color-surface, rgba(255,255,255,0.04));
    border: 1px solid var(--color-border, rgba(255,255,255,0.22));
    border-radius: var(--radius-base, 8px);
    color: var(--color-text, #fff);
    cursor: pointer;
    min-width: 180px;
}
.vv-filter-select:focus { border-color: var(--color-accent, #E8AC25); outline: none; }

/* ── Category Badges on Cards ──────────────────────────────────── */
.vv-card__badges { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.vv-card__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.vv-card__badge--job { background: var(--color-accent-light, rgba(232,172,37,0.15)); color: var(--color-accent, #E8AC25); }
.vv-card__badge--site { background: var(--color-primary-light, rgba(26,82,112,0.20)); color: var(--color-action, #60a5fa); }

@media (max-width: 480px) {
    .vv-filters { flex-direction: column; }
    .vv-filter-select { min-width: unset; width: 100%; }
}

/* ── is-hidden utility ──────────────────────────────────────────── */
.is-hidden { display: none !important; }
