/**
 * Estilos do frontend do plugin Aprovei Checkout
 */

.aprovei-buy-now {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: #fff !important;
    margin-top: 15px;
    width: 100%;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    position: relative;
    overflow: hidden;
}

.aprovei-buy-now:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.aprovei-buy-now:hover:before {
    left: 100%;
}

.aprovei-buy-now:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.aprovei-buy-now:active {
    transform: translateY(0);
}

.aprovei-buy-now.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.aprovei-buy-now.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Aviso de redirecionamento para checkout */
.aprovei-checkout-notice {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    color: #0073aa;
}

.aprovei-checkout-notice p {
    margin: 0;
    font-weight: 500;
}

.aprovei-checkout-notice .dashicons {
    margin-right: 5px;
    vertical-align: middle;
}

/* Mensagens de erro */
.aprovei-error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    color: #842029;
}

/* Mensagens de sucesso */
.aprovei-success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    color: #0f5132;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .aprovei-buy-now {
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* Integração com temas populares */

/* Tema Storefront */
.storefront .aprovei-buy-now {
    border-radius: 0;
}

/* Tema Astra */
.astra .aprovei-buy-now {
    border-radius: 3px;
}

/* Tema OceanWP */
.oceanwp .aprovei-buy-now {
    border-radius: 30px;
}

/* Tema Divi */
.et_divi_theme .aprovei-buy-now {
    border-radius: 3px;
    font-family: inherit;
}

/* Tema Avada */
.avada .aprovei-buy-now {
    border-radius: 0;
    text-shadow: none;
}

/* Tema Twenty Twenty-One */
.wp-block-button .aprovei-buy-now {
    border-radius: 0;
}

/* Compatibilidade com WooCommerce */
.woocommerce .aprovei-buy-now,
.woocommerce-page .aprovei-buy-now {
    display: inline-block;
    margin: 10px 0;
    text-decoration: none;
    font-size: inherit;
    line-height: inherit;
}

.single-product .aprovei-buy-now {
    margin-top: 15px;
}

/* Compatibilidade com formulário de variações */
.variations_form .aprovei-buy-now {
    margin-top: 20px;
}

.variations_form .aprovei-buy-now:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Integração com página do carrinho */
.woocommerce-cart .aprovei-buy-now {
    background: #28a745 !important;
    border-color: #28a745 !important;
}

.woocommerce-cart .aprovei-buy-now:hover {
    background: #218838 !important;
    border-color: #218838 !important;
}
