/**
 * WC WhatsApp Checkout Stylesheet - Black & Gold Luxury Edition
 */

span.wc-wac-custom-price-text {
    font-weight: 700;
    color: #b89b46;
    display: inline-block;
}

.wc-wac-is-hidden .amount {
    display: none !important;
}

.widget_shopping_cart .total, 
.woocommerce-mini-cart__total {
    padding: 10px 0;
    border-top: 3px double #eee;
}

span.wc-wac-custom-shipping-text {
    font-weight: 700;
    color: #b89b46;
    display: inline-block;
}

/* Oculta o texto de privacidade nativo do WooCommerce para evitar duplicidade acima do card */
form.register .woocommerce-privacy-policy-text {
    display: none !important;
}

/* Mensagem de Erro Geral */
.wc-wac-error-message {
    background-color: #faf6f0;
    color: #bc2828;
    border-left: 4px solid #bc2828;
    padding: 14px 18px;
    margin: 15px 0;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    animation: wacFadeIn 0.3s ease-out;
}

/* Oculta o texto de privacidade nativo do WooCommerce para evitar duplicidade acima do card */
form.register .woocommerce-PrivacyPolicyNotice {
    display: none !important;
}

/* CARD DE STATUS COMPACTO E LUXUOSO NO CHECKOUT */
.wac-checkout-docs-section {
    margin: 5px 0 25px 0;
}
.wac-status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-radius: 8px;
    border: 1px solid transparent;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    gap: 20px;
}

/* Botão do Card (Gerenciar Documentos) */
.wac-status-card button#wac-trigger-modal {
    padding: 10px 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: unset !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 4px !important;
    border: 1px solid #b89b46 !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12) !important;
    transition: all 0.25s ease-in-out !important;
    display: inline-block !important;
    width: auto !important;
}

/* Estado: Pendente de Envio */
.wac-status-card.wac-status-pending {
    background-color: #111111;
    border-color: #222222;
    border-left: 5px solid #b89b46;
}
.wac-status-card.wac-status-pending .wac-card-title { color: #ffffff; margin: 0 0 4px 0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.wac-status-card.wac-status-pending .wac-card-desc { color: #cccccc; margin: 0; font-size: 12px; font-weight: 500; }
.wac-status-card.wac-status-pending button#wac-trigger-modal { background: #b89b46 !important; color: #111111 !important; }
.wac-status-card.wac-status-pending button#wac-trigger-modal:hover { background: #967d33 !important; border-color: #967d33 !important; color: #ffffff !important; transform: translateY(-1px); }

/* Estado: Tudo Validado */
.wac-status-card.wac-status-success {
    background-color: #f4faf4;
    border-color: #d1ebd5;
    border-left: 5px solid #28a745;
}
.wac-status-card.wac-status-success .wac-card-title { color: #155724; margin: 0 0 4px 0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.wac-status-card.wac-status-success .wac-card-desc { color: #1e5c2b; margin: 0; font-size: 12px; font-weight: 500; }
.wac-status-card.wac-status-success button#wac-trigger-modal { background: #28a745 !important; color: #ffffff !important; border-color: #28a745 !important; }
.wac-status-card.wac-status-success button#wac-trigger-modal:hover { background: #1e7e34 !important; border-color: #1e7e34 !important; transform: translateY(-1px); }

/* POPUP MODAL PREMIUM (LIGHTBOX) */
.wac-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}
.wac-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 1px solid #222222;
    overflow: hidden;
    animation: wacModalOpen 0.25s ease-out;
}
.wac-modal-header {
    padding: 18px 24px;
    background: #111111;
    border-bottom: 2px solid #b89b46;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wac-modal-header h3 { margin: 0; font-size: 13px; font-weight: 700; color: #ffffff; letter-spacing: 1px; text-transform: uppercase; }
.wac-modal-close { font-size: 26px; color: #b89b46; cursor: pointer; font-weight: bold; line-height: 1; transition: color 0.2s; }
.wac-modal-close:hover { color: #ffffff; }

.wac-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    background: #fafafa;
}
.wac-modal-footer {
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
    display: flex;
    justify-content: flex-end;
}
.wac-modal-save-btn { 
    padding: 12px 28px !important; 
    font-weight: 700 !important; 
    font-size: 13px !important; 
    background: #111111 !important; 
    color: #ffffff !important; 
    border: 1px solid #b89b46 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s !important;
}
.wac-modal-save-btn:hover {
    background: #b89b46 !important;
    color: #111111 !important;
}

/* Linhas internas do modal */
.wac-doc-row {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.01);
    transition: border-color 0.2s;
}
.wac-doc-row:hover {
    border-color: #b89b46;
}
.wac-doc-row label { font-weight: 700 !important; font-size: 13px; color: #111111; margin: 0; }
.wac-doc-status-ok {
    font-size: 11px;
    color: #1e5c2b;
    background: #e8f5e9;
    border: 1px solid #c3e6cb;
    padding: 3px 10px;
    border-radius: 4px;
    width: max-content;
    font-weight: 700;
    text-transform: uppercase;
}

/* DESIGN INTEGRADO E ALINHADO DO CUPOM */
.wac-integrated-coupon-row td {
    padding: 18px 0 !important;
    border-top: 1px solid #eeeeee !important;
    background: transparent !important;
}
.wac-coupon-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
.wac-coupon-wrapper label {
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #111111 !important;
    margin: 0 0 8px 0 !important;
    text-align: left !important;
    display: block !important;
    float: none !important;
}
.wac-coupon-input-group {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
}
.wac-coupon-input-group input#wac_coupon_code {
    flex-grow: 1 !important;
    max-width: 70% !important;
    height: 40px !important;
    padding: 0 14px !important;
    border: 1px solid #cccccc !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05) !important;
}
.wac-coupon-input-group input#wac_coupon_code:focus {
    border-color: #b89b46 !important;
    outline: none !important;
}
.wac-coupon-input-group button#wac_apply_coupon_btn {
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 22px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background-color: #111111 !important;
    color: #ffffff !important;
    border: 1px solid #b89b46 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease !important;
}
.wac-coupon-input-group button#wac_apply_coupon_btn:hover {
    background-color: #b89b46 !important;
    color: #111111 !important;
}

/* =========================================================================
   REESTRUTURAÇÃO LUXO DA TABELA "MEUS DOCUMENTOS" (MINHA CONTA)
   ========================================================================= */
.wac-my-account-docs-wrapper {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid #eeeeee;
}
.wac-my-account-docs-wrapper h3 {
    color: #111111;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.wac-my-account-docs-wrapper table.shop_table {
    border: 1px solid #eeeeee !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    margin-top: 20px !important;
    width: 100% !important;
    border-collapse: collapse !important;
}
.wac-my-account-docs-wrapper table th {
    background: #111111 !important;
    color: #b89b46 !important; /* Dourado no cabeçalho */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 14px 16px !important;
    font-size: 12px !important;
    border: none !important;
}
.wac-my-account-docs-wrapper table td {
    padding: 16px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #eeeeee !important;
    color: #333333 !important;
}
.wac-my-account-docs-wrapper table td[data-title="Documento"] {
    font-size: 13.5px !important;
    color: #111111 !important;
    font-weight: 600;
}

/* Status: Pendente de envio (Estilo Champagne) */
.wac-my-account-docs-wrapper table td span[style*="background: rgb(255, 245, 245)"],
.wac-my-account-docs-wrapper table td span {
    color: #8a6d3b !important;
    background: #fdfaf4 !important;
    border: 1px solid #f3e9d2 !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    display: inline-block !important;
}

/* Link: Visualizar Arquivo Ativo (Estilo Sucesso Clean) */
.wac-my-account-docs-wrapper table td a {
    color: #28a745 !important;
    background: #f0faf2 !important;
    border: 1px solid #c3e6cb !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px;
    transition: all 0.2s !important;
}
.wac-my-account-docs-wrapper table td a:hover {
    background: #28a745 !important;
    color: #ffffff !important;
}

/* Customização dos Inputs de Arquivo */
.wac-my-account-docs-wrapper table input[type="file"] {
    font-size: 12px !important;
    color: #666666 !important;
    max-width: 190px !important;
    background: #fafafa !important;
    border: 1px solid #e1e1e1 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    outline: none !important;
}

/* Botões de Ações Gerais */
.wac-my-account-docs-wrapper table button.button {
    height: 32px !important;
    line-height: 32px !important;
    padding: 0 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    transition: all 0.2s ease-in-out !important;
}

/* Botão ENVIAR */
.wac-my-account-docs-wrapper table button.button.alt {
    background: #111111 !important;
    color: #ffffff !important;
    border: 1px solid #b89b46 !important;
}
.wac-my-account-docs-wrapper table button.button.alt:hover {
    background: #b89b46 !important;
    color: #111111 !important;
}

/* Botão EXCLUIR */
.wac-my-account-docs-wrapper table button[type="submit"]:not(.alt) {
    background: transparent !important;
    color: #888888 !important;
    border: 1px solid #cccccc !important;
}
.wac-my-account-docs-wrapper table button[type="submit"]:not(.alt):hover {
    background: #bc2828 !important;
    color: #ffffff !important;
    border-color: #bc2828 !important;
}

/* Força o texto de atenção/pendência a ficar vermelho no card de documentos */
.wac-status-card.wac-status-pending .wac-card-desc {
    color: #ff4d4d !important; /* Um vermelho vivo que destaca bem no fundo escuro */
    font-weight: 600;
}

/* AJUSTES RESPONSIVOS */
@media (max-width: 768px) {
    .wac-status-card { flex-direction: column; align-items: stretch; text-align: center; }
    .wac-status-card button#wac-trigger-modal { width: 100% !important; }
    .wac-coupon-input-group { flex-direction: column; align-items: stretch; }
    .wac-coupon-input-group input#wac_coupon_code { max-width: 100% !important; width: 100% !important; }
    .wac-coupon-input-group button#wac_apply_coupon_btn { width: 100% !important; }
    
    .wac-my-account-docs-wrapper table_responsive table.shop_table fieldset,
    .wac-my-account-docs-wrapper table_responsive table.shop_table form {
        display: flex !important;
        justify-content: flex-start !important;
        margin-top: 5px !important;
    }
}

@media (max-width: 480px) {
    .wac-coupon-input-group { flex-direction: column !important; align-items: stretch !important; }
    .wac-coupon-input-group input#wac_coupon_code { max-width: 100% !important; width: 100% !important; }
    .wac-coupon-input-group button#wac_apply_coupon_btn { width: 100% !important; }
}

/* ANIMAÇÕES */
@keyframes wacFadeIn {
    0% { opacity: 0; transform: translateY(-5px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes wacModalOpen {
    0% { opacity: 0; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes wacShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}