/*
 * ===================================================================
 * Kickflip Frontend CSS - Layout e Estrutura
 * Versão: 1.0.1
 * Descrição: Fornece o layout do popup/modal otimizado para responsividade.
 * ===================================================================
 */

/* Estrutura do Wrapper do Popup */
#kce-popup-wrapper {
    display: none; /* Controlado por JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fundo escurecido para melhor contraste */
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Estrutura do Conteúdo do Popup */
#kce-popup-content {
    position: relative;
    width: 98%; /* Aumentado para 98% conforme solicitado */
    height: 95%; /* Mantido em 95% conforme solicitado */
    background-color: #fff; /* Necessário para o iframe ter um fundo */
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Estrutura do Botão de Fechar */
#kce-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    background: #fff;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    border: 1px solid #ccc;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

#kce-popup-close:hover {
    background-color: #f5f5f5;
    transform: scale(1.1);
}

/* Estrutura do Iframe */
#kce-popup-iframe-container {
    width: 100%;
    height: 100%;
}

#kce-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Animação de loading */
.single_add_to_cart_button.loading {
    opacity: 0.8;
    pointer-events: none;
    position: relative;
}

.single_add_to_cart_button.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -0.5em;
    margin-left: -0.5em;
    display: block;
    width: 1em;
    height: 1em;
    border-radius: 50%;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    animation: kce-spinner 0.75s linear infinite;
}

@keyframes kce-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    #kce-popup-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    #kce-popup-close {
        top: 10px;
        right: 10px;
    }
}

/* Estilo para notificação de produto adicionado ao carrinho */
.woocommerce-message {
    margin-top: 1em;
    margin-bottom: 2em;
    padding: 1em 1.5em;
    border: 1px solid #ddd;
    background-color: #f8f8f8;
    border-left: 3px solid #7eb74a;
    position: relative;
    width: 100%;
}