/* ── CCA Presuscripción — Frontend Styles ──────────────────────── */
/* Author: Julian Duarte | mobile-first | v2.1                     */

:root {
    --cca-primary:      #1a1a1a;
    --cca-accent:       #E8890A;
    --cca-btn-bg:       #E8890A;
    --cca-btn-text:     #ffffff;
    --cca-step-active:  #E8890A;
    --cca-step-done:    #27ae60;
    --cca-radius:       12px;
    --cca-header-bg:    #1a1a1a;
    --cca-header-text:  #ffffff;
    --cca-logo-h:       48px;
    --cca-shadow:       0 4px 24px rgba(0,0,0,.09);
    --cca-border:       #e5e7eb;
    --cca-bg:           #f9fafb;
    --cca-white:        #ffffff;
    --cca-text:         #111827;
    --cca-muted:        #6b7280;
    --cca-error:        #ef4444;
    --cca-input-h:      50px;
    --cca-transition:   .2s ease;
}

/* ── Wrapper ──────────────────────────────────────────────────── */
.cca-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--cca-text);
    -webkit-font-smoothing: antialiased;
}

/* ── Header — horizontal: título izquierda, logo derecha ──────── */
.cca-header {
    background: var(--cca-header-bg);
    color: var(--cca-header-text);
    padding: 16px 24px;
    border-radius: var(--cca-radius) var(--cca-radius) 0 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
}
.cca-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cca-logo {
    height: var(--cca-logo-h);
    max-width: 140px;
    max-height: var(--cca-logo-h);
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
.cca-header-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--cca-header-text) !important;
    margin: 0 !important;
    letter-spacing: -.3px;
    line-height: 1.2;
    text-align: left !important;
}
.cca-header-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,.65) !important;
    margin: 0 !important;
    line-height: 1.4;
    text-align: left !important;
}

/* ── Progress bar ─────────────────────────────────────────────── */
.cca-progress-bar-wrap {
    background: #e5e7eb;
    height: 3px;
    overflow: hidden;
}
.cca-progress-bar {
    height: 100%;
    background: var(--cca-accent);
    transition: width .45s cubic-bezier(.4,0,.2,1);
}

/* ── Steps nav (dots) ─────────────────────────────────────────── */
.cca-steps-nav {
    display: flex;
    justify-content: center;
    background: var(--cca-white);
    padding: 14px 12px;
    border-bottom: 1px solid var(--cca-border);
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.cca-steps-nav::-webkit-scrollbar { display: none; }

.cca-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 52px;
    position: relative;
    cursor: default;
}
.cca-step-dot::before {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--cca-border);
    z-index: 0;
}
.cca-step-dot:last-child::before { display: none; }
.cca-step-dot.done::before { background: var(--cca-step-done); }

.cca-dot-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--cca-border);
    color: var(--cca-muted);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: background var(--cca-transition), color var(--cca-transition);
    flex-shrink: 0;
}
.cca-step-dot.active .cca-dot-num  { background: var(--cca-step-active); color: #fff; }
.cca-step-dot.done   .cca-dot-num  { background: var(--cca-step-done);   color: #fff; }

/* Label — una sola línea, nunca corta */
.cca-dot-label {
    font-size: 10px;
    color: var(--cca-muted);
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
}
.cca-step-dot.active .cca-dot-label { color: var(--cca-accent); font-weight: 700; }

/* ── Step container ───────────────────────────────────────────── */
.cca-steps-container {
    background: var(--cca-white);
    overflow: hidden;
    min-height: 320px;
}

.cca-step-header { padding: 24px 24px 0; }
.cca-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--cca-muted);
    margin: 20px 0 12px;
    padding-top: 16px;
    border-top: 1.5px solid var(--cca-border);
}
.cca-step-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--cca-text);
    letter-spacing: -.3px;
}

.cca-step-body { padding: 20px 24px; }

/* ── Fields grid ──────────────────────────────────────────────── */
.cca-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.cca-field-group { display: flex; flex-direction: column; gap: 6px; }
.cca-full { grid-column: 1 / -1; }

.cca-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    line-height: 1;
}
.cca-field-hint {
    font-size: 12px;
    color: var(--cca-muted);
    margin: 2px 0 0;
    line-height: 1.4;
}
.cca-error-msg {
    font-size: 12px;
    color: var(--cca-error);
    margin: 2px 0 0;
    display: none;
}
.cca-field-group.has-error .cca-error-msg { display: block; }

.cca-input,
.cca-select {
    height: var(--cca-input-h);
    padding: 0 14px;
    border: 1.5px solid var(--cca-border);
    border-radius: calc(var(--cca-radius) * .65);
    font-size: 15px;
    color: var(--cca-text);
    background: var(--cca-white);
    width: 100%;
    box-sizing: border-box;
    transition: border-color var(--cca-transition), box-shadow var(--cca-transition);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.cca-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}
.cca-input:focus,
.cca-select:focus {
    border-color: var(--cca-accent);
    box-shadow: 0 0 0 3px rgba(232,137,10,.12);
}
.cca-input.cca-error,
.cca-select.cca-error {
    border-color: var(--cca-error);
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

/* ── Radio group ──────────────────────────────────────────────── */
.cca-radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.cca-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 11px 20px;
    border: 1.5px solid var(--cca-border);
    border-radius: 40px;
    font-size: 15px;
    transition: all var(--cca-transition);
    user-select: none;
}
.cca-radio-label:has(input:checked) {
    border-color: var(--cca-accent);
    background: var(--cca-accent);
    color: #fff;
}
.cca-radio-label input[type="radio"] { display: none; }
.cca-radio-custom {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cca-radio-label:has(input:checked) .cca-radio-custom::after {
    content: '';
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    display: block;
}

/* ── Plan card (Step 1) ───────────────────────────────────────── */
.cca-plan-card {
    background: var(--cca-bg);
    border: 1.5px solid var(--cca-border);
    border-radius: var(--cca-radius);
    overflow: hidden;
    margin-bottom: 16px;
}
.cca-plan-img-wrap {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
}
.cca-plan-img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.cca-plan-img:hover { transform: scale(1.02); }

/* Badges sobre la imagen */
.cca-plan-brand-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}
.cca-plan-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--cca-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: .3px;
}
/* Cuando no hay imagen, badge inline */
.cca-plan-info-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.cca-plan-info-top .cca-plan-type-badge {
    position: static;
    flex-shrink: 0;
    margin-top: 4px;
}

.cca-plan-info { padding: 18px 20px 20px; }
.cca-plan-modelo { font-size: 22px; font-weight: 800; margin: 0 0 4px; color: var(--cca-text); letter-spacing: -.4px; }
.cca-plan-seg { font-size: 12px; color: var(--cca-muted); display: inline-block; margin-bottom: 14px; }
.cca-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cca-plan-row { display: flex; flex-direction: column; gap: 2px; }
.cca-plan-row--full { grid-column: 1 / -1; }
.cca-plan-label { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: var(--cca-muted); font-weight: 700; }
.cca-plan-value { font-size: 15px; font-weight: 700; color: var(--cca-text); }
.cca-plan-price { color: var(--cca-accent); font-size: 22px; font-weight: 800; }
.cca-plan-old-price { font-size: 14px; font-weight: 400; color: var(--cca-muted); text-decoration: line-through; margin-right: 6px; }
.cca-plan-variation { font-size: 12px; color: var(--cca-step-done); font-weight: 600; margin-left: 6px; }
.cca-plan-feature {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--cca-step-done);
    font-weight: 600;
    background: rgba(39,174,96,.08);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 4px;
}

/* ── Plan action buttons ─────────────────────────────────────── */
.cca-plan-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0 4px;
}
.cca-wrapper .cca-btn-sm {
    padding: 8px 14px !important;
    font-size: 13px !important;
    flex: 0 0 auto !important;
}

/* ── Acordeón "Ver otros planes" ─────────────────────────────── */
.cca-other-plans {
    margin-top: 12px;
    padding: 14px 16px 16px;
    background: var(--cca-bg);
    border-radius: var(--cca-radius);
    border: 1.5px solid var(--cca-border);
}
.cca-other-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.cca-other-brand-row .cca-label {
    white-space: nowrap;
    margin: 0;
    font-size: 13px;
}
.cca-other-brand-row .cca-select {
    flex: 1;
    height: 40px;
    font-size: 14px;
}

.cca-other-plans-grid,
.cca-free-plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.cca-mini-plan-card {
    border: 2px solid var(--cca-border);
    border-radius: calc(var(--cca-radius) * .75);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--cca-transition);
    background: var(--cca-white);
}
.cca-mini-plan-card:hover  { border-color: var(--cca-accent); box-shadow: 0 0 0 3px rgba(232,137,10,.12); }
.cca-mini-plan-card.selected { border-color: var(--cca-accent); background: rgba(232,137,10,.04); }
.cca-mini-plan-card img { width: 100%; height: 90px; object-fit: cover; display: block; }
.cca-mini-plan-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cca-mini-plan-info strong { font-size: 13px; color: var(--cca-text); line-height: 1.3; }
.cca-plan-badge-mini {
    background: var(--cca-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 2px;
}
.cca-mini-meta  { font-size: 11px; color: var(--cca-muted); }
.cca-mini-price { font-size: 13px; font-weight: 700; color: var(--cca-accent); }
.cca-no-plans   { color: var(--cca-muted); font-size: 14px; text-align: center; padding: 20px; }
.cca-loading    { color: var(--cca-muted); font-size: 14px; text-align: center; padding: 24px; grid-column: 1 / -1; }

.cca-free-select .cca-select-intro {
    font-size: 15px;
    color: var(--cca-muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ── Plan list view ──────────────────────────────────────────── */
.cca-plans-list {
    border: 1.5px solid var(--cca-border);
    border-radius: var(--cca-radius);
    overflow-x: auto;
    overflow-y: visible;
    margin-bottom: 16px;
    background: var(--cca-white);
}

/* Header y filas: stretch para que las celdas llenen el alto */
.cca-pl-header {
    display: flex;
    align-items: stretch;
    background: #f3f4f6;
    border-bottom: 1.5px solid var(--cca-border);
}
.cca-pl-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background var(--cca-transition);
}
.cca-pl-row:last-child { border-bottom: none; }
.cca-pl-row:hover      { background: rgba(232,137,10,.04); }
.cca-pl-row.cca-pl-active {
    background: rgba(232,137,10,.07);
    box-shadow: inset 3px 0 0 var(--cca-accent);
}

/* ── Celdas base: cada columna maneja su propio padding y borde ── */
.cca-pl-col,
.cca-pl-col-plan,
.cca-pl-col-action {
    padding: 14px 12px;
    border-right: 1px solid var(--cca-border);
    display: flex;
    align-items: center;
    min-width: 0;
    flex-shrink: 0;
}
.cca-pl-col-action { border-right: none; }

/* ── Anchos de columna ───────────────────────────────────────── */
/* Todas las columnas con flex-grow: llenan el contenedor sin espacio muerto.
   flex: grow  shrink  basis */
.cca-pl-col-model  {
    flex: 3 1 160px;
    min-width: 130px;
    padding: 14px 14px;
    border-right: 1px solid var(--cca-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.cca-pl-col        { flex: 1.1 1 82px; }            /* Cuota 1 y V. Móvil */
.cca-pl-col-plan   { flex: 1   1 88px; justify-content: center; }
.cca-pl-col-action { flex: 1.2 1 88px; justify-content: center; }
.cca-pl-plazo      { flex: 0.6 1 48px; }

/* Alineación de datos */
.cca-pl-num    { justify-content: flex-end; }
.cca-pl-center { justify-content: center; }

/* ── Tipografía del header (hereda de las celdas) ────────────── */
.cca-pl-header .cca-pl-col,
.cca-pl-header .cca-pl-col-model,
.cca-pl-header .cca-pl-col-plan,
.cca-pl-header .cca-pl-col-action {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--cca-muted);
    padding-top: 10px;
    padding-bottom: 10px;
    white-space: nowrap;
}

/* ── Foto lateral (modo thumb): fila horizontal ──────────────── */
.cca-pl-has-photo {
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px;
}
.cca-pl-thumb {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    display: block;
}
.cca-pl-model-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Foto arriba (modo top): columna vertical ────────────────── */
.cca-pl-has-photo-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center;
}
.cca-pl-thumb-top {
    width: 120px;
    height: 76px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin-bottom: 8px;
}
.cca-plans-list:has(.cca-pl-has-photo-top) .cca-pl-row { align-items: center; }

/* ── Tipografía de columnas ──────────────────────────────────── */
.cca-pl-brand { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--cca-muted); display: block; margin-bottom: 3px; white-space: nowrap; }
.cca-pl-name  { font-size: 16px; font-weight: 700; color: var(--cca-text); display: block; line-height: 1.25; overflow-wrap: break-word; }

/* Badge de plan: en su columna propia — tamaño generoso */
.cca-pl-plan-tag {
    background: var(--cca-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    white-space: nowrap;
    text-align: center;
    max-width: 100%;
}

/* Scoped to data rows — header typography is never overridden */
.cca-pl-row .cca-pl-cuota { font-size: 16px; font-weight: 800; color: var(--cca-accent); white-space: nowrap; }
.cca-pl-row .cca-pl-valor { font-size: 13px; font-weight: 600; color: var(--cca-text);   white-space: nowrap; }
.cca-pl-row .cca-pl-plazo { font-size: 15px; font-weight: 700; color: var(--cca-text); }
.cca-pl-extra { font-size: 11px; color: var(--cca-muted); }
.cca-pl-adjudicacion { font-size: 11px; color: var(--cca-step-done); font-weight: 600; }

/* ── Botón Elegir ────────────────────────────────────────────── */
.cca-pl-select-btn {
    background: var(--cca-accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 9px 16px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap;
    display: inline-block !important;
    font-family: inherit !important;
    transition: filter .15s !important;
}
.cca-pl-select-btn:hover { filter: brightness(1.08) !important; }

.cca-pl-selected-badge {
    background: #15803d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
}

/* Wrapper de datos: transparente en desktop, fila flex en mobile */
.cca-pl-data-row { display: contents; }

.cca-pl-loading { padding: 28px; text-align: center; color: var(--cca-muted); font-size: 14px; }
.cca-pl-empty   { padding: 28px; text-align: center; color: var(--cca-muted); font-size: 14px; }

/* ── Cuota 1 Bonificada ───────────────────────────────────────── */
/* Desktop: columna centrada — badge arriba full-width, valores centrados */
.cca-cuota-boni {
    flex-direction: column !important;
    align-items: stretch !important;   /* hijos ocupan el ancho completo */
    justify-content: center !important;
    gap: 3px !important;
    padding: 10px 8px !important;
}
.cca-cuota-values {
    display: flex;
    align-items: baseline;
    justify-content: center;           /* centrar tachado + valor */
    gap: 5px;
    white-space: nowrap;
}
/* Tachado */
.cca-cuota-orig {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #9ca3af !important;
    text-decoration: line-through !important;
    white-space: nowrap;
}
/* Valor bonificado */
.cca-cuota-zero {
    color: #16a34a !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    white-space: nowrap;
}
/* Badge: full-width, texto centrado */
.cca-cuota-boni-badge {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    gap: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #16a34a;
    padding: 3px 6px;
    border-radius: 5px;
    white-space: nowrap;
    line-height: 1.4;
    order: -1;
    box-sizing: border-box;
}
.cca-cuota-boni-pct {
    background: rgba(0,0,0,.18);
    border-radius: 10px;
    padding: 1px 5px;
    font-size: 9px;
    font-weight: 800;
}

/* Mobile: label izq / badge + valores der */
@media (max-width: 600px) {
    .cca-cuota-boni {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 6px 0 !important;
    }
    .cca-cuota-boni .cca-cuota-values {
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
    }
    .cca-cuota-boni .cca-cuota-boni-badge {
        order: 0 !important;
        flex: 0 0 auto !important;
        margin: 0 4px 0 auto !important;
        font-size: 9px !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .cca-cuota-orig { font-size: 13px !important; }
    .cca-cuota-zero { font-size: 15px !important; }
}

/* ── Responsive: tarjeta en móvil ────────────────────────────── */
@media (max-width: 600px) {
    .cca-pl-header { display: none; }

    /* Contenedor: card con sombra */
    .cca-plans-list {
        border-radius: 16px;
        box-shadow: 0 2px 16px rgba(0,0,0,.10);
        border-color: #e5e7eb;
    }

    /* Fila: área header del card */
    .cca-pl-row {
        flex-wrap: wrap;
        padding: 16px 16px 0;
        gap: 0;
        align-items: center !important;
        border-bottom: none;
    }
    /* Línea divisora entre rows en listas */
    .cca-pl-row + .cca-pl-row {
        border-top: 1px solid #f0f0f0;
    }
    /* Activo: fondo cálido sutil, sin barra lateral */
    .cca-pl-row.cca-pl-active {
        background: #fffbf5;
        box-shadow: none;
    }

    /* Vehículo: ocupa todo el ancho menos el badge */
    .cca-pl-col-model {
        flex: 1 1 auto !important;
        max-width: calc(100% - 110px);
        border-right: none !important;
        padding: 0 10px 0 0 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px;
    }
    .cca-pl-col-plan {
        flex: 0 0 auto !important;
        border-right: none !important;
        padding: 0 !important;
        align-self: center !important;
        padding-top: 0 !important;
    }

    /* Bloque de datos: panel diferenciado */
    .cca-pl-data-row {
        display: flex !important;
        flex-direction: column !important;
        flex: 0 0 100%;
        gap: 0;
        background: #f8f9fa;
        border-radius: 10px;
        margin: 12px 0 0;
        padding: 10px 14px;
        border-top: none;
    }

    /* Cada dato: label izquierda — valor derecha */
    .cca-pl-col {
        display: flex !important;
        flex-direction: row !important;
        flex: none !important;
        border-right: none !important;
        padding: 6px 0 !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px;
        border-bottom: 1px solid #eef0f2;
    }
    .cca-pl-col:last-child { border-bottom: none; }
    .cca-pl-col::before {
        content: attr(data-label);
        font-size: 12px;
        font-weight: 600;
        color: #6b7280;
        white-space: nowrap;
        flex-shrink: 0;
        text-transform: none;
        letter-spacing: 0;
    }
    .cca-pl-col.cca-pl-num,
    .cca-pl-col.cca-pl-center,
    .cca-pl-col.cca-pl-plazo {
        justify-content: space-between !important;
    }
    .cca-pl-plazo { flex: none !important; min-width: 0; }

    /* Acción: área inferior separada del panel de datos */
    .cca-pl-col-action {
        flex: 0 0 100% !important;
        border-right: none !important;
        padding: 12px 0 16px !important;
        margin-left: 0;
        align-self: stretch;
        justify-content: flex-end !important;
    }

    /* Fotos en modo thumb */
    .cca-pl-has-photo       { flex-direction: row !important; gap: 10px; align-items: center !important; }
    .cca-pl-has-photo-top   { flex-direction: row !important; align-items: center !important; }
    .cca-pl-thumb,
    .cca-pl-thumb-top       { width: 52px !important; height: 36px !important; margin-bottom: 0 !important; }

    /* Tipografía */
    .cca-pl-brand                { font-size: 10px; }
    .cca-pl-name                 { font-size: 16px; }
    .cca-pl-row .cca-pl-cuota    { font-size: 15px; }
    .cca-pl-row .cca-pl-valor    { font-size: 13px; }
    .cca-pl-row .cca-pl-plazo    { font-size: 15px; }
    .cca-pl-select-btn           { font-size: 13px !important; padding: 9px 18px !important; width: 100% !important; text-align: center !important; }
    .cca-pl-selected-badge       { font-size: 12px; padding: 8px 14px; border-radius: 10px; width: 100% !important; text-align: center !important; box-sizing: border-box !important; }
}

/* ── DNI upload slots ─────────────────────────────────────────── */
.cca-dni-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 8px;
}
.cca-dni-slot {
    border: 1.5px solid var(--cca-border);
    border-radius: var(--cca-radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--cca-bg);
}
.cca-dni-slot-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--cca-muted);
}
.cca-dni-slot-preview {
    aspect-ratio: 3/2;
    border: 1.5px dashed var(--cca-border);
    border-radius: 8px;
    background: var(--cca-white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.cca-dni-slot-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
/* cca-slot-remove styled in unified block below */
.cca-slot-spinner { font-size: 20px; }
.cca-upload-btns  { display: flex; gap: 6px; }
.cca-upload-opt-btn { flex: 1; font-size: 12px !important; padding: 8px 6px !important; }
.cca-file-hidden-abs {
    position: fixed; top: -9999px; left: -9999px;
    opacity: 0; width: 1px; height: 1px;
}

/* ── Tarjetas de plan (selección libre) ───────────────────────── */
.cca-free-plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.cca-mini-plan-no-img {
    height: 90px;
    background: #f3f4f6;
}

/* ── Upload area (legado, oculto en nueva UI) ─────────────────── */
.cca-upload-area {
    border: 2px dashed var(--cca-border);
    border-radius: var(--cca-radius);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--cca-transition);
    position: relative;
    background: var(--cca-bg);
}
/* Botones explícitos de upload (mobile-first) */
.cca-upload-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.cca-upload-opt-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1.5px solid var(--cca-accent) !important;
    border-radius: calc(var(--cca-radius) * .65) !important;
    background: rgba(232,137,10,.06) !important;
    color: var(--cca-accent) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all var(--cca-transition);
}
.cca-upload-opt-btn:hover,
.cca-upload-opt-btn:active {
    background: var(--cca-accent) !important;
    color: #fff !important;
}

.cca-upload-area:hover,
.cca-upload-area.drag-over {
    border-color: var(--cca-accent);
    background: rgba(232,137,10,.04);
}
.cca-upload-icon { color: var(--cca-muted); margin-bottom: 8px; }
.cca-upload-text { margin: 0 0 4px; font-size: 14px; color: var(--cca-text); }
.cca-upload-hint { margin: 0; font-size: 12px; color: var(--cca-muted); }
.cca-file-hidden {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
#cca-file-camera {
    position: fixed; top: -9999px; left: -9999px; opacity: 0; width: 1px; height: 1px;
}
.cca-file-previews { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cca-file-preview {
    position: relative;
    width: 80px; height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--cca-border);
}
.cca-file-preview img { width: 100%; height: 100%; object-fit: cover; }
.cca-file-preview .cca-remove-file {
    position: absolute; top: 2px; right: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0,0,0,.7); color: #fff;
    border: none; cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.cca-slot-remove {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    width: 26px !important;
    height: 26px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    transition: transform 0.2s ease !important;
    z-index: 5 !important;
    padding: 0 !important;
}
.cca-slot-remove:hover {
    background: transparent !important;
    transform: scale(1.12) !important;
}
.cca-slot-remove svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    stroke: #ef4444 !important;
    /* Soft black contour to ensure readability over any uploaded image */
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.95)) drop-shadow(0 0 1px rgba(0,0,0,0.95)) drop-shadow(0px 1px 2px rgba(0,0,0,0.7)) !important;
    transition: stroke 0.2s ease !important;
}
.cca-slot-remove:hover svg {
    stroke: #ff4d4d !important;
}
.cca-slot-remove .trash-lid {
    transform-origin: 18px 7px !important;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}
.cca-slot-remove:hover .trash-lid {
    transform: rotate(-30deg) translateY(-2px) translateX(-1px) !important;
}

/* ── Resumen (último paso) ────────────────────────────────────── */
.cca-resumen-intro { font-size: 14px; color: var(--cca-muted); margin: 0 0 20px; }
.cca-resumen-content {
    background: var(--cca-bg);
    border-radius: var(--cca-radius);
    overflow: hidden;
    border: 1.5px solid var(--cca-border);
    margin-bottom: 20px;
}
.cca-resumen-section { border-bottom: 1px solid var(--cca-border); }
.cca-resumen-section:last-child { border-bottom: none; }
.cca-resumen-section-title {
    padding: 9px 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cca-muted);
    background: #f3f4f6;
}
.cca-resumen-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
    gap: 12px;
}
.cca-resumen-row:last-child { border-bottom: none; }
.cca-resumen-key { color: var(--cca-muted); flex-shrink: 0; min-width: 120px; }
.cca-resumen-val { color: var(--cca-text); font-weight: 600; text-align: right; }
.cca-resumen-plan-header {
    background: var(--cca-primary);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.cca-resumen-plan-name { font-size: 16px; font-weight: 800; }
.cca-resumen-plan-badge {
    background: var(--cca-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    flex-shrink: 0;
}

.cca-recaptcha { margin: 16px 0; }
.cca-terms {
    font-size: 12px;
    color: var(--cca-muted);
    margin: 0;
    line-height: 1.6;
    padding: 12px 0;
}

/* ── Navigation buttons ───────────────────────────────────────── */
.cca-nav {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    background: var(--cca-white);
    border-top: 1px solid var(--cca-border);
    border-radius: 0 0 var(--cca-radius) var(--cca-radius);
    position: sticky;
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.07);
    z-index: 10;
}

/* Base button — reset all theme overrides.
   NOTA: display NO lleva !important para que style="display:none" del JS funcione */
.cca-wrapper .cca-btn {
    display: inline-flex;
    align-items: center !important;
    gap: 8px !important;
    padding: 14px 22px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background var(--cca-transition), box-shadow var(--cca-transition), transform var(--cca-transition) !important;
    text-decoration: none !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    letter-spacing: -.1px !important;
    outline: none !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    vertical-align: middle !important;
}

/* Anterior — ghost gray */
.cca-wrapper .cca-btn-prev {
    background: #f4f4f5 !important;
    color: #374151 !important;
    border: 1.5px solid #d1d5db !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
}
.cca-wrapper .cca-btn-prev:hover {
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}

/* Siguiente / Confirmar — naranja sólido */
.cca-wrapper .cca-btn-next,
.cca-wrapper .cca-btn-submit {
    flex: 1 !important;
    justify-content: center !important;
    background: #E8890A !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(232,137,10,.28) !important;
}
.cca-wrapper .cca-btn-next:hover,
.cca-wrapper .cca-btn-submit:hover {
    background: #d17d09 !important;
    box-shadow: 0 6px 18px rgba(232,137,10,.38) !important;
    transform: translateY(-1px) !important;
}
.cca-wrapper .cca-btn:disabled {
    opacity: .5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ── Status message ───────────────────────────────────────────── */
.cca-status-msg {
    padding: 14px 24px;
    border-radius: var(--cca-radius);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin: 8px 0;
}
.cca-status-msg.success { background: rgba(39,174,96,.1);  color: #15803d; }
.cca-status-msg.error   { background: rgba(239,68,68,.1);  color: #b91c1c; }
.cca-status-msg.loading { background: rgba(232,137,10,.08);color: #E8890A; }

/* ── Cónyuge condicional ──────────────────────────────────────── */
.cca-spouse-field .cca-fields-grid { margin-top: 0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    .cca-step-body        { padding: 16px; }
    .cca-step-header      { padding: 20px 16px 0; }
    .cca-step-title       { font-size: 18px; }
    .cca-fields-grid      { grid-template-columns: 1fr; }
    .cca-full             { grid-column: 1; }
    .cca-plan-img         { height: 190px; }
    .cca-plan-modelo      { font-size: 19px; }
    .cca-plan-grid        { grid-template-columns: 1fr; }
    .cca-other-plans-grid  { grid-template-columns: 1fr; }
    .cca-nav              { padding: 12px 16px; }
    .cca-wrapper .cca-btn { padding: 13px 14px !important; font-size: 14px !important; display: inline-flex; }
    .cca-header           { padding: 12px 16px; gap: 12px; }
    .cca-header-title     { font-size: 15px; }

    /* En móvil: ocultar labels, dots rellenan el ancho completo */
    .cca-dot-label                      { display: none !important; }
    .cca-dot-num                        { width: 26px; height: 26px; font-size: 11px; }
    .cca-steps-nav                      { justify-content: space-between; padding: 10px 12px; }
    .cca-step-dot                       { flex: 1; min-width: 30px; }
    .cca-step-dot::before               { top: 13px; }
    .cca-resumen-key                    { min-width: 100px; }
}

@media (max-width: 360px) {
    .cca-steps-nav  { padding: 10px 6px; }
    .cca-wrapper .cca-btn { font-size: 13px !important; padding: 12px 10px !important; }
}

/* ── Modal de Consentimiento ──────────────────────────────────── */
.cca-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 10, 20, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: ccaOverlayIn .25s ease;
}
@keyframes ccaOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cca-consent-box {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,.28), 0 4px 16px rgba(0,0,0,.12);
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ccaBoxIn .3s cubic-bezier(.34,1.38,.64,1);
}
@keyframes ccaBoxIn {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.cca-consent-header {
    padding: 28px 28px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.cca-consent-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cca-accent), color-mix(in srgb, var(--cca-accent) 70%, #000));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.cca-consent-icon-emoji {
    font-size: 26px;
    line-height: 1;
}

.cca-consent-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
    padding-top: 6px;
}

.cca-consent-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
    color: #374151;
    font-size: 14.5px;
    line-height: 1.75;
    -webkit-overflow-scrolling: touch;
}
.cca-consent-body p   { margin: 0 0 12px; }
.cca-consent-body p:last-child { margin-bottom: 0; }
.cca-consent-body ul,
.cca-consent-body ol  { padding-left: 20px; margin: 0 0 12px; }
.cca-consent-body li  { margin-bottom: 4px; }
.cca-consent-body strong { color: #111827; }

.cca-consent-footer {
    padding: 16px 28px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.cca-consent-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 13px 24px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all .2s ease !important;
    line-height: 1 !important;
    letter-spacing: .2px !important;
    text-decoration: none !important;
    outline: none !important;
}

.cca-consent-reject {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1.5px solid #d1d5db !important;
    box-shadow: none !important;
}
.cca-consent-reject:hover {
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}

.cca-consent-accept {
    background: var(--cca-btn-bg, #E8890A) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(232,137,10,.35) !important;
}
.cca-consent-accept:hover {
    background: #d17d09 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(232,137,10,.45) !important;
    transform: translateY(-1px) !important;
}
.cca-consent-accept:active {
    transform: translateY(0) !important;
    filter: brightness(.97) !important;
}

@media (max-width: 480px) {
    .cca-consent-box     { border-radius: 16px; max-height: 92vh; }
    .cca-consent-header  { padding: 20px 20px 16px; gap: 10px; }
    .cca-consent-title   { font-size: 17px; }
    .cca-consent-icon    { width: 40px; height: 40px; border-radius: 10px; }
    .cca-consent-body    { padding: 18px 20px; font-size: 14px; }
    .cca-consent-footer  { padding: 12px 20px 20px; flex-direction: column-reverse; }
    .cca-consent-btn     { width: 100%; justify-content: center; padding: 13px 20px; }
}
