/* Your original frontend CSS */
.cpf-hidden { display:none !important; }

/* WooCommerce Cart Overrides */
.woocommerce div.product form.cart > .quantity, .woocommerce div.product form.cart .quantity:not(.cpf-custom-quantity-wrapper) { display:none !important; } 
.woocommerce div.product form.cart button.single_add_to_cart_button:not(.cpf-custom-atc-button) { display:none !important; }

/* Main Wrapper */
.custom-product-fields-wrapper { display:block !important; clear:both; margin:15px 0 20px; }

.cpf-options-title { 
    margin-bottom:10px; 
}

/* PRIMARY FIX: Make the label the flex container */
.cpf-options-radio-list label { display: flex; /* Aligns input, text, and price */ align-items: center; /* Vertically aligns all items */ padding:10px; border:1px solid #ccc; margin-bottom:5px; cursor:pointer; }

/* The checked status targets the text wrapper */
.cpf-options-radio-list input[type="radio"]:checked + .cpf-option-name-wrapper { font-weight: bold; }

/* --- Price Alignment Classes (Flexbox) --- */
.cpf-option-name-wrapper {
    display: block; 
    flex-grow: 1; 
    min-width: 0; 
    margin-left: 5px; 
}

.cpf-price-display {
    flex-shrink: 0; 
}

.cpf-align-right.cpf-price-display {
    margin-left: auto !important; 
}

/* UI Spacing Fix */
.cpf-options-wrapper input[type="radio"],
.cpf-options-radio-list input[type="radio"] { 
    margin-right: 0 !important; 
    vertical-align: middle; 
}

.cpf-options-radio-list label:hover { 
    background-color: #f0f0f0; 
}

/* --- BEGIN ATC CONTROLS LAYOUT & STYLES --- */
.cpf-atc-controls-wrapper {
    position: relative;
    display: flex !important;
    flex-direction: column !important; 
    align-items: flex-start !important; 
    gap: 10px !important; 
    margin-top: 20px !important;
    width: 100% !important;
}

.cpf-top-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
}

.cpf-clear-wrapper { 
    flex: 0 0 auto; 
}

.cpf-clear-selection {
    cursor: pointer;
    text-decoration: none;
    line-height: 1; 
    background: #f0f0f0; 
    color: #555; 
    border: 1px solid #ccc;
    box-shadow: none;
    text-shadow: none;
    border-radius: 4px;
    padding: 10px 12px;
    font-weight: normal;
    font-size: 0.9em;
    white-space: nowrap;
    transition: background 0.2s; 
}

.cpf-clear-selection:hover { 
    background: #e0e0e0; 
}

.cpf-custom-quantity-wrapper { 
    flex: 0 0 auto; 
    display: flex;
    align-items: stretch; 
    background: #E8F5E9; 
    border-radius: 4px;
    overflow: hidden; 
    border: 1px solid #ccc; 
}

.cpf-custom-quantity-wrapper input[type="number"] {
    border: none;
    text-align: center;
    padding: 10px 5px !important; 
    width: 40px !important; 
    margin: 0 !important;
    background: transparent !important;
    line-height: 1 !important; 
    font-size: 0.9em !important; 
    -moz-appearance: textfield;
}

.cpf-custom-quantity-wrapper input::-webkit-inner-spin-button, 
.cpf-custom-quantity-wrapper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cpf-custom-quantity-wrapper button { 
    height: auto;
    padding: 10px 8px !important; 
    line-height: 1 !important; 
    background: #66BB6A; 
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    transition: background 0.2s;
}

.cpf-custom-quantity-wrapper button:hover { 
    background: #388E3C; 
}

.cpf-custom-quantity-wrapper .minus {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.cpf-custom-quantity-wrapper .plus {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.cpf-custom-atc-button {
    flex: 0 0 100%; 
    width: 100%; 
    padding: 12px 20px;
    font-size: 1.1em;
    background: #4CAF50; 
    color: #fff;
    border: 1px solid #4CAF50;
    box-shadow: none;
    text-shadow: none;
}

.cpf-custom-atc-button:hover { 
    background: #43A047; 
}

.cpf-custom-atc-button:disabled { 
    background:#a0a0a0; 
    cursor:not-allowed; 
    border-color: #a0a0a0; 
}

/* NEW: 2SF Button Style (Go for Payment/Proceed to Checkout) */
.cpf-2sf-atc-button {
    flex: 0 0 100%; 
    width: 100%; 
    padding: 15px 20px; /* Slightly larger for prominence */
    font-size: 1.2em;
    font-weight: 700;
    /* Default color (will be overridden by inline style if custom color is set) */
    background: #007bff; 
    color: #fff;
    border: 1px solid #007bff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
    text-shadow: none;
    border-radius: 6px;
    transition: background 0.2s, box-shadow 0.2s;
}

.cpf-2sf-atc-button:hover {
    background: #0056b3;
    border-color: #0056b3;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15); 
}
/* --- END ATC CONTROLS LAYOUT & STYLES --- */

/* Floating Warning Style */
.cpf-warning-popup {
    position: absolute; 
    top: -30px; 
    left: 0;
    right: 0;
    margin: auto;
    background-color: #e55c5c;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
    white-space: nowrap;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    width: fit-content;
}

.cpf-warning-popup.show {
    opacity: 1;
}

/* --- New Accordion/Card Styles --- */
.cpf-accordion-wrapper { 
    border: 1px solid #ddd; 
    margin-bottom: 10px; 
}

.cpf-accordion-header {
    padding: 15px;
    background-color: #f7f7f7;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.cpf-accordion-header:hover { 
    background-color: #f0f0f0; 
}

.cpf-accordion-header h4 { 
    margin: 0; 
    font-size: 1.1em; 
}

.cpf-accordion-icon::after {
    content: '\25B6'; 
    transition: transform 0.3s;
    display: inline-block;
}

.cpf-accordion-header.active .cpf-accordion-icon::after {
    content: '\25BC'; 
}

/* --- Inner Accordion Content (CSS Control) --- */
.cpf-accordion-content {
    /* Initial padding is ZERO at top/bottom, allowing max-height to collapse the element */
    padding: 0 15px; 
    overflow: hidden; 
    background-color: #fff;
    
    /* COLLAPSED STATE */
    max-height: 0; 
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out; 
}

.cpf-accordion-content.is-open {
    /* EXPANDED STATE */
    max-height: 2000px; /* Must be larger than max possible content height */
    padding: 15px; /* Restore padding when open */
}

.cpf-accordion-content label.cpf-option-card {
    display: flex; 
    align-items: center; 
    padding: 15px;
    border: 1px solid #ccc;
    margin-top: 10px;
    cursor: pointer;
    background-color: #fff;
}

.cpf-accordion-content label.cpf-option-card:hover { 
    background-color: #f9f9f9; 
}

.cpf-accordion-content input[type="radio"] {
    margin-right: 0 !important; 
    vertical-align: middle;
}

.cpf-accordion-content input[type="radio"]:checked + .cpf-option-name-wrapper {
    font-weight: bold;
    color: #0073aa !important; 
}

/* --- Summary Display Styles --- */
.cpf-summary-wrapper { 
    margin: 15px 0; 
    padding: 10px;
    border: 1px solid #eee; 
    border-radius: 4px;
}

.cpf-summary-title { 
    font-size: 1.1em;
    margin-bottom: 5px;
}

.cpf-summary-body { 
    min-height: 20px; 
    font-weight: bold;
    display: flex !important; 
    justify-content: space-between !important; 
    align-items: center;
    width: 100%; 
    display: none; 
}

.cpf-summary-left-group {
    display: flex;
    align-items: center;
    gap: 5px; 
}

.cpf-summary-right-group { 
    flex-shrink: 0; 
}

.cpf-summary-left-group span { 
    margin: 0; 
    padding: 0; 
}

/* ======================================= */
/* --- NEW: 3-STEP FLOW STYLES (CSS Control) --- */
/* ======================================= */
.cpf-step-wrapper { 
    border: 1px solid #ccc;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden; 
    transition: background-color 0.3s, border-color 0.3s;
}

/* Step Header: Always visible */
.cpf-step-header {
    padding: 15px;
    background-color: #eaf1f7;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.cpf-step-header:hover {
    background-color: #e0e7ee;
}

.cpf-step-header.active {
    background-color: #d8e5f2;
}

/* Step Title + Summary Line */
.cpf-step-title-group {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cpf-step-title-group h4 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

/* Summary Line (Selection/Date) */
.cpf-step-summary-line {
    font-size: 0.9em;
    color: #555;
    font-style: italic;
    margin-top: 3px;
    display: none; /* Hide until populated by JS */
}

/* Step Status Icon */
.cpf-step-icon {
    font-size: 1.5em;
    color: #555;
    margin-left: 15px;
    transition: transform 0.3s;
}

/* --- Color Highlight Styles (Soft Validation) --- */
.cpf-step-wrapper.cpf-completed-highlight {
    border-color: #4CAF50; /* Green Border */
    background-color: #e8f5e9; /* Light Green Background */
}

.cpf-step-wrapper.cpf-completed-highlight .cpf-step-header {
    background-color: #c8e6c9; /* Slightly darker header */
}

.cpf-step-wrapper.cpf-completed-highlight .cpf-step-icon::before {
    content: '\2714'; /* Checkmark */
    color: #4CAF50; 
}

.cpf-step-wrapper.cpf-error-highlight {
    border-color: #F44336; /* Red Border */
    background-color: #ffebee; /* Light Red Background */
}

.cpf-step-wrapper.cpf-error-highlight .cpf-step-header {
    background-color: #ffcdd2; /* Slightly darker header */
}

.cpf-step-wrapper.cpf-error-highlight .cpf-step-icon::before {
    content: '\2716'; /* X Mark */
    color: #F44336;
}

/* Step Content Area (CSS Control) */
.cpf-step-content {
    /* Initial padding is ZERO at top/bottom, allowing max-height to collapse the element */
    padding: 0 15px 0 15px; 
    background-color: #fff;
    border-top: 1px solid #eee;
    overflow: hidden; 

    /* COLLAPSED STATE */
    max-height: 0; 
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out; 
}

.cpf-step-content.is-open {
    /* EXPANDED STATE */
    max-height: 4000px; /* Use a larger value for step content as it holds more */
    padding: 15px; /* Restore padding when open */
}

/* Flashing Effect */
.cpf-step-wrapper.flash-highlight .cpf-step-header {
    animation: flash 1.5s ease-in-out;
}

@keyframes flash {
    0% { background-color: #d8e5f2; }
    50% { background-color: #fff; box-shadow: 0 0 10px rgba(0, 123, 255, 0.5); }
    100% { background-color: #d8e5f2; }
}

/* ======================================= */
/* --- POST-ATC SUCCESS WRAPPER STYLES --- */
/* ======================================= */

.cpf-post-atc-success-wrapper {
    background-color: #e8f5e9; /* Light green background */
    border: 1px solid #c8e6c9; /* Green border */
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
    display: none; /* Must be hidden by default (JS will slideDown) */
    text-align: center;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.cpf-post-atc-success-wrapper h3 {
    margin: 0 0 10px 0;
    color: #4CAF50;
    font-size: 1.3em;
}

.cpf-success-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

/* Style for the "View Cart" button (inherits WooCommerce style, but force full width) */
.cpf-post-atc-success-wrapper .button.view-cart-button {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 1.1em;
    background-color: #4CAF50;
    color: #fff;
    border: 1px solid #4CAF50;
    box-shadow: none;
    text-shadow: none;
    transition: background-color 0.2s;
}

.cpf-post-atc-success-wrapper .button.view-cart-button:hover {
    background-color: #43A047;
}

/* Style for the "Add another plan" button (secondary button style) */
.cpf-add-another-button {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 1.1em;
    background-color: #f7f7f7; /* Light grey */
    color: #555;
    border: 1px solid #ccc;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.cpf-add-another-button:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* ------------------------------------------- */
/* --- NEW: PERMANENT VIEW CART BUTTON WRAPPER --- */
/* ------------------------------------------- */
.cpf-permanent-view-cart-wrapper {
    /* Position it below the main ATC button/controls */
    margin-top: 15px;
    width: 100%;
    display: none; /* Hidden by default; only shown after first ATC success by JS */
    
    /* Styles for the button itself to make it prominent */
    text-align: center;
}

.cpf-permanent-view-cart-wrapper .button {
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1em;
    background-color: #ff9800; /* Orange/Amber color for distinct permanent view cart */
    color: #fff;
    border: 1px solid #fb8c00; 
    box-shadow: none;
    text-shadow: none;
    transition: background-color 0.2s;
}

.cpf-permanent-view-cart-wrapper .button:hover {
    background-color: #fb8c00;
}
/* ------------------------------------------- */

/* Ensure the success message is fully visible and not hidden by steps/ATC controls */
.cpf-atc-controls-wrapper > :not(.cpf-post-atc-success-wrapper) {
    /* When the success wrapper is displayed, all other direct children of cpf-atc-controls-wrapper are hidden by JS */
}

/* ====================================================== */
/* --- NEW STYLES FOR CUSTOM SWATCH SETTINGS (LINE BREAKER & ICONS) --- */
/* ====================================================== */

/* 1. Styling for the Line Breaker for Custom HTML Blocks */
/* This forces the HTML block to act like a <br/> and take up a new line. */
.custom-product-fields-wrapper .cpf-option-row.html-block.cpf-block-line-breaker {
    display: block !important;
    width: 100%;
    clear: both; /* Ensures it clears any preceding floated options/swatches */
    margin-top: 10px;
    margin-bottom: 10px;
}

/* 2. Styling for the FontAwesome Icon inside option names/titles (Radio/Card/Swatch) */

/* Base style for the icon element */
i.cpf-option-icon {
    font-size: 1.1em; /* Slight bump up from base font size */
    vertical-align: middle;
    display: inline-block; /* Essential for spacing consistency */
    line-height: 1; /* Helps with vertical alignment */
}

/* Spacing when the icon is before the title/text */
i.cpf-option-icon.before-title {
    margin-right: 5px;
}

/* Spacing when the icon is after the title/text */
i.cpf-option-icon.after-title {
    margin-left: 5px;
}

/* ====================================================== */
/* 6. CUSTOM OPTION SWATCHES STYLES (MODIFIED FOR FLUID FLOW) */
/* ====================================================== */
/* Custom Grouping for Swatches */
.cpf-swatch-group {
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.cpf-group-header {
    margin-bottom: 20px;
 /*   font-weight: 600; */
    font-size: 1.15em;
    line-height: 1.4;
}

/* Ensure swatches inside groups don't have extra margins */
.cpf-swatch-group .cpf-options-list.cpf-display-swatches {
    margin: 0;
}


.cpf-options-list.cpf-display-swatches {
    display: flex; 
    flex-wrap: wrap; /* Allows wrapping to new lines */
    gap: 10px; /* Space between each swatch */
    margin: 15px 0;
    justify-content: flex-start; /* Aligns items to the left */
}

.cpf-option-row.cpf-swatch-option {
    flex: 1 1 auto; /* Grow to fill space, shrink if needed, base width on content */
    max-width: fit-content; /* Prevents stretching to 100% width on single lines */
    min-width: 100px; /* Ensures cards don't get too skinny */
    position: relative;
    margin: 0;
    border: none !important; 
    padding: 0 !important; 
}

/* Mobile: allow cards to take up more space if desired */
@media (max-width: 480px) {
    .cpf-option-row.cpf-swatch-option {
        flex: 1 1 45%; /* Approx 2 per line on small mobile */
    }
}

.cpf-option-row.cpf-swatch-option input.cpf-input-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cpf-option-row.cpf-swatch-option .cpf-option-label {
    display: block;
    width: 100%;
    height: 100%;
    border: 2px solid #ccc;
    border-radius: 6px;
    padding: 10px 15px; /* Comfortable padding */
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    background-color: #fff;
    text-align: center; /* Center content inside the card */
}

.cpf-option-row.cpf-swatch-option input.cpf-input-radio:checked + .cpf-option-label {
    border-color: #2563EB; /* botão selecionado */ 
    background-color: #3B82F6;
  color: #FFFFFF !important;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}


/* Garantia extra: força cor branca em qualquer texto dentro (h4, p, span etc.) */
.cpf-option-row.cpf-swatch-option input.cpf-input-radio:checked + .cpf-option-label *,
.cpf-option-row.cpf-swatch-option input.cpf-input-radio:checked + .cpf-option-label h4 {
  color: #FFFFFF !important;
}

.cpf-option-row.cpf-swatch-option input.cpf-input-radio:checked + .cpf-option-label::before {
    content: "✓";
    position: absolute;
    top: -10px;
    right: -10px;
        background-color: #10B981; /* verde sucesso */
        color: white;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
}

.cpf-option-row.cpf-swatch-option .cpf-option-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center visual elements */
    gap: 4px;
}

.cpf-option-row.cpf-swatch-option .cpf-option-title {
    font-size: 1em;
    font-weight: 600;
    margin: 0;
    white-space: nowrap; /* Prevents text from breaking into weird lines */
}

.cpf-option-row.cpf-swatch-option .cpf-price-display {
    font-size: 0.85em;
    color: #666;
}

.cpf-swatch-img {
    width: 40px; /* Consistent size for icons/images */
    height: 40px;
    object-fit: contain;
    margin-bottom: 2px;
}

.cpf-swatch-color {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
}

/* --- Floating Bottom Summary Styles --- */
#cpf-floating-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 99999;
    padding: 10px 0;
    border-top: 1px solid #eee;
    animation: slideUp 0.3s ease-out;
}

.cpf-floating-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cpf-floating-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 15px;
}

.cpf-float-price {
    font-weight: bold;
    color: #0B6623; /* Matches plugin theme */
}

.cpf-floating-cta {
    padding: 8px 20px !important;
    font-size: 14px !important;
    margin: 0 !important;
    height: auto !important;
    min-height: unset !important;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .cpf-floating-text {
        font-size: 13px;
    }
    .cpf-floating-cta {
        padding: 6px 15px !important;
    }
}


/* --- New 2SF Swatch Price Badge --- */
.cpf-swatch-price-badge {
    content: "R$100"; /* Note: Content is handled dynamically in PHP */
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #0955b7;
    color: white;
    width: auto;
    height: 15px;
    padding: 5px;
    border-radius: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: x-small;
    z-index: 10; /* Added to ensure it sits on top of the card */
    line-height: 1; /* Added to ensure vertical centering works with flex */
    box-shadow: 0 2px 4px rgba(0,0,0,0.15); /* Optional: visual pop */
}


/* PERSONALIZACAO FORM EMAIL MYESIM */
.cpf-mye-sim-wrapper {
            padding: 40px 20px;
            background: radial-gradient(circle at top right, #f0f7ff, #ffffff); /* Gradiente sutil no fundo */
            display: flex;
            justify-content: center;
        }

        .cpf-mye-sim-container {
            max-width: 550px;
            width: 100%;
            background: #ffffff;
            border-radius: 16px;
            padding: 35px;
            box-shadow: 0 15px 35px rgba(0, 74, 153, 0.1);
            border: 1px solid rgba(0, 124, 186, 0.1);
            box-sizing: border-box; /* Garante que o padding não "empurre" o conteúdo para fora */
        }

        .cpf-header-icon {
            background: #eef7ff;
            width: 60px;
            height: 60px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            color: #007cba;
            font-size: 24px;
        }

        .cpf-mye-sim-container h3 {
            color: #1a2b3c;
            margin: 0 0 10px 0;
            font-size: 22px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .cpf-mye-sim-container p {
            color: #64748b;
            font-size: 15px;
            line-height: 1.6;
            margin-bottom: 30px;
        }

        /* Container do Form com Grid para evitar quebra de borda */
        .cpf-form-group {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
            width: 100%;
        }

        @media (min-width: 500px) {
            .cpf-form-group {
                grid-template-columns: 1fr auto; /* O input cresce, o botão fixa no tamanho do conteúdo */
            }
        }

        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-wrapper i {
            position: absolute;
            left: 14px;
            color: #94a3b8;
        }

        .cpf-mye-sim-container input[type="email"] {
            width: 100%;
            padding: 14px 14px 14px 40px; /* Espaço para o ícone */
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 15px;
            transition: all 0.3s ease;
            outline: none;
            box-sizing: border-box;
        }

        .cpf-mye-sim-container input[type="email"]:focus {
            border-color: #007cba;
            background-color: #f8fafc;
            box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.1);
        }

        .cpf-mye-sim-container .button-submit {
            background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
            color: white;
            border: none;
            padding: 14px 28px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
        }

        .cpf-mye-sim-container .button-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(0, 124, 186, 0.3);
            filter: brightness(1.1);
        }

        .cpf-mye-sim-container .button-submit i {
            font-size: 14px;
        }

        #cpf-form-response {
            margin-top: 20px;
            border-radius: 8px;
            font-size: 14px;
        }
        
        
        /* LAYOUT DA PAGINA DE VISUALIZAR ESIM */
        
        .cpf-esim-card {
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 16px;
            padding: 25px;
            margin-bottom: 24px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            transition: transform 0.2s ease;
        }

        .cpf-esim-card:hover {
            border-color: #007cba;
        }

        .cpf-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            border-bottom: 1px solid #f1f5f9;
            padding-bottom: 15px;
            margin-bottom: 20px;
        }

        .cpf-order-info h4 {
            margin: 0;
            color: #1e293b;
            font-size: 18px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .cpf-sku-badge {
            display: inline-block;
            background: #f8fafc;
            color: #64748b;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 600;
            margin-top: 5px;
            border: 1px solid #e2e8f0;
        }

        .status-badge {
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Cores dinâmicas para o status */
        .status-active { background: #dcfce7; color: #166534; }
        .status-pending { background: #fef9c3; color: #854d0e; }

        .cpf-card-body {
            display: grid;
            grid-template-columns: 1fr;
            gap: 25px;
        }

        @media (min-width: 600px) {
            .cpf-card-body {
                grid-template-columns: 180px 1fr;
                align-items: center;
            }
        }

        .qr-code-section {
            background: #f8fafc;
            padding: 15px;
            border-radius: 12px;
            text-align: center;
            border: 1px dashed #cbd5e1;
        }

        .cpf-qr-code canvas, .cpf-qr-code img {
            max-width: 150px !important;
            height: auto !important;
            margin: 0 auto;
        }

        .details-section {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .info-group {
            background: #ffffff;
        }

        .info-label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: #64748b;
            font-weight: 600;
            text-transform: uppercase;
            margin-bottom: 5px;
        }

        .info-value {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .info-value code {
            background: #f1f5f9;
            color: #334155;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 13px;
            word-break: break-all;
            flex: 1;
            border: 1px solid #e2e8f0;
        }

        .loading-state {
            text-align: center;
            padding: 20px;
            color: #007cba;
        }

        .safety-footer {
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #f1f5f9;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 12px;
            color: #94a3b8;
        }

        
        /* BOTAO WHATSAPP */
        /* Support Alert Box */
.cpf-support-box {
    margin-top: 30px;
    padding: 15px;
    background: #f0f9ff; /* Light blue background */
    border: 1px solid #bae6fd;
    border-radius: 12px;
}

.support-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.support-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.support-text strong {
    color: #0369a1;
    font-size: 14px;
    margin-bottom: 2px;
}

.support-text span {
    color: #075985;
    font-size: 13px;
}

/* WhatsApp Button */
.btn-whatsapp {
    background-color: #25D366;
    color: white !important;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-1px);
}

.btn-whatsapp i {
    font-size: 18px;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .support-content {
        flex-direction: column;
        text-align: center;
    }
    
    .support-text {
        text-align: center;
        align-items: center;
    }
    
    .btn-whatsapp {
        width: 100%;
        justify-content: center;
    }
}

/* --- eSIM Card Module (Moved from Inline) --- */
.cpf-esim-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    overflow: hidden;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.cpf-card-header {
    background: #f8fafc;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.cpf-order-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cpf-sku-badge {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.status-badge.status-active { background-color: #dcfce7; color: #166534; }
.status-badge.status-pending { background-color: #fff7ed; color: #9a3412; }
.cpf-card-body { 
    padding: 24px;
    display: block !important;
    grid-template-columns: unset !important;
}
.cpf-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
}
@media (min-width: 768px) {
    .cpf-content-wrapper {
        grid-template-columns: auto 1fr;
        gap: 40px;
    }
}
.qr-code-section { text-align: center; }
.cpf-qr-code {
    display: inline-block;
    padding: 15px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
@media (min-width: 768px) {
    .cpf-qr-code { padding: 20px; }
}
.qr-code-section p {
    font-size: 12px;
    color: #64748b;
    margin-top: 12px;
    font-weight: 500;
    line-height: 1.5;
}
.cpf-actions-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.cpf-install-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cpf-btn { 
    padding: 14px 20px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-size: 14px; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    width: 100%;
}
.cpf-btn i { margin-right: 8px; font-size: 18px; }
.btn-apple { background-color: #1e293b; color: #fff; border: 1px solid #1e293b; }
.btn-android { background-color: #ffffff; color: #10b981; border: 1px solid #d1fae5; }
.cpf-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.btn-apple:hover { background-color: #334155; color: #fff; }
.btn-android:hover { background-color: #ecfdf5; color: #059669; }
.details-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #f1f5f9;
}
.info-group { margin-bottom: 16px; }
.info-group:last-child { margin-bottom: 0; }
.info-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.info-value {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #334155;
    word-break: break-all;
    line-height: 1.5;
}
.safety-footer {
    padding: 12px 20px;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #e0f2fe;
}
.loading-state { text-align: center; padding: 60px 20px; }
.loading-state i { font-size: 48px; color: #0ea5e9; margin-bottom: 20px; }
.loading-state p { color: #64748b; font-weight: 500; line-height: 1.6; margin: 0; }

/* --- Custom Thank You Page --- */
.cpf-ty-wrapper {
    max-width: 600px;
    margin: 40px auto;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
}

.cpf-ty-header h1 {
    font-size: 24px;
    margin: 15px 0 10px;
    color: #333;
}

.cpf-ty-header p {
    color: #666;
    margin-bottom: 30px;
}

.cpf-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.cpf-icon-circle.success { background: #dcfce7; color: #166534; }
.cpf-icon-circle.processing { background: #e0f2fe; color: #0369a1; }
.cpf-icon-circle.pending { background: #fff7ed; color: #9a3412; }

.cpf-ty-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* Loader Animation */
.cpf-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.cpf-ty-buttons {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary {
    background: #007cba;
    color: white;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}

.cpf-ty-footer a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
}
.cpf-ty-footer a:hover { text-decoration: underline; }


/* --- HIDE Default WooCommerce Order Info --- */
/* Hides "Thank you. Your order has been received." */
.woocommerce-order > p.woocommerce-notice,
.woocommerce-order > p.woocommerce-thankyou-order-received-text {
    display: none !important;
}

/* Hides the default ugly list (Order #, Date, Email, etc.) */
ul.woocommerce-order-overview,
ul.order_details {
    display: none !important;
}

/* --- STYLING for the NEW Modern Info Grid --- */
.cpf-ty-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: left;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

@media (min-width: 600px) {
    .cpf-ty-meta-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cpf-meta-item {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.cpf-meta-label {
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

.cpf-meta-value {
    color: #334155;
    font-weight: 600;
    word-break: break-word;
}

.warning-footer {
    padding: 12px 16px;
    background-color: #fefce8;
    border-top: 1px solid #fef08a;
    border-radius: 0 0 8px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #854d0e;
    margin-top: -1px;
}

.warning-footer i {
    flex-shrink: 0;
    font-size: 14px;
}

.warning-footer span {
    line-height: 1.5;
}
