/**
 * CSS do Checkout — SaaS Fidelidade
 * 
 * @package SaasFidelidade
 * @author Uebsites - https://uebsites.com.br
 * @modified 2026-03-30 13:55:00
 * @version 1.9.3
 */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.saas-checkout-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* === Header === */
.saas-ck-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.saas-ck-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.saas-ck-header .saas-ck-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.saas-ck-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--cor-primaria, #7c3aed);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.saas-ck-logo-img {
    display: block;
    object-fit: contain;
}

.saas-ck-secure {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.saas-ck-secure svg { color: #22c55e; }

/* === Main Grid === */
.saas-ck-main {
    padding: 32px 0 60px;
}

.saas-ck-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: flex-start;
}

/* === Steps === */
.saas-ck-steps {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

.saas-ck-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.saas-ck-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: #e2e8f0;
    color: #94a3b8;
    transition: all .3s ease;
}

.saas-ck-step-label {
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    transition: color .3s ease;
}

.saas-ck-step-active .saas-ck-step-num {
    background: var(--cor-primaria, #7c3aed);
    color: #fff;
}

.saas-ck-step-active .saas-ck-step-label {
    color: #1e293b;
}

.saas-ck-step-done .saas-ck-step-num {
    background: #22c55e;
    color: #fff;
}

.saas-ck-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 16px;
    transition: background .3s ease;
}

.saas-ck-step-line-active {
    background: var(--cor-primaria, #7c3aed);
}

/* === Etapas === */
.saas-ck-etapa h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.saas-ck-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
}

/* === Campos === */
.saas-ck-field {
    margin-bottom: 16px;
    flex: 1;
}

.saas-ck-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.saas-ck-input,
.saas-ck-mp-field {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.saas-ck-input:focus {
    border-color: var(--cor-primaria, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}

.saas-ck-input::placeholder { color: #9ca3af; }

select.saas-ck-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.saas-ck-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Campo MP iframe */
.saas-ck-mp-field {
    min-height: 48px;
    padding: 4px 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.saas-ck-mp-field iframe {
    border: none !important;
    width: 100% !important;
    height: 44px !important;
}

/* === Erro === */
.saas-ck-erro {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

/* === Botões === */
.saas-ck-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: var(--cor-primaria, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    text-align: center;
}

.saas-ck-btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, .25);
}

.saas-ck-btn-primary:active {
    transform: translateY(0);
}

.saas-ck-btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.saas-ck-btn-outline {
    padding: 10px 20px;
    background: #fff;
    color: var(--cor-primaria, #7c3aed);
    border: 1.5px solid var(--cor-primaria, #7c3aed);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.saas-ck-btn-outline:hover {
    background: var(--cor-primaria, #7c3aed);
    color: #fff;
}

.saas-ck-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    transition: color .2s;
}

.saas-ck-btn-back:hover { color: #1e293b; }

/* === Tabs Pagamento === */
.saas-ck-pay-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.saas-ck-pay-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #64748b;
    cursor: pointer;
    transition: all .2s ease;
}

.saas-ck-pay-tab:hover {
    border-color: #cbd5e1;
    color: #1e293b;
}

.saas-ck-pay-tab-active {
    border-color: var(--cor-primaria, #7c3aed);
    color: var(--cor-primaria, #7c3aed);
    background: #f3eeff;
}

/* === Pix Info === */
.saas-ck-pix-info,
.saas-ck-boleto-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f3eeff;
    border: 1px solid #c4b5fd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.saas-ck-pix-info p,
.saas-ck-boleto-info p {
    font-size: 14px;
    color: #5b21b6;
    line-height: 1.5;
}

.saas-ck-pix-icon { flex-shrink: 0; color: #7c3aed; }
.saas-ck-boleto-info svg { flex-shrink: 0; color: #7c3aed; }

/* === Resultado === */
.saas-ck-result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.saas-ck-result-success {
    background: #dcfce7;
    color: #16a34a;
}

.saas-ck-result-pending {
    background: #fef3c7;
    color: #d97706;
}

#saas-ck-etapa3 {
    text-align: center;
}

#saas-ck-etapa3 h2 {
    text-align: center;
}

#saas-ck-etapa3 .saas-ck-subtitle {
    text-align: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* QR Pix */
.saas-ck-pix-qr {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    display: inline-block;
    margin: 20px auto;
}

.saas-ck-pix-qr img {
    width: 220px;
    height: 220px;
    display: block;
}

.saas-ck-pix-copy {
    max-width: 400px;
    margin: 20px auto;
    text-align: left;
}

.saas-ck-pix-copy label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

.saas-ck-pix-copy-row {
    display: flex;
    gap: 8px;
}

.saas-ck-pix-copy-row .saas-ck-input {
    flex: 1;
    font-size: 13px;
}

/* Aguardando pagamento */
.saas-ck-pix-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding: 14px;
    background: #f1f5f9;
    border-radius: 10px;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

.saas-ck-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #cbd5e1;
    border-top-color: var(--cor-primaria, #7c3aed);
    border-radius: 50%;
    animation: ck-spin .8s linear infinite;
}

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

/* === Sidebar === */
.saas-ck-sidebar {
    position: sticky;
    top: 80px;
}

.saas-ck-plan-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.saas-ck-plan-header {
    padding: 20px 24px 0;
}

.saas-ck-plan-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.saas-ck-plan-body {
    padding: 16px 24px 20px;
}

.saas-ck-plan-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--cor-primaria, #7c3aed);
    margin-bottom: 8px;
}

.saas-ck-plan-price-old {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.saas-ck-plan-price {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.saas-ck-plan-price-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.saas-ck-plan-price-period {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
}

.saas-ck-plan-badge {
    display: inline-block;
    background: #dcfce7;
    color: #16a34a;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.saas-ck-plan-benefits {
    list-style: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.saas-ck-plan-benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    color: #475569;
}

.saas-ck-plan-benefits li svg {
    flex-shrink: 0;
    color: #22c55e;
}

.saas-ck-plan-footer {
    border-top: 1px solid #e2e8f0;
    padding: 16px 24px;
    background: #f8fafc;
}

.saas-ck-plan-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
}

.saas-ck-plan-total span { color: #64748b; }
.saas-ck-plan-total strong { font-size: 20px; color: #1e293b; }

/* Trust badges */
.saas-ck-trust {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saas-ck-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.saas-ck-trust-item svg { color: #22c55e; flex-shrink: 0; }

/* === Responsivo === */
@media (max-width: 900px) {
    .saas-ck-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .saas-ck-sidebar {
        position: static;
        order: -1;
    }
    
    .saas-ck-plan-card {
        border-radius: 12px;
    }
}

@media (max-width: 600px) {
    .saas-ck-main { padding: 20px 0 40px; }
    
    .saas-ck-etapa h2 { font-size: 19px; }
    
    .saas-ck-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .saas-ck-pay-tabs {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .saas-ck-pay-tab {
        flex-direction: row;
        padding: 12px 16px;
    }
    
    .saas-ck-steps {
        margin-bottom: 24px;
    }
    
    .saas-ck-step-label {
        display: none;
    }
    
    .saas-ck-pix-qr img {
        width: 180px;
        height: 180px;
    }
    
    .saas-ck-pix-copy-row {
        flex-direction: column;
    }
    
    .saas-ck-btn-primary {
        font-size: 15px;
        padding: 13px 20px;
    }
}

@media (max-width: 380px) {
    .saas-ck-container { padding: 0 14px; }
    .saas-ck-pix-qr img { width: 160px; height: 160px; }
}

/* Neutralizar estilos do tema WordPress */
.saas-checkout-page .site-content,
.saas-checkout-page .entry-content,
.saas-checkout-page .page-content,
.saas-checkout-page .post-content,
.saas-checkout-page main,
.saas-checkout-page article,
.saas-checkout-page .container,
.saas-checkout-page .wp-block-group__inner-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}
