/**
 * Frontend Styles - Polymar Banner Flutuante
 */

/* Container Principal */
.pfb-banner-root {
    position: fixed !important;
    z-index: 99999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box !important;
    pointer-events: auto !important;
}

.pfb-banner-root *,
.pfb-banner-root *::before,
.pfb-banner-root *::after {
    box-sizing: inherit !important;
}

/* Modo 1: Centro da Tela (Modal / Lightbox) */
.pfb-pos-center_modal {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.pfb-pos-center_modal.pfb-active {
    display: flex !important;
}

.pfb-pos-center_modal .pfb-backdrop {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(10, 15, 25, 0.75) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    opacity: 0;
    transition: opacity 0.35s ease !important;
    z-index: 1 !important;
}

.pfb-pos-center_modal.pfb-active .pfb-backdrop {
    opacity: 1 !important;
}

/* Wrapper do Card / Modal */
.pfb-modal-wrapper {
    position: relative !important;
    width: 100% !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.1) !important;
    z-index: 10 !important;
    overflow: hidden !important;
    opacity: 0;
    transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* =========================================================
   EFEITOS DE ANIMAÇÃO PRÉ-CONFIGURADOS
========================================================= */

/* 1. Zoom Suave (Scale + Fade) */
.pfb-anim-zoom .pfb-modal-wrapper {
    transform: scale(0.85) translateY(10px);
}
.pfb-anim-zoom.pfb-active .pfb-modal-wrapper {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

/* 2. Deslizar do Topo (Slide Down) */
.pfb-anim-slide_down .pfb-modal-wrapper {
    transform: translateY(-90px) scale(0.96);
}
.pfb-anim-slide_down.pfb-active .pfb-modal-wrapper {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* 3. Deslizar de Baixo (Slide Up) */
.pfb-anim-slide_up .pfb-modal-wrapper {
    transform: translateY(90px) scale(0.96);
}
.pfb-anim-slide_up.pfb-active .pfb-modal-wrapper {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* 4. Desvanecer Suave (Fade In Clássico) */
.pfb-anim-fade .pfb-modal-wrapper {
    transform: none;
}
.pfb-anim-fade.pfb-active .pfb-modal-wrapper {
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 0.45s ease !important;
}

/* 5. Salto Elástico (Bounce In) */
.pfb-anim-bounce .pfb-modal-wrapper {
    transform: scale(0.65);
    transition: all 0.48s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.pfb-anim-bounce.pfb-active .pfb-modal-wrapper {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* 6. Giro 3D Suave (Flip In) */
.pfb-anim-flip {
    perspective: 1000px !important;
}
.pfb-anim-flip .pfb-modal-wrapper {
    transform: perspective(800px) rotateX(25deg) translateY(-20px);
    transform-origin: top center;
    transition: all 0.42s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.pfb-anim-flip.pfb-active .pfb-modal-wrapper {
    opacity: 1 !important;
    transform: perspective(800px) rotateX(0deg) translateY(0) !important;
}

/* Modo 2 e 3: Flutuante no Canto Inferior */
.pfb-pos-bottom_right {
    bottom: 25px !important;
    right: 25px !important;
    width: 90vw !important;
    max-width: 420px !important;
}

.pfb-pos-bottom_left {
    bottom: 25px !important;
    left: 25px !important;
    width: 90vw !important;
    max-width: 420px !important;
}

.pfb-pos-bottom_right .pfb-modal-wrapper,
.pfb-pos-bottom_left .pfb-modal-wrapper {
    transform: translateY(30px);
}

.pfb-pos-bottom_right.pfb-active,
.pfb-pos-bottom_left.pfb-active {
    display: block !important;
}

.pfb-pos-bottom_right.pfb-active .pfb-modal-wrapper,
.pfb-pos-bottom_left.pfb-active .pfb-modal-wrapper {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Barra de Progresso do Temporizador */
.pfb-timer-bar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 4px !important;
    background: rgba(255, 255, 255, 0.3) !important;
    z-index: 15 !important;
    overflow: hidden !important;
}

.pfb-timer-fill {
    width: 100%;
    height: 100%;
    background: #ff5252 !important;
    transform-origin: left;
}

/* Botão Fechar (X) */
.pfb-close-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: none !important;
    color: #1a1a1a !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 20 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.25s ease !important;
    padding: 0 !important;
    outline: none !important;
}

.pfb-close-btn:hover {
    background: #f44336 !important;
    color: #ffffff !important;
    transform: scale(1.1) rotate(90deg) !important;
}

.pfb-close-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.5) !important;
}

/* Conteúdo da Imagem */
.pfb-content {
    line-height: 0 !important;
    display: block !important;
    width: 100% !important;
}

.pfb-image-link {
    display: block !important;
    width: 100% !important;
    line-height: 0 !important;
    text-decoration: none !important;
    outline: none !important;
    transition: opacity 0.2s ease !important;
    cursor: pointer !important;
}

.pfb-image-link:hover {
    opacity: 0.96 !important;
}

.pfb-banner-img {
    width: 100% !important;
    height: auto !important;
    max-height: 85vh !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 14px !important;
}

/* Animação de saída */
.pfb-banner-root.pfb-closing .pfb-backdrop {
    opacity: 0 !important;
}

.pfb-banner-root.pfb-closing .pfb-modal-wrapper {
    opacity: 0 !important;
    transform: scale(0.92) translateY(12px) !important;
    transition: all 0.25s ease !important;
}

/* Responsividade Mobile */
@media (max-width: 600px) {
    .pfb-pos-center_modal {
        padding: 12px !important;
    }

    .pfb-modal-wrapper {
        border-radius: 10px !important;
    }

    .pfb-banner-img {
        border-radius: 10px !important;
        max-height: 80vh !important;
    }

    .pfb-close-btn {
        width: 34px !important;
        height: 34px !important;
        top: 8px !important;
        right: 8px !important;
    }

    .pfb-pos-bottom_right,
    .pfb-pos-bottom_left {
        bottom: 15px !important;
        right: 15px !important;
        left: 15px !important;
        width: auto !important;
    }
}
