/*
Theme Name: Saulo Coelho
Theme URI: https://saulocoelho.com
Author: Antigravity
Description: Premium Custom Theme for Saulo Coelho - Leadership & High Performance.
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saulocoelho
*/

/* ==========================================================================
   Checkout Premium (Substitui o Visual Feio do Shortcode Antigo)
   ========================================================================== */

/* Colunas do Form e Resumo */
@media(min-width: 1024px) {
    body.woocommerce-checkout form.checkout {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 3rem;
        align-items: flex-start;
    }
    /* Avisos do checkout em largura total na primeira linha (evita “terceira coluna” ao lado dos dados) */
    body.woocommerce-checkout form.checkout > .woocommerce-NoticeGroup-checkout,
    body.woocommerce-checkout form.checkout > .woocommerce-notices-wrapper {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }
    body.woocommerce-checkout #customer_details {
        flex: 1 1 0;
        min-width: 0;
        margin-bottom: 0;
    }
    body.woocommerce-checkout #order_review_heading {
        display: none !important; /* Remove o título extra solto para manter apenas a caixa blindada */
    }
    body.woocommerce-checkout #order_review {
        width: 450px !important;
        flex-shrink: 0;
    }
}

/* Matar "Informação Adicional" e forçar Esquerda 100% */
body.woocommerce-checkout .col2-set {
    display: block !important;
    width: 100% !important;
}
body.woocommerce-checkout .col2-set .col-1 {
    width: 100% !important;
    float: none !important;
    max-width: 100% !important;
    padding: 0 !important;
}
body.woocommerce-checkout .col2-set .col-2 {
    display: none !important; /* Aniquila a coluna da direita com o título 'Informação Adicional' */
}

/* Card do Resumo do Pedido (Lateral) */
body.woocommerce-checkout #order_review {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Tabelas e Linhas Clean */
body.woocommerce-checkout table.shop_table {
    border: none !important;
    border-radius: 0;
    width: 100%;
}
body.woocommerce-checkout table.shop_table th,
body.woocommerce-checkout table.shop_table td {
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 1rem 0;
    color: #e5e7eb;
}

/* Campos de Preenchimento (Formulário do Cliente) */
body.woocommerce-checkout form .form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #d1d5db;
}
body.woocommerce-checkout form .form-row input.input-text,
body.woocommerce-checkout form .form-row select,
body.woocommerce-checkout form .form-row textarea {
    width: 100%;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    color: #111827 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    transition: border-color 0.2s;
}
body.woocommerce-checkout form .form-row input.input-text:focus,
body.woocommerce-checkout form .form-row select:focus {
    border-color: #C5A059 !important;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1) !important;
    outline: none !important;
}

/* Métodos de Pagamento (Caixas) */
body.woocommerce-checkout #payment {
    background: transparent !important;
    border-radius: 0;
    padding: 0;
}
body.woocommerce-checkout #payment ul.payment_methods {
    border: none;
    padding: 0;
}
body.woocommerce-checkout #payment div.payment_box {
    background: rgba(255,255,255,0.05) !important;
    color: #d1d5db !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-top: 1rem !important;
    box-shadow: none;
}
body.woocommerce-checkout #payment div.payment_box::before { display: none; }

/* Rótulos dos gateways (contraste em tema escuro — ex.: InfinitePay) */
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label {
    color: #f9fafb !important;
    font-weight: 600;
}
/* InfinitePay: logo com texto preto ilegível no fundo escuro */
body.woocommerce-checkout #payment ul.payment_methods li[class*="infinitepay"] > label img,
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label img[src*="infinitepay" i] {
    display: none !important;
}

/* Avisos de validação mais legíveis no checkout */
body.woocommerce-checkout .woocommerce-NoticeGroup-checkout,
body.woocommerce-checkout .woocommerce-notices-wrapper {
    width: 100%;
    max-width: 100%;
}
body.woocommerce-checkout ul.woocommerce-error {
    background: rgba(127, 29, 29, 0.35) !important;
    border: 1px solid rgba(248, 113, 113, 0.45) !important;
    border-radius: 10px !important;
    color: #fecaca !important;
    padding: 1rem 1.25rem !important;
    margin: 0 0 1.5rem 0 !important;
    list-style: none !important;
}
body.woocommerce-checkout ul.woocommerce-error li {
    color: #fecaca !important;
    margin: 0.35rem 0;
}

/* Erros exibidos no modal: esconde faixas duplicadas no layout */
.sc-checkout-error-modal-hide-notices {
    display: none !important;
}

/* Modal de erros do checkout */
body.sc-checkout-error-modal-open {
    overflow: hidden;
}
.sc-checkout-error-modal[hidden] {
    display: none !important;
}
.sc-checkout-error-modal:not([hidden]) {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}
.sc-checkout-error-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}
.sc-checkout-error-modal__panel {
    position: relative;
    z-index: 1;
    max-width: 28rem;
    width: 100%;
    background: #1e293b;
    border: 1px solid rgba(248, 113, 113, 0.45);
    border-radius: 14px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
.sc-checkout-error-modal__title {
    margin: 0 0 0.5rem 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fecaca;
    line-height: 1.3;
}
.sc-checkout-error-modal__intro {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}
.sc-checkout-error-modal__list {
    margin: 0 0 1.25rem 0;
    padding-left: 1.25rem;
    color: #fecaca;
    font-size: 0.9rem;
    line-height: 1.5;
}
.sc-checkout-error-modal__list li {
    margin-bottom: 0.5rem;
}
.sc-checkout-error-modal__close.button {
    width: 100%;
    background: #C5A059 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.85rem 1rem !important;
    font-weight: 700 !important;
    cursor: pointer;
}
.sc-checkout-error-modal__close.button:hover {
    background: #0b5ed7 !important;
}

/* Serviço / sem envio físico */
body.sc-checkout-no-shipping .woocommerce-shipping-fields,
body.sc-checkout-no-shipping .shipping_address,
body.sc-checkout-no-shipping #ship-to-different-address,
body.sc-checkout-no-shipping #ship-to-different-address-checkbox,
body.sc-checkout-no-shipping .woocommerce-shipping-calculator {
    display: none !important;
}

/* Resumo de faturamento + formulário recolhido */
body.woocommerce-checkout .sc-billing-summary-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
body.woocommerce-checkout .sc-billing-summary-card__label {
    margin: 0 0 0.5rem 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
}
body.woocommerce-checkout .sc-billing-summary-card__primary {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #f3f4f6;
}
body.woocommerce-checkout .sc-billing-summary-card__secondary {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}
body.woocommerce-checkout .sc-billing-summary-toggle.button {
    display: inline-block;
    background: transparent !important;
    color: #f9fafb !important;
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 8px !important;
    padding: 0.65rem 1.25rem !important;
    font-weight: 700 !important;
    text-transform: none !important;
    font-size: 0.9rem !important;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
body.woocommerce-checkout .sc-billing-summary-toggle.button:hover {
    border-color: #C5A059 !important;
    background: rgba(197, 160, 89, 0.12) !important;
}
body.woocommerce-checkout .sc-billing-summary-hint--expanded {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
}
body.woocommerce-checkout .sc-billing-summary-collapse.button-link {
    background: none;
    border: none;
    padding: 0;
    color: #38bdf8 !important;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}
body.woocommerce-checkout .woocommerce-billing-fields.sc-billing-collapsed > h3 {
    display: none !important;
}
body.woocommerce-checkout .woocommerce-billing-fields.sc-billing-collapsed .woocommerce-billing-fields__field-wrapper {
    display: none !important;
}

/* Botão de Finalizar Monstruoso (CTA) */
body.woocommerce-checkout #place_order {
    background: #C5A059 !important;
    color: #fff !important;
    width: 100% !important;
    padding: 1rem 2rem !important;
    border-radius: 8px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}
body.woocommerce-checkout #place_order:hover {
    background: #0b5ed7 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.3);
}

.woocommerce form .form-row .required {
    color: #ef4444;
}

/* ==========================================================================
   Global Typography Fixes (Para Títulos de Plugins e Arquivos)
   ========================================================================== */

h1, h2, h3, h4, h5, h6, 
.page-title, 
.entry-title, 
.archive-title {
    color: #ffffff !important;
}

.page-description, 
.archive-description,
.ama-archive-meta,
.ama-archive-meta span {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ==========================================================================
   Design System: Glass Cards & Typography
   ========================================================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Post Content Typography (Elite Reading Experience) */
.prose-premium {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    line-height: 1.8;
}

.prose-premium h2, .prose-premium h3, .prose-premium h4 {
    color: #ffffff !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    margin-top: 2.5em;
    margin-bottom: 1em;
}

.prose-premium p {
    margin-bottom: 1.5em;
}

.prose-premium blockquote {
    border-left: 4px solid #C5A059;
    padding-left: 1.5rem;
    font-style: italic;
    color: #ffffff;
    background: rgba(197, 160, 89, 0.05);
    padding: 2rem;
    border-radius: 0 1rem 1rem 0;
    margin: 2rem 0;
}

.prose-premium strong {
    color: #ffffff;
    font-weight: 700;
}

.prose-premium img {
    border-radius: 1.5rem;
    margin: 3rem 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* ==========================================================================
   Pagination: Premium Style
   ========================================================================== */

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.pagination .page-numbers {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: #C5A059;
    color: white;
    border-color: #C5A059;
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    border-radius: 1rem;
    width: auto;
    padding: 0 1.5rem;
}
/* ==========================================================================
   WhatsApp Floating Button (Premium)
   ========================================================================== */

#whatsapp-float {
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
    animation: wa-pulse 2s infinite;
}

#whatsapp-float:hover {
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
    transform: scale(1.1) translateY(-5px);
}

@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Tooltip Adjustments */
#whatsapp-float .absolute {
    transform: translateX(10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#whatsapp-float:hover .absolute {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #whatsapp-float {
        bottom: 6rem;
        right: 1.5rem;
        width: 3.25rem;
        height: 3.25rem;
    }
    #back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    #whatsapp-float .absolute {
        display: none; /* Hide tooltips on mobile for cleaner UI */
    }
}
