/**
 * Frontend styles for Friburgo Reels Pais e Formandos
 * Single video card with modal playback
 */

/* Elementor compatibility */
.elementor-shortcode:has(.fvt-video-container),
.elementor-widget-shortcode:has(.fvt-video-container) {
    display: block !important;
    width: 100% !important;
}

/* ==================== CONTAINER ==================== */
.fvt-video-container {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

.fvt-video-container *,
.fvt-video-container *::before,
.fvt-video-container *::after {
    box-sizing: border-box !important;
}

/* ==================== CARD ==================== */
.fvt-card {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 62.5% !important; /* 16:10 aspect ratio fallback */
    border-radius: 24px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background-color: #1a1a1a !important;
    display: block !important;
}

@supports (aspect-ratio: 16 / 10) {
    .fvt-card {
        padding-bottom: 0 !important;
        aspect-ratio: 16 / 10 !important;
    }
}

/* ==================== CARD BACKGROUND ==================== */
.fvt-card-bg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
}

.fvt-card-thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

/* Overlay gradient */
.fvt-card-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.4) 100%
    ) !important;
    z-index: 2 !important;
}

/* ==================== PLAY BUTTON ==================== */
.fvt-play-button {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    background-color: #006140 !important;
    border: none !important;
    border-radius: 12px 0 12px 0 !important;
    width: 54px !important;
    height: 54px !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.fvt-play-button:hover {
    background-color: #004d33 !important;
    transform: translate(-50%, -50%) scale(1.05) !important;
}

.fvt-play-button svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
}

/* ==================== INFO LABEL (replaces info card) ==================== */
.fvt-info-label {
    position: absolute !important;
    bottom: 16px !important;
    right: 16px !important;
    z-index: 20 !important;
    background-color: #FFFFFF !important;
    border-radius: 16px !important;
    padding: 12px 20px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.fvt-info-label-text {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    color: #006140 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

/* ==================== MODAL ==================== */
.fvt-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483647 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.fvt-modal.fvt-modal-open {
    display: flex !important;
}

.fvt-modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
    cursor: pointer !important;
}

.fvt-modal-content {
    position: relative !important;
    width: 100% !important;
    max-width: 900px !important;
    z-index: 1 !important;
}

.fvt-modal-close {
    position: absolute !important;
    top: -50px !important;
    right: 0 !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    color: #fff !important;
    transition: background 0.2s ease !important;
}

.fvt-modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.fvt-modal-close svg {
    width: 24px !important;
    height: 24px !important;
}

.fvt-modal-video-wrapper {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
    background: #000 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.fvt-modal-video-wrapper iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fvt-fade-in {
    from { opacity: 0 !important; }
    to { opacity: 1 !important; }
}

.fvt-modal.fvt-modal-open .fvt-modal-content {
    animation: fvt-fade-in 0.3s ease forwards !important;
}

body.fvt-modal-active {
    overflow: hidden !important;
}

/* ==================== RESPONSIVE ==================== */
@media screen and (max-width: 768px) {
    .fvt-info-label {
        padding: 8px 14px !important;
        border-radius: 12px !important;
    }

    .fvt-info-label-text {
        font-size: 14px !important;
        line-height: 20px !important;
    }

    .fvt-modal {
        padding: 10px !important;
    }

    .fvt-modal-close {
        top: -45px !important;
        width: 36px !important;
        height: 36px !important;
    }
}
