/* Reset e Base - Prefixo cp- */
.cp-wrapper {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
    line-height: 1.5;
}
.cp-wrapper * { box-sizing: border-box; }

/* Layout Grid */
.cp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
}
@media (max-width: 991px) { .cp-grid { grid-template-columns: 1fr; } }
@media (max-width: 576px) { .cp-row-half { flex-direction: column; gap: 10px; } }

/* Cards */
.cp-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
}

/* Headers */
.cp-card-header {
    display: flex; align-items: center; gap: 15px;
    margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px;
}
.cp-header-icon {
    width: 32px; height: 32px;
    background: #00c853; color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.cp-header-icon.blue { background: #1E90FF; }
.cp-step-number {
    width: 32px; height: 32px; background: #1E90FF; color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 14px; flex-shrink: 0;
}
.cp-header-text h3 { margin: 0; font-size: 16px; font-weight: 700; color: #2c3e50; }
.cp-header-text p { margin: 3px 0 0 0; font-size: 12px; color: #7f8c8d; }

/* Forms */
.cp-form-group { margin-bottom: 12px; position: relative; }
.cp-form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 12px; color: #555; }
.cp-form-control {
    width: 100%; padding: 10px 12px;
    border: 1px solid #e0e0e0; border-radius: 6px;
    font-size: 13px; transition: all 0.2s;
    background: #fcfcfc; height: 40px; display: block;
}
.cp-form-control:focus { border-color: #1E90FF; background: #fff; outline: none; box-shadow: 0 0 0 2px rgba(30,144,255,0.1); }
.cp-row-half { display: flex; gap: 15px; }
.cp-col-half { flex: 1; }

/* VIEW MODE (Resumo dos dados) */
.cp-view-mode {
    background: #f8fbff; border: 1px solid #e0e6ed;
    padding: 15px; border-radius: 8px; position: relative;
}
.cp-view-line { margin-bottom: 8px; font-size: 13px; color: #555; }
.cp-view-line strong { color: #333; font-weight: 600; }
.cp-btn-edit {
    position: absolute; top: 15px; right: 15px;
    font-size: 12px; color: #1E90FF; cursor: pointer; text-decoration: none; font-weight: 600;
}
.cp-btn-edit:hover { text-decoration: underline; }

/* Botão Salvar (dentro do form de edição) */
.cp-btn-save {
    background: #1E90FF; color: white; border: none; padding: 8px 15px;
    border-radius: 4px; font-size: 13px; cursor: pointer; margin-top: 10px;
}
.cp-btn-save:hover { background: #1873cc; }

/* Pagamento */
.cp-payment-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px; cursor: pointer; border: 1px solid #eee; border-radius: 8px;
    margin-bottom: 8px; background: #fff; transition: all 0.2s; width: 100%;
}
.cp-payment-row:hover { border-color: #1E90FF; }
.cp-payment-row.active { border-color: #1E90FF; background-color: #f8fbff; }
.cp-payment-left { display: flex; align-items: center; gap: 12px; }
.cp-payment-left i { font-size: 18px; color: #555; width: 25px; text-align: center; }
.cp-payment-name { font-weight: 600; color: #333; font-size: 14px; }
.cp-payment-right { text-align: right; }
.cp-payment-price { color: #00c853; font-weight: 700; font-size: 13px; }
.cp-payment-sub { font-size: 10px; color: #999; display: block; }
.cp-payment-details {
    background: #fff; border: 1px solid #007bff; border-top: none;
    margin-top: -10px; margin-bottom: 15px; padding: 20px; border-radius: 0 0 8px 8px;
    display: none; /* Forced hidden by default */
}
/* Force hide even if WC adds style="display:block" via JS, unless we add .active class */
.cp-payment-details:not(.active) {
    display: none !important;
}
.cp-payment-details.active {
    display: block !important;
}

/* Resumo */
.cp-summary-header { color: #007bff; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.cp-summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 13px; color: #555; }
.cp-summary-total { background: #f1f3f5; padding: 15px; border-radius: 6px; margin-top: 15px; }
.cp-total-row { display: flex; justify-content: space-between; align-items: center; }
.cp-total-title { font-weight: 700; font-size: 15px; color: #333; }
.cp-total-amount { font-weight: 800; font-size: 20px; color: #00c853; }
.cp-total-sub { text-align: right; font-size: 11px; color: #999; margin-top: 2px; }

/* Botão Finalizar */
.cp-btn-checkout {
    width: 100%; background: #00c853; color: white; border: none; padding: 16px;
    border-radius: 6px; font-size: 15px; font-weight: 700; cursor: pointer;
    transition: background 0.2s; box-shadow: 0 4px 10px rgba(0,200,83,0.2); display: block;
}
.cp-btn-checkout:hover { background: #009624; transform: translateY(-1px); }
.cp-btn-checkout:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; }

/* Loading */
.cp-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.9); z-index: 9999;
    display: none; align-items: center; justify-content: center; flex-direction: column;
}
.cp-spinner {
    width: 40px; height: 40px; border: 4px solid #f3f3f3;
    border-top: 4px solid #00c853; border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Shipping Collapse Style */
.cp-shipping-wrapper { margin-top: 20px; border-top: 1px solid #f0f0f0; padding-top: 20px; }
.cp-shipping-view { position: relative; }
.cp-shipping-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.cp-shipping-title { font-weight: 700; font-size: 15px; color: #333; }
.cp-shipping-price { font-weight: 700; color: #00c853; font-size: 15px; }
.cp-shipping-desc { font-size: 13px; color: #666; display: block; margin-bottom: 8px; }
.cp-change-shipping {
    font-size: 13px; color: #1E90FF; text-decoration: none; font-weight: 600; cursor: pointer;
    display: inline-block;
}
.cp-change-shipping:hover { text-decoration: underline; }
.cp-shipping-list { 
    margin-top: 15px; background: #f8fbff; padding: 15px; border-radius: 8px; border: 1px solid #e1f0ff; 
}
.cp-shipping-list ul#shipping_method { list-style: none; padding: 0; margin: 0; }
.cp-shipping-list ul#shipping_method li { 
    margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between;
    background: #fff; padding: 10px; border: 1px solid #eee; border-radius: 6px;
}
.cp-shipping-list ul#shipping_method li:last-child { margin-bottom: 0; }
.cp-shipping-list input[type="radio"] { margin-right: 10px; accent-color: #1E90FF; transform: scale(1.1); }
.cp-shipping-list label { margin: 0; font-size: 13px; color: #444; flex: 1; cursor: pointer; }

.hidden { display: none !important; }

/* Utility Classes - Added to replace inline styles */
.cp-sticky-card { position: sticky; top: 20px; }
.cp-text-link { font-size: 12px; color: #007bff; text-decoration: none; }
.cp-products-list { list-style: none; padding: 0; margin: 0 0 15px 0; }
.cp-product-item { display: flex; justify-content: space-between; font-size: 13px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.cp-product-info { display: flex; flex-direction: column; }
.cp-product-name { font-weight: 600; color: #333; }
.cp-product-qty { font-size: 11px; color: #999; }
.cp-product-price { text-align: right; display: flex; align-items: center; gap: 5px; }
.cp-renewal-date { margin-top: 10px; font-size: 12px; color: #666; display: flex; justify-content: space-between; }
.cp-summary-divider { height: 1px; background: #eee; margin: 15px 0; }
.cp-label-sm { font-size: 11px; font-weight: 600; color: #777; margin-bottom: 5px; display: block; }
.cp-sm { height: 32px !important; font-size: 12px !important; }
.cp-btn-sm { height: 32px; font-size: 12px; line-height: 32px; padding: 0 12px; }
.cp-cashback-area { margin-top: 15px; }
.cp-total-recurrence { font-size: 11px; color: #999; text-align: right; margin-top: 3px; }
.cp-remove-coupon { font-size: 11px; color: #ff4444; margin-left: 5px; text-decoration: none; }
.cp-remove-coupon:hover { text-decoration: underline; }

.cp-text-muted { color: #555; }
.cp-text-light { color: #999; }
.cp-font-bold { font-weight: 600; }
.cp-text-right { text-align: right; }
.cp-text-success { color: #28a745; font-weight: 600; }
.cp-trust-badges { margin-top: 25px; text-align: center; color: #ccc; font-size: 24px; display: flex; justify-content: center; gap: 20px; }
.cp-honeypot { display: none; visibility: hidden; opacity: 0; position: absolute; left: -9999px; }
.cp-mb-15 { margin-bottom: 15px; }
.cp-label-bold { display: block; margin-bottom: 8px; font-weight: 600; }
.cp-flex-gap-20 { display: flex; gap: 20px; }
.cp-radio-label { display: flex; align-items: center; cursor: pointer; }
.cp-radio-input { margin-right: 8px; }
.cp-w-50 { width: 50%; }
.cp-flex-gap-10 { display: flex; gap: 10px; }
.cp-flex-1 { flex: 1; }
.cp-btn-blue { background: #1E90FF; color: white; border: none; padding: 0 15px; border-radius: 6px; cursor: pointer; }
.cp-feedback-msg { font-size: 12px; color: #666; display: none; margin-top: 5px; }
.cp-flex-2 { flex: 2; }
.cp-payment-description { margin-bottom: 15px; font-size: 13px; color: #666; }
.cp-secure-msg { text-align: center; margin-top: 10px; font-size: 11px; color: #999; }
.cp-empty-payment { padding: 20px; text-align: center; color: #ff4444; }
.cp-loading-text { margin-top: 15px; font-weight: bold; color: #555; }

/* Coupon Area */
.cp-coupon-area { margin-top: 20px; border-top: 1px solid #eee; padding-top: 15px; }
.cp-coupon-input-group { display: flex; gap: 10px; }
.cp-coupon-input-group input { flex: 1; }
