/**
 * Garela Video Popups Styles
 * Author: Garela Labs
 */

/* -------------------------------------------------------------------------- */
/*                                MODAL OVERLAY                               */
/* -------------------------------------------------------------------------- */
.garela-vp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.garela-vp-modal-overlay.garela-vp-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Bloquear scroll del body cuando el modal está abierto */
body.garela-vp-modal-open {
    overflow: hidden !important;
}

/* -------------------------------------------------------------------------- */
/*                                  MODAL BOX                                 */
/* -------------------------------------------------------------------------- */
.garela-vp-modal-box {
    position: relative;
    background-color: #ffffff;
    width: 100%;
    max-width: 680px;
    border-radius: 14px;
    padding: 35px 35px 35px 35px;
    box-sizing: border-box;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.3s ease;
    max-height: 92vh;
    overflow-y: auto;
}

.garela-vp-modal-overlay.garela-vp-active .garela-vp-modal-box {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Custom Scrollbar for Modal Box if small screen */
.garela-vp-modal-box::-webkit-scrollbar {
    width: 6px;
}
.garela-vp-modal-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.garela-vp-modal-box::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

/* -------------------------------------------------------------------------- */
/*                                BOTÓN CERRAR                                */
/* -------------------------------------------------------------------------- */
.garela-vp-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    padding: 0;
    margin: 0;
    z-index: 10;
}

.garela-vp-close-btn:hover {
    color: #111827;
    background-color: #f3f4f6;
    transform: rotate(90deg);
}

/* -------------------------------------------------------------------------- */
/*                                   TÍTULO                                   */
/* -------------------------------------------------------------------------- */
.garela-vp-title {
    margin: 0 0 20px 0;
    padding: 0 24px 0 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    color: #c02626;
    text-align: center;
    letter-spacing: -0.01em;
    font-family: inherit;
    text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/*                                DESCRIPCIÓN                                 */
/* -------------------------------------------------------------------------- */
.garela-vp-description {
    font-size: 15px;
    line-height: 1.5;
    color: #4b5563;
    text-align: center;
    margin-bottom: 18px;
}

/* -------------------------------------------------------------------------- */
/*                            CONTENEDOR DE VIDEO                             */
/* -------------------------------------------------------------------------- */
.garela-vp-video-container {
    position: relative;
    width: 100%;
    background-color: #000000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.garela-vp-video-container.aspect-16-9 {
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}
.garela-vp-video-container.aspect-4-3 {
    padding-top: 75%; /* 4:3 Aspect Ratio */
}
.garela-vp-video-container.aspect-1-1 {
    padding-top: 100%; /* 1:1 Aspect Ratio */
}
.garela-vp-video-container.aspect-9-16 {
    padding-top: 177.77%; /* 9:16 Shorts/Reels Ratio */
}

.garela-vp-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.garela-vp-no-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    padding: 20px;
    text-align: center;
    background: #1f2937;
}

/* -------------------------------------------------------------------------- */
/*                                BOTÓN CTA                                   */
/* -------------------------------------------------------------------------- */
.garela-vp-cta-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.garela-vp-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #9b1b2f;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(155, 27, 47, 0.35);
    border: none;
    cursor: pointer;
    text-align: center;
}

.garela-vp-cta-btn:hover {
    background-color: #7a1223;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(155, 27, 47, 0.45);
}

.garela-vp-cta-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(155, 27, 47, 0.3);
}

.garela-vp-cta-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* -------------------------------------------------------------------------- */
/*                          DISPARADOR EN PÁGINA                              */
/* -------------------------------------------------------------------------- */
.garela-vp-trigger-wrap {
    text-align: center;
    margin: 10px 0;
}

.garela-vp-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #c02626;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(192, 38, 38, 0.3);
    transition: all 0.25s ease;
}

.garela-vp-trigger-btn:hover {
    background-color: #9b1b2f;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(192, 38, 38, 0.4);
}

.garela-vp-btn-icon svg {
    width: 1.1em;
    height: 1.1em;
    fill: currentColor;
}

/* Disparador Imagen */
.garela-vp-trigger-image-box {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.garela-vp-trigger-image-box:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 32px -5px rgba(0, 0, 0, 0.25);
}

.garela-vp-trigger-img {
    display: block;
    width: 100%;
    height: auto;
}

.garela-vp-image-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.garela-vp-trigger-image-box:hover .garela-vp-image-play-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.garela-vp-play-circle {
    width: 64px;
    height: 64px;
    background: #c02626;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    padding-left: 4px;
    box-shadow: 0 8px 24px rgba(192, 38, 38, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.garela-vp-trigger-image-box:hover .garela-vp-play-circle {
    transform: scale(1.15);
}

/* -------------------------------------------------------------------------- */
/*                              RESPONSIVE                                    */
/* -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .garela-vp-modal-box {
        padding: 24px 18px 20px 18px;
        border-radius: 12px;
    }

    .garela-vp-title {
        font-size: 18px;
        margin-bottom: 14px;
        padding-right: 20px;
    }

    .garela-vp-close-btn {
        top: 10px;
        right: 10px;
        font-size: 20px;
    }

    .garela-vp-cta-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    .garela-vp-video-container {
        margin-bottom: 18px;
    }
}
