/* Estibe Public Video – Frontend */

.epv-recorder {
    max-width: 560px;
    margin: 0 auto;
    font-family: inherit;
}

.epv-preview-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
}

.epv-preview-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.epv-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 15px;
}

.epv-timer {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}

.epv-timer.epv-timer-red {
    background: rgba(180,20,20,.75);
}

.epv-progress-wrap {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 10px 0 16px;
    overflow: hidden;
}

.epv-bar {
    height: 4px;
    width: 0%;
    background: #c0392b;
    border-radius: 2px;
    transition: width .5s linear;
}

.epv-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.epv-btn {
    flex: 1;
    min-width: 120px;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background .15s;
}

.epv-btn:hover:not(:disabled) { background: #f5f5f5; }
.epv-btn:disabled { opacity: .45; cursor: not-allowed; }

.epv-btn-primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    width: 100%;
}
.epv-btn-primary:hover:not(:disabled) { background: #135e96; }

.epv-upload-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.epv-upload-section input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px;
    box-sizing: border-box;
}

.epv-status {
    font-size: 13px;
    min-height: 18px;
}

.epv-status-ok  { color: #1a7a1a; }
.epv-status-err { color: #c0392b; }

.epv-hidden { display: none !important; }

/* Grid – square tiles, no border-radius, fill available width */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

.epv-grid {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.epv-grid-cols-auto { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.epv-grid-cols-1    { grid-template-columns: 1fr; }
.epv-grid-cols-2    { grid-template-columns: repeat(2, 1fr); }
.epv-grid-cols-3    { grid-template-columns: repeat(3, 1fr); }
.epv-grid-cols-4    { grid-template-columns: repeat(4, 1fr); }
.epv-grid-cols-5    { grid-template-columns: repeat(5, 1fr); }
.epv-grid-cols-6    { grid-template-columns: repeat(6, 1fr); }

.epv-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    background: #111;
    cursor: pointer;
    outline: none;
}

.epv-card:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

.epv-card-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.epv-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 45%, transparent 70%);
    pointer-events: none;
    transition: background .2s;
}

.epv-card:hover .epv-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.2) 50%, rgba(0,0,0,.1) 70%);
}

.epv-yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: clamp(40px, 18%, 60px);
    display: block;
    pointer-events: none;
    opacity: .88;
    transition: opacity .15s, transform .15s;
}

.epv-card:hover .epv-yt-play {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.08);
}

.epv-yt-play svg { width: 100%; height: auto; display: block; }

.epv-card-label {
    position: absolute;
    bottom: 7px;
    left: 8px;
    right: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(13px, 1.8vw, 19px);
    font-weight: 400;
    color: #fff;
    text-shadow: 0 1px 5px rgba(0,0,0,.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    line-height: 1.1;
    letter-spacing: .3px;
}

.epv-empty { color: #777; font-style: italic; }

/* Lightbox */
.epv-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.epv-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.85);
    cursor: pointer;
}

.epv-lb-box {
    position: relative;
    z-index: 1;
    width: min(800px, 94vw);
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.7);
}

.epv-lb-name {
    position: absolute;
    bottom: 52px;
    left: 12px;
    right: 48px;
    z-index: 5;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    font-weight: 400;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,.9);
    letter-spacing: .5px;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.epv-lb-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 5;
    background: rgba(0,0,0,.55);
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background .15s;
}
.epv-lb-close:hover { background: rgba(0,0,0,.85); }

.epv-lb-video {
    display: block;
    width: 100%;
    max-height: 80vh;
    background: #000;
}

body.epv-lb-open { overflow: hidden; }
