/* Estilos para a página Meus Pontos - Apenas classes do plugin */
.wpf-coupon-cell {
    text-align: center !important;
    vertical-align: middle !important;
}

.wpf-coupon-code {
    font-family: monospace !important;
    font-size: 1.1em !important;
    font-weight: bold !important;
    color: #3d3d3d !important;
    background-color: #f0f0f1 !important;
    padding: 5px 8px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    position: relative !important;
    display: inline-block !important;
    min-width: 120px !important;
}

.wpf-coupon-code:hover {
    background-color: #e0e1e2 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

.wpf-coupon-code.wpf-copied {
    background-color: #4CAF50 !important;
    color: white !important;
}

.wpf-coupon-code.wpf-copied::after {
    content: '✓ Copiado!' !important;
    position: absolute !important;
    top: -30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: #333 !important;
    color: white !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    z-index: 1000 !important;
    font-weight: normal !important;
    animation: fadeInOut 2s ease-in-out !important;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* Novo estilo para Saldo de Pontos */
.wpf-balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 30px 20px !important;
    border-radius: 12px !important;
    margin-bottom: 30px !important;
    text-align: center !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
    color: white !important;
    position: relative !important;
    overflow: hidden !important;
}

.wpf-balance-card::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: rgba(255,255,255,0.1) !important;
    transform: rotate(45deg) !important;
    pointer-events: none !important;
}

.wpf-balance-card h3 {
    margin-top: 0 !important;
    color: white !important;
    font-size: 1.3em !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    position: relative !important;
    z-index: 2 !important;
}

.wpf-points-display {
    font-size: 3.5em !important;
    font-weight: 800 !important;
    color: white !important;
    display: block !important;
    line-height: 1 !important;
    margin: 15px 0 !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
    position: relative !important;
    z-index: 2 !important;
}

.wpf-points-label {
    font-size: 1.1em !important;
    color: rgba(255,255,255,0.9) !important;
    display: block !important;
    font-weight: 500 !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Estilos Específicos para a Tabela de Recompensas */
#wpf-rewards-container {
    padding: 25px !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
}

#wpf-rewards-container h2 {
    font-size: 1.6em !important;
    margin-top: 0 !important;
    margin-bottom: 25px !important;
    padding-bottom: 15px !important;
    border-bottom: 3px solid #667eea !important;
    color: #2c3e50 !important;
    font-weight: 700 !important;
}

/* Estilo para linha de recompensa indisponível */
.wpf-reward-disabled {
    opacity: 0.5 !important;
    background-color: #f9f9f9 !important;
}

.wpf-reward-disabled:hover {
    background-color: #f9f9f9 !important;
}

/* Garante que o cupom em display fique centralizado */
.wpf-coupon-cell {
    white-space: nowrap !important;
}

/* --- ESTILOS DOS BOTÕES DA TABELA DE RECOMPENSAS --- */

/* Cor para o botão de Resgatar (Ação Principal) */
.wpf-redeem-reward-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 0.9em !important;
}

.wpf-redeem-reward-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4) !important;
    background: linear-gradient(135deg, #218838 0%, #1e9e8a 100%) !important;
}

/* Estilo para botão Resgatado (Ação Concluída/Sucesso) */
.wpf-redeem-reward-btn[disabled] {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: #fff !important;
    border: none !important;
    cursor: not-allowed !important;
    opacity: 0.8 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Estilo para botão Pontos Insuficientes */
.wpf-redeem-reward-btn.wpf-insufficient-points {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
    color: #fff !important;
    border: none !important;
    cursor: not-allowed !important;
    opacity: 0.9 !important;
}

/* --- ESTILOS DO CARD DE VALOR EM PONTOS --- */
.wpf-price-in-points-card {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    border: 2px solid #ffd43b !important;
    padding: 12px 18px !important;
    border-radius: 10px !important;
    margin: 10px 0 !important;
    line-height: 1.3 !important;
    font-family: inherit !important;
    box-shadow: 0 2px 8px rgba(255, 212, 59, 0.3) !important;
    transition: transform 0.2s ease !important;
}

.wpf-price-in-points-card:hover {
    transform: scale(1.05) !important;
}

.wpf-price-in-points-label {
    font-size: 11px !important;
    color: #856404 !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.wpf-price-in-points-value {
    font-size: 1.3em !important;
    font-weight: 800 !important;
    color: #333 !important;
}

/* --- RESPONSIVO --- */
@media (max-width: 768px) {
    .wpf-balance-card {
        padding: 20px 15px !important;
        margin-bottom: 20px !important;
    }
    
    .wpf-points-display {
        font-size: 2.5em !important;
    }
    
    .wpf-coupon-code {
        font-size: 1em !important;
        min-width: 100px !important;
        padding: 4px 6px !important;
    }
    
    #wpf-rewards-container {
        padding: 15px !important;
    }
    
    .wpf-price-in-points-card {
        padding: 8px 12px !important;
    }
    
    .wpf-price-in-points-value {
        font-size: 1.1em !important;
    }
}

/* --- ANIMAÇÕES ESPECIAIS --- */
@keyframes wpf-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.wpf-balance-card {
    animation: wpf-pulse 2s ease-in-out infinite !important;
}

.wpf-redeem-reward-btn:not([disabled]):not(.wpf-insufficient-points) {
    animation: wpf-pulse 3s ease-in-out infinite !important;
}

/* --- ESTADOS DE CARREGAMENTO --- */
.wpf-loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
    position: relative !important;
}

.wpf-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin: -10px 0 0 -10px !important;
    border: 2px solid #f3f3f3 !important;
    border-top: 2px solid #667eea !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- CARD PROFISSIONAL DO CARRINHO/CHECKOUT (Material) --- */

/* Elementos ocultos pelo atributo hidden */
[hidden] {
    display: none !important;
}

/* Card principal — discreto e alinhado ao Material Design */
.wpf-redeem-form-container {
    position: relative !important;
    padding: 24px 22px 20px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    margin: 24px 0 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04) !important;
    font-family: inherit !important;
    max-width: 480px !important;
    transition: box-shadow 0.2s ease !important;
}

.wpf-redeem-form-container:hover {
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08) !important;
}

/* Cabeçalho com ícone de carteira */
.wpf-wallet-head {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin-bottom: 16px !important;
}

.wpf-wallet-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: #f3f4f6 !important;
    color: #4f46e5 !important;
    flex-shrink: 0 !important;
}

.wpf-wallet-head-text {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.3 !important;
}

.wpf-wallet-eyebrow {
    font-size: 0.8em !important;
    font-weight: 500 !important;
    color: #9ca3af !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
}

.wpf-wallet-title {
    font-size: 1.15em !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 !important;
}

.wpf-wallet-login {
    font-size: 0.95em !important;
    line-height: 1.6 !important;
    color: #6b7280 !important;
    margin: 0 !important;
}

/* Saldo da carteira */
.wpf-wallet-balance {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding: 14px 16px !important;
    border-radius: 10px !important;
    background: #f9fafb !important;
    border: 1px solid #f3f4f6 !important;
    margin-bottom: 14px !important;
}

.wpf-wallet-amount-row {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.wpf-wallet-amount {
    font-size: 1.6em !important;
    font-weight: 800 !important;
    color: #111827 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
}

.wpf-wallet-pts-label {
    font-size: 0.9em !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
}

.wpf-wallet-equivalent {
    font-size: 0.9em !important;
    color: #6b7280 !important;
}

.wpf-wallet-equivalent strong {
    color: #059669 !important;
    font-weight: 700 !important;
}

.wpf-wallet-equivalent strong .woocommerce-Price-amount {
    color: inherit !important;
}

/* Chip verde de pontos aplicados */
.wpf-applied-chip {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
    font-size: 0.92em !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
}

.wpf-applied-chip-check {
    flex-shrink: 0 !important;
    color: #059669 !important;
}

.wpf-applied-chip strong {
    color: #065f46 !important;
    font-weight: 700 !important;
}

.wpf-applied-chip strong .woocommerce-Price-amount {
    color: inherit !important;
}

/* Campos do formulário */
.wpf-redeem-fields {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

.wpf-redeem-fields .woocommerce-error,
.wpf-redeem-fields .woocommerce-message {
    margin: 0 !important;
}

/* Opção promoção relâmpago */
.wpf-flash-promo-option {
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 1px solid #fde68a !important;
    border-radius: 10px !important;
    background: #fffbeb !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
}

.wpf-flash-promo-option:has(input:checked) {
    border-color: #f59e0b !important;
    background: #fef3c7 !important;
}

.wpf-flash-promo-option label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    font-size: 0.95em !important;
    color: #111827 !important;
    cursor: pointer !important;
}

.wpf-flash-promo-option label span {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.4 !important;
}

.wpf-flash-promo-option label strong {
    font-size: 0.95em !important;
    color: #92400e !important;
}

.wpf-flash-promo-option label small {
    font-size: 0.82em !important;
    color: #b45309 !important;
}

.wpf-flash-promo-option input#wpf_use_flash_promo {
    accent-color: #f59e0b !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}

/* Campo de pontos manuais */
.wpf-manual-points-input-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.wpf-manual-points-input-row label {
    font-size: 0.9em !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 0 !important;
}

.wpf-points-input-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.wpf-points-input {
    width: 100% !important;
    margin: 0 !important;
    padding: 11px 46px 11px 14px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    color: #111827 !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
}

.wpf-points-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.wpf-points-input-suffix {
    position: absolute !important;
    right: 14px !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    color: #9ca3af !important;
    pointer-events: none !important;
}

/* Prévia em tempo real do saldo restante */
.wpf-live-preview {
    margin: 0 !important;
    font-size: 0.85em !important;
    font-weight: 500 !important;
    color: #059669 !important;
    line-height: 1.4 !important;
}

.wpf-live-preview strong {
    color: #047857 !important;
}

/* Linha de botões */
.wpf-action-buttons-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    padding-top: 14px !important;
    border-top: 1px solid #f3f4f6 !important;
    flex-wrap: wrap !important;
}

/* Botões do formulário */
.wpf-redeem-form-container button,
.wpf-redeem-form-container .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 11px 20px !important;
    border-radius: 8px !important;
    font-size: 0.95em !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: none !important;
    position: relative !important;
    line-height: 1 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

/* Botão primário */
.wpf-btn-primary {
    background: #4f46e5 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1) !important;
}

.wpf-btn-primary:hover {
    background: #4338ca !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35) !important;
}

/* Botão remover (ghost discreto) */
.wpf-btn-remove {
    background: transparent !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
}

.wpf-btn-remove:hover {
    background: #f9fafb !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
}

/* Botão remover desabilitado (sem pontos aplicados) — cursor no-drop */
.wpf-btn-remove:disabled,
.wpf-btn-remove[disabled] {
    background: transparent !important;
    color: #d1d5db !important;
    border-color: #f3f4f6 !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

.wpf-btn-remove:disabled:hover,
.wpf-btn-remove[disabled]:hover {
    background: transparent !important;
    color: #d1d5db !important;
    border-color: #f3f4f6 !important;
}

/* Spinner nos botões ao carregar */
.wpf-redeem-form-container button.wpf-loading,
#wpf_apply_redeem_button.wpf-loading,
#wpf_remove_redeem_button.wpf-loading {
    opacity: 0.85 !important;
    color: transparent !important;
    pointer-events: none !important;
}

.wpf-redeem-form-container button.wpf-loading::after,
#wpf_apply_redeem_button.wpf-loading::after,
#wpf_remove_redeem_button.wpf-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 18px !important;
    height: 18px !important;
    margin: -9px 0 0 -9px !important;
    border: 2.5px solid rgba(79, 70, 229, 0.25) !important;
    border-top-color: #4f46e5 !important;
    border-radius: 50% !important;
    animation: spin 0.7s linear infinite !important;
}

#wpf_remove_redeem_button.wpf-loading::after {
    border-color: rgba(107, 114, 128, 0.25) !important;
    border-top-color: #6b7280 !important;
}

/* Garante que o spinner não seja aplicado globalmente */
.wpf-redeem-reward-btn.wpf-loading::after {
    border-top: 2px solid #4f46e5 !important;
}

/* Loader full-page ao aplicar pontos */
.wpf-page-loader {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 18px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    cursor: progress !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease !important;
}

.wpf-page-loader.is-active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.wpf-page-loader-spinner {
    width: 46px !important;
    height: 46px !important;
    border: 4px solid rgba(79, 70, 229, 0.2) !important;
    border-top-color: #4f46e5 !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
}

.wpf-page-loader-text {
    font-size: 1em !important;
    font-weight: 600 !important;
    color: #374151 !important;
    letter-spacing: 0.2px !important;
}

/* Cashback Badges & Native UI Styling */
.wpf-product-cashback-badge {
    display: inline-flex !important;
    align-items: center !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    margin: 15px 0 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.05) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.wpf-product-cashback-badge:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.1) !important;
}

.wpf-product-cashback-badge .wpf-icon {
    font-size: 1.2rem !important;
    margin-right: 8px !important;
}

.wpf-product-cashback-badge strong {
    color: #15803d !important;
}

.wpf-loop-cashback-badge {
    display: inline-block !important;
    background-color: #10b981 !important;
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    margin-top: 5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.wpf-checkout-notice {
    border-top: 3px solid #10b981 !important;
}

.wpf-checkout-notice::before {
    color: #10b981 !important;
}

.wpf-checkout-redeem-toggle {
    color: #10b981 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

.wpf-checkout-redeem-toggle:hover {
    color: #059669 !important;
    text-decoration: none !important;
}

.wpf-checkout-redeem-form-wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-top: 15px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}