/* Vídeo de Apresentação Flutuante - Estilos Isolados */
/* Namespace: vpa- para evitar conflitos */

/* Acessibilidade - Screen Reader Only */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reset específico para o plugin */
#vpa-floating-icon,
#vpa-floating-icon * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#vpa-modal,
#vpa-modal * {
    box-sizing: border-box;
}

@keyframes vpa-entrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#vpa-floating-icon {
    position: fixed;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Posições - Respeitando footer */
.vpa-bottom-right {
    bottom: 32px;
    right: 32px;
}

.vpa-bottom-left {
    bottom: 32px;
    left: 32px;
}

.vpa-top-right {
    top: 32px;
    right: 32px;
}

.vpa-top-left {
    top: 32px;
    left: 32px;
}

/* Botão Flutuante */
#vpa-floating-icon .vpa-button {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.vpa-button:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.vpa-button:active {
    transform: scale(0.95);
}

/* Gradientes */
.vpa-gradient-blue-purple {
    background: linear-gradient(135deg, #3b82f6 0%, #9333ea 100%);
}

.vpa-gradient-green-teal {
    background: linear-gradient(135deg, #10b981 0%, #0891b2 100%);
}

.vpa-gradient-red-orange {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.vpa-gradient-pink-purple {
    background: linear-gradient(135deg, #ec4899 0%, #9333ea 100%);
}

/* Preview de Vídeo */
.vpa-video-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    overflow: hidden;
    opacity: 0;
    animation: vpa-video-fade-in 1s ease-in 4s forwards;
}

@keyframes vpa-video-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.85;
    }
}

.vpa-video-preview iframe {
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: scale(1.8);
    transform-origin: center center;
    background: #000 !important;
}

/* Esconde controles do YouTube */
.vpa-video-preview {
    filter: brightness(0.9) contrast(1.1);
}

.vpa-video-preview iframe::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

/* Overlay para esconder branding do YouTube */
.vpa-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: 9999px;
    pointer-events: none;
    z-index: 1;
}

.vpa-button:hover .vpa-video-preview {
    opacity: 1 !important;
}

/* Overlay com Play */
.vpa-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 9999px;
    transition: background 0.4s ease;
}

.vpa-button:hover .vpa-play-overlay {
    background: rgba(0, 0, 0, 0.45);
}

.vpa-play-icon {
    width: 32px;
    height: 32px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Pulse */
.vpa-pulse {
    position: absolute;
    inset: -8px;
    border: 3px solid rgba(147, 51, 234, 0.6);
    border-radius: 9999px;
    animation: vpa-pulse-anim 2s ease-in-out infinite;
}

@keyframes vpa-pulse-anim {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.4;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Texto */
.vpa-text {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    white-space: nowrap;
    max-width: 120px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

#vpa-floating-icon:hover .vpa-text {
    opacity: 1;
    transform: translateY(0);
}

/* Imagem Decorativa */
.vpa-image {
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: vpa-image-bounce 2s ease-in-out infinite;
}

@keyframes vpa-image-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Posições da Imagem */
#vpa-floating-icon[data-image-position="bottom"] {
    flex-direction: column;
}

#vpa-floating-icon[data-image-position="top"] {
    flex-direction: column-reverse;
}

#vpa-floating-icon[data-image-position="left"] {
    flex-direction: row-reverse;
}

#vpa-floating-icon[data-image-position="right"] {
    flex-direction: row;
}

/* Modal */
.vpa-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: vpa-modal-fade 0.3s ease;
}

.vpa-modal.vpa-active {
    display: flex;
}

@keyframes vpa-modal-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.vpa-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: black;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: vpa-modal-zoom 0.3s ease;
}

@keyframes vpa-modal-zoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}


.vpa-modal-content button {
    padding: 0;
}

#vpa-modal .vpa-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    padding: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    transition: all 0.3s ease;
    z-index: 10;
}

#vpa-modal .vpa-modal-close:hover {
    background: rgb(0, 0, 0);
    color: white !important;
    transform: rotate(90deg);
}

#vpa-modal .vpa-modal-close svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

#vpa-modal .vpa-modal-video {
    width: 100%;
    aspect-ratio: 16 / 9;
}

#vpa-modal .vpa-modal-video iframe {
    width: 100%;
    height: 100%;
}

@keyframes vpa-fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vpa-modal-footer {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    padding: 24px 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    animation: vpa-fade-in-down 0.7s ease-out forwards;
}

.vpa-cta-button {
    display: inline-block !important;
    padding: 14px 40px !important;
    background: linear-gradient(135deg, var(--cta-color) 0%, var(--cta-color-dark) 100%) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1 !important;
    margin: 0 !important;
    outline: none !important;
}

.vpa-cta-button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.6) !important;
    filter: brightness(1.15) !important;
    text-decoration: none !important;
    color: white !important;
}

.vpa-cta-button:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4) !important;
}

.vpa-cta-button:visited {
    color: white !important;
    text-decoration: none !important;
}

.vpa-cta-button:focus {
    outline: none !important;
    text-decoration: none !important;
}

/* Responsivo */
@media (max-width: 768px) {
    .vpa-bottom-right {
        bottom: 16px;
        right: 16px;
    }

    .vpa-bottom-left {
        bottom: 16px;
        left: 16px;
    }

    .vpa-top-right {
        top: 16px;
        right: 16px;
    }

    .vpa-top-left {
        top: 16px;
        left: 16px;
    }

    .vpa-button {
        width: 80px;
        height: 80px;
    }

    .vpa-play-icon {
        width: 24px;
        height: 24px;
    }

    .vpa-text {
        font-size: 12px;
    }

    .vpa-modal {
        padding: 12px;
    }

    .vpa-modal-close {
        width: 36px;
        height: 36px;
    }

    .vpa-modal-footer {
        padding: 16px 12px;
    }

    .vpa-cta-button {
        padding: 12px 30px !important;
        font-size: 14px !important;
    }
}