/* Balão Flutuante */
.wc-video-bubble {
    position: fixed;
    left: 40px;
    bottom: 100px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    outline: 2px solid black;
    outline-offset: 2px;
    overflow: visible;
    cursor: grab;
    z-index: 9998;
    transition: box-shadow 0.3s ease;
    background: #000;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    filter: brightness(0.8);
    /* Prevenir comportamentos de touch padrão */
    touch-action: none;
    -webkit-touch-callout: none;
    /* Iniciar invisível */
    opacity: 0;
}

.wc-video-bubble.dragging {
    cursor: grabbing;
    animation: none;
    /* box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); */
}

.wc-video-bubble:hover {
    /* box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4); */
}

.wc-video-bubble-drag-handle {
    width: 100%;
    height: 100%;
    position: relative;
}

.wc-video-bubble video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    border-radius: 50%;
}

/* Botão de fechar do balão */
.wc-video-bubble-close {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 26px;
    height: 26px;
    background: black !important;
    border: none !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    transition: all 0.2s ease;
}

.wc-video-bubble-close:hover {
    /* background: rgba(0, 0, 0, 0.9) !important; */
}

.wc-video-bubble-close svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
    stroke-width: 3;
}

/* Modal de Stories */
.wc-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Prevenir seleção de texto e menu de contexto no mobile */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    /* Bloquear interação com elementos abaixo */
    pointer-events: auto;
}

/* Garantir que todos os elementos dentro do modal bloqueiem a passagem de eventos */
.wc-video-modal * {
    pointer-events: auto;
}

/* Header com botões */
.wc-video-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 20px;
    z-index: 10002;
}

.wc-video-modal-mute,
.wc-video-modal-close {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
}

.wc-video-modal-mute:hover,
.wc-video-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.wc-video-modal-mute svg,
.wc-video-modal-close svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.wc-video-stories-container {
    position: relative;
    width: auto;
    height: calc(100% - 50px);
    aspect-ratio: 9 / 16;
    margin: 0 auto;
}

/* Barras de progresso */
.wc-video-progress-bars {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 4px;
    z-index: 10001;
}

.wc-video-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.wc-video-progress-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    transition: width 0.05s linear;
}

.wc-video-progress-bar.completed .wc-video-progress-fill {
    width: 100%;
}

/* Player de vídeo */
.wc-video-player-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Prevenir seleção */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

.wc-video-player-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 100vh;
    border-radius: 10px;
}

/* Controles de navegação */
.wc-video-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 10000;
}

.wc-video-nav {
    flex: 1;
    cursor: pointer;
    /* Prevenir seleção APENAS nos botões de navegação */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

/* Botão de comprar */
.wc-video-buy-button {
    width: 100%;
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    padding: 20px 20px;
}

/* Informações do produto */
.wc-video-product-info {
    display: flex !important;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wc-video-product-info:hover {
    background: rgba(0, 0, 0, 0.75);
}

.wc-video-product-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
}

.wc-video-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wc-video-product-details {
    flex: 1;
    min-width: 0;
}

.wc-video-product-title {
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 0 5px 0 !important;
    line-height: 1.3 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wc-video-product-price {
    color: #fff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
}

.wc-video-price-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wc-video-product-price del {
    font-size: 16px !important;
    opacity: 0.7;
    font-weight: normal !important;
}

.wc-video-product-price ins {
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: bold !important;
}

.wc-video-price-regular,
.wc-video-price-sale {
    color: #fff !important;
}

.wc-video-add-to-cart {
    width: 100% !important;
    height: 50px !important;
    background: #00000090 !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 15px 50px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    margin: 0px !important;
    line-height: 22px !important;
}

.wc-video-add-to-cart:hover {
    background: #000000 !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .wc-video-bubble {
        width: 70px;
        height: 70px;
    }

    .wc-video-bubble-close {
        width: 24px;
        height: 24px;
        top: -2px;
        right: -2px;
        border-width: 2px;
    }

    .wc-video-modal-header {
        padding: 40px 20px;
    }

    .wc-video-modal-mute,
    .wc-video-modal-close {
        width: 35px;
        height: 35px;
    }

    .wc-video-modal-mute svg,
    .wc-video-modal-close svg {
        width: 18px;
        height: 18px;
    }

    .wc-video-stories-container {
        width: 100%;
        max-width: 100%;
        height: 100%;
    }

    .wc-video-player-wrapper video {
        width: 100%;
        height: 100vh;
        object-fit: cover;
        border-radius: 0px;
    }

    .wc-video-buy-button {
        bottom: 0px;
    }

    .wc-video-product-info {
        gap: 15px;
        padding: 10px;
    }

    .wc-video-product-image {
        width: 60px;
        height: 60px; 
    }

    .wc-video-product-title {
        font-size: 15px !important;
    }

    .wc-video-product-price {
        font-size: 15px !important;
    }

    .wc-video-product-price del {
        font-size: 15px !important;
    }

    .wc-video-add-to-cart {
        padding: 12px 40px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .wc-video-bubble {
        width: 60px;
        height: 60px;
    }

    .wc-video-bubble-close {
        width: 22px;
        height: 22px;
        top: -6px;
        right: -6px;
        border-width: 2px;
    }

    .wc-video-progress-bars {
        top: 15px;
        left: 8px;
        right: 8px;
        gap: 3px;
    }

    .wc-video-progress-bar {
        height: 2px;
    }

    .wc-video-product-info {
        gap: 10px;
        padding: 10px;
    }

    .wc-video-product-image {
        width: 60px;
        height: 60px;
    }

    .wc-video-product-title {
        font-size: 14px !important;
    }

    .wc-video-product-price {
        font-size: 16px !important;
    }

    .wc-video-product-price del {
        font-size: 12px !important;
    }
}

/* Acessibilidade */
.wc-video-modal-close:focus,
.wc-video-add-to-cart:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.wc-video-nav:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
    .wc-video-bubble {
        border: 2px solid #fff;
    }

    .wc-video-progress-bar {
        background: rgba(255, 255, 255, 0.5);
    }

    .wc-video-modal-close {
        background: rgba(255, 255, 255, 0.4);
    }
}

/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {
    .wc-video-bubble,
    .wc-video-modal,
    .wc-video-add-to-cart {
        animation: none !important;
        transition: none !important;
    }
}

/* Prevenir scroll no body durante drag (mobile) */
body.wc-video-dragging {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}