/* ============================================================
   Comparador de Facturas IA v2.3 — Impronta Digital
   ============================================================ */

/* Spinners eliminados */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
input[type=number]{-moz-appearance:textfield}

*{box-sizing:border-box}
.cf-wrapper{max-width:860px;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;color:#1a1a1a;padding:0 1rem}

/* ── Tipo tabs ── */
.cf-tipo-selector{display:flex !important;gap:10px !important;margin-bottom:2rem !important;flex-wrap:wrap !important}
#comparador-facturas .cf-tipo-selector{display:flex !important;gap:10px !important;margin-bottom:2rem !important;flex-wrap:wrap !important}
.cf-tipo-btn,
#comparador-facturas .cf-tipo-btn{display:flex !important;align-items:center !important;justify-content:center !important;gap:9px !important;padding:12px 22px !important;border:2px solid #E3E3E3 !important;border-radius:50px !important;background:#ffffff !important;cursor:pointer !important;transition:all .2s !important;-webkit-appearance:none !important;appearance:none !important;flex:1 !important;min-height:unset !important;width:auto !important;text-align:center !important}
.cf-tipo-btn .cf-tipo-icon,
#comparador-facturas .cf-tipo-btn .cf-tipo-icon{font-size:20px !important;line-height:1 !important;display:block !important;flex-shrink:0 !important}
.cf-tipo-btn .cf-tipo-label,
#comparador-facturas .cf-tipo-btn .cf-tipo-label{font-size:14px !important;font-weight:600 !important;color:#666 !important;-webkit-text-fill-color:#666 !important;line-height:1 !important;white-space:nowrap !important;display:block !important}
.cf-tipo-btn:hover,
#comparador-facturas .cf-tipo-btn:hover{border-color:#4D615E !important;background:#f8fbfa !important}
.cf-tipo-btn:hover .cf-tipo-label,
#comparador-facturas .cf-tipo-btn:hover .cf-tipo-label{color:#4D615E !important;-webkit-text-fill-color:#4D615E !important}
.cf-tipo-btn.active,
#comparador-facturas .cf-tipo-btn.active{border-color:#EE8C1F !important;background:#EE8C1F !important;box-shadow:none !important}
.cf-tipo-btn.active .cf-tipo-label,
#comparador-facturas .cf-tipo-btn.active .cf-tipo-label{color:#ffffff !important;-webkit-text-fill-color:#ffffff !important}

/* ── Step bar ── */
.cf-step-bar,#comparador-facturas .cf-step-bar{display:flex !important;align-items:center !important;margin-bottom:10px !important;padding:0 2rem !important}
.cf-step-dot{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;flex-shrink:0;background:#E3E3E3;color:#aaa !important;-webkit-text-fill-color:#aaa !important;transition:all .2s}
.cf-step-dot--active{background:#EE8C1F !important;color:#fff !important;-webkit-text-fill-color:#fff !important}
.cf-step-dot--done{background:#4D615E !important;color:#fff !important;-webkit-text-fill-color:#fff !important}
.cf-step-line{flex:1;height:2px;background:#E3E3E3;margin:0 6px}
.cf-step-line--done{background:#4D615E}
/* Labels alineados con dots */
.cf-step-labels,#comparador-facturas .cf-step-labels{display:flex !important;align-items:flex-start !important;margin-bottom:2rem !important;padding:0 2rem !important}
.cf-step-label{display:flex;flex-direction:column;align-items:center;width:38px;flex-shrink:0}
.cf-step-label span{font-size:11px;text-align:center;color:#bbb !important;-webkit-text-fill-color:#bbb !important;line-height:1.3;margin-top:3px;white-space:nowrap}
.cf-step-label span.active{color:#EE8C1F !important;-webkit-text-fill-color:#EE8C1F !important;font-weight:700}
.cf-step-label span.done{color:#4D615E !important;-webkit-text-fill-color:#4D615E !important;font-weight:600}
.cf-step-label-gap{flex:1}

/* ── Card ── */
.cf-card{background:#ffffff;border:1px solid #E0E0E0;border-radius:20px;padding:2.5rem;margin-bottom:1.5rem}
.cf-card-eyebrow{font-size:11px;font-weight:700;color:#EE8C1F !important;-webkit-text-fill-color:#EE8C1F !important;text-transform:uppercase;letter-spacing:.1em;margin-bottom:8px}
.cf-card-title,#comparador-facturas .cf-card-title,#comparador-facturas h2.cf-card-title{font-size:20px !important;font-weight:700 !important;color:#111 !important;-webkit-text-fill-color:#111 !important;line-height:1.2 !important;margin-bottom:8px !important}
.cf-card-sub,#comparador-facturas .cf-card-sub{font-size:15px !important;color:#888 !important;-webkit-text-fill-color:#888 !important;line-height:1.6 !important;margin-bottom:2.5rem !important}

/* ── Upload zone con animación IA ── */
.cf-upload-zone{border:2px dashed #C8C8C8;border-radius:16px;padding:3rem 2rem;text-align:center;cursor:pointer;background:#F8F8F6;position:relative;overflow:hidden;transition:all .2s}
.cf-upload-zone:hover{border-color:#4D615E;background:#f5f9f8}
.cf-upload-zone.cf-dragging{border-color:#EE8C1F;background:#fff8f0}
.cf-upload-zone.cf-uploaded{border-color:#4D615E;border-style:solid;background:#f0f4f3}
.cf-upload-icon-wrap{width:60px;height:60px;background:#4D615E;border-radius:16px;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;position:relative;z-index:3}
.cf-pulse-ring{position:absolute;width:60px;height:60px;border-radius:16px;background:#4D615E;top:50%;left:50%;transform:translate(-50%,-50%);animation:cfpulse 2s ease-out infinite;z-index:1}
@keyframes cfpulse{0%{transform:translate(-50%,-50%) scale(1);opacity:.35}100%{transform:translate(-50%,-50%) scale(1.8);opacity:0}}
.cf-scan-line{position:absolute;left:8%;right:8%;height:1.5px;background:linear-gradient(90deg,transparent,#EE8C1F 40%,#EE8C1F 60%,transparent);animation:cfscan 3.5s ease-in-out infinite;z-index:1;pointer-events:none}
@keyframes cfscan{0%{top:15%;opacity:0}10%{opacity:.7}90%{opacity:.4}100%{top:85%;opacity:0}}
.cf-corner-dot{position:absolute;width:5px;height:5px;border-radius:50%;background:#4D615E;animation:cfblink 2s ease-in-out infinite;pointer-events:none;z-index:1}
@keyframes cfblink{0%,100%{opacity:.15}50%{opacity:.6}}
.cf-particle{position:absolute;pointer-events:none;z-index:1;opacity:0;animation:cfloat var(--dur) ease-in infinite;animation-delay:var(--delay)}
@keyframes cfloat{0%{opacity:0;transform:translateY(0) scale(.6)}15%{opacity:.55}80%{opacity:.25}100%{opacity:0;transform:translateY(-80px) scale(1) rotate(var(--rot))}}
.cf-ia-dot{width:6px;height:6px;border-radius:50%;background:#4D615E;display:inline-block;margin-right:5px;vertical-align:middle;animation:cfiaglow 1.5s ease-in-out infinite}
@keyframes cfiaglow{0%,100%{opacity:.3}50%{opacity:1}}
.cf-upload-title{font-size:17px;font-weight:700;color:#111 !important;-webkit-text-fill-color:#111 !important;margin-bottom:8px;position:relative;z-index:2}
.cf-upload-sub{font-size:14px;color:#777 !important;-webkit-text-fill-color:#777 !important;margin-bottom:12px;line-height:1.5;position:relative;z-index:2}
.cf-upload-hint{font-size:13px;color:#aaa !important;-webkit-text-fill-color:#aaa !important;position:relative;z-index:2}

/* ── Badges ── */
.cf-badge,#comparador-facturas .cf-badge{display:inline-block !important;font-size:11px !important;font-weight:600 !important;padding:3px 10px !important;border-radius:20px !important;width:auto !important;max-width:fit-content !important}
.cf-badge--green{background:#d4ede9;color:#2d5450 !important;-webkit-text-fill-color:#2d5450 !important}
.cf-badge--amber{background:#fff3e0;color:#7a3d00 !important;-webkit-text-fill-color:#7a3d00 !important}
.cf-badge--purple{background:#ede9fe;color:#4c1d95 !important;-webkit-text-fill-color:#4c1d95 !important}

/* ── File preview ── */
.cf-file-preview{display:flex;align-items:center;gap:12px;margin-top:12px;padding:12px;background:#f0f4f3;border-radius:10px;border:1px solid #c8d9d6}
.cf-file-icon{width:38px;height:38px;background:#4D615E;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff !important;-webkit-text-fill-color:#fff !important;flex-shrink:0}
.cf-file-info{display:flex;flex-direction:column;gap:2px;min-width:0}
.cf-file-name{font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px;color:#111 !important;-webkit-text-fill-color:#111 !important}
.cf-file-size{font-size:11px;color:#666 !important;-webkit-text-fill-color:#666 !important}
.cf-file-remove{margin-left:auto;background:none;border:none;cursor:pointer;font-size:18px;color:#999;padding:4px;flex-shrink:0}
.cf-file-remove:hover{color:#e53e3e}

/* ── Divider ── */
.cf-divider{display:flex;align-items:center;gap:12px;margin:2rem 0;color:#ccc !important;-webkit-text-fill-color:#ccc !important;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.cf-divider::before,.cf-divider::after{content:'';flex:1;height:1px;background:#EAEAEA}

/* ── Alt cards — icono izquierda, hover diferenciado, borde visible ── */
.cf-alt-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:2rem}
.cf-alt-card,
#comparador-facturas .cf-alt-card{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:8px !important;
  padding:1.25rem !important;
  border:2px solid #C8C8C8 !important;
  border-radius:14px !important;
  background:#ffffff !important;
  cursor:pointer !important;
  transition:all .2s !important;
  text-align:left !important;
  -webkit-appearance:none !important;
  appearance:none !important;
}










.cf-alt-ico{font-size:26px;line-height:1}
.cf-alt-top,#comparador-facturas .cf-alt-top{display:flex !important;flex-direction:column !important;gap:5px !important}
.cf-alt-title{font-size:14px;font-weight:700;color:#111 !important;-webkit-text-fill-color:#111 !important;transition:color .2s}
.cf-alt-desc{font-size:13px;color:#888 !important;-webkit-text-fill-color:#888 !important;transition:color .2s;line-height:1.5}

/* ── Botones con !important para anular WP dark mode ── */
.cf-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:none !important;outline:none !important;cursor:pointer;border-radius:12px;font-family:inherit !important;font-weight:700 !important;font-size:15px !important;line-height:1.2 !important;white-space:nowrap;-webkit-appearance:none;appearance:none;transition:background-color .15s,transform .15s,box-shadow .15s;padding:14px 24px;text-decoration:none !important}
.cf-btn-primary{background-color:#EE8C1F !important;color:#ffffff !important;-webkit-text-fill-color:#ffffff !important}
.cf-btn-primary:hover{background-color:#D97D18 !important;transform:translateY(-2px);box-shadow:0 6px 18px rgba(238,140,31,.35)}
.cf-btn-primary:active{background-color:#C4711A !important;transform:translateY(0);box-shadow:none}
.cf-btn-verde{background-color:#4D615E !important;color:#ffffff !important;-webkit-text-fill-color:#ffffff !important}
.cf-btn-verde:hover{background-color:#3D4F4C !important;transform:translateY(-2px);box-shadow:0 6px 18px rgba(77,97,94,.3)}
.cf-btn-verde:active{background-color:#2E3B39 !important;transform:translateY(0);box-shadow:none}
.cf-btn-back{background-color:#EBF2F1 !important;color:#4D615E !important;-webkit-text-fill-color:#4D615E !important;border:2px solid #4D615E !important;padding:12px 20px}
.cf-btn-back:hover{background-color:#D6E8E5 !important}
.cf-btn-full{width:100%;font-size:16px !important;padding:15px 24px}
.cf-btn:disabled,.cf-btn[disabled]{opacity:.35 !important;cursor:not-allowed !important;transform:none !important;box-shadow:none !important;pointer-events:none}
.cf-btns-row{display:flex;gap:12px;margin-top:2rem}

/* ── Inputs — sin solapamiento, centrado vertical, fondo blanco forzado ── */
.cf-field{margin-bottom:1.25rem}
.cf-field-label{font-size:11px;font-weight:700;color:#4D615E !important;-webkit-text-fill-color:#4D615E !important;text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px;display:block}
.cf-inp-group{display:flex;align-items:center;height:50px;border:2px solid #DCDCDC;border-radius:12px;background:#ffffff !important;overflow:hidden;transition:border-color .2s}
.cf-inp-group:focus-within{border-color:#4D615E;box-shadow:0 0 0 3px rgba(77,97,94,.12)}
.cf-inp-icon{display:flex;align-items:center;justify-content:center;width:44px;height:100%;background:#F5F8F7 !important;border-right:1px solid #E8E8E8;flex-shrink:0;color:#4D615E;opacity:.65}
.cf-inp-icon svg{width:16px;height:16px;flex-shrink:0}
.cf-inp-clean{flex:1;height:100%;border:none !important;outline:none !important;box-shadow:none !important;padding:0 12px;font-size:15px;color:#111111 !important;-webkit-text-fill-color:#111111 !important;background:transparent !important;font-family:inherit;-webkit-appearance:none;appearance:none;min-width:0;line-height:50px}
.cf-inp-clean:focus{outline:none !important;box-shadow:none !important}
.cf-inp-unit{display:flex;align-items:center;justify-content:center;padding:0 13px;height:100%;font-size:13px;font-weight:700;color:#999 !important;-webkit-text-fill-color:#999 !important;flex-shrink:0;border-left:1px solid #E8E8E8;background:#F5F8F7 !important;white-space:nowrap}
/* Select wrapper */
.cf-sel-wrap{position:relative;flex:1;height:100%;display:flex;align-items:center}
.cf-sel-clean{width:100%;height:100%;border:none !important;outline:none !important;box-shadow:none !important;padding:0 36px 0 12px;font-size:15px;color:#111111 !important;-webkit-text-fill-color:#111111 !important;background:#ffffff !important;font-family:inherit;-webkit-appearance:none !important;appearance:none !important;cursor:pointer}
.cf-sel-clean:focus{outline:none !important;box-shadow:none !important}
.cf-sel-arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:#bbb;display:flex;align-items:center}
/* Input solo sin icono */
.cf-inp-solo{display:block;width:100%;height:50px;border:2px solid #DCDCDC !important;border-radius:12px;outline:none !important;box-shadow:none !important;padding:0 14px;font-size:15px;color:#111111 !important;-webkit-text-fill-color:#111111 !important;background:#ffffff !important;font-family:inherit;-webkit-appearance:none;appearance:none;transition:border-color .2s;line-height:50px}
.cf-inp-solo:focus{border-color:#4D615E !important;box-shadow:none !important;outline:none !important}
textarea.cf-inp-solo{height:100px;resize:vertical;line-height:1.6;padding:14px}

/* ── Grid layouts ── */
.cf-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.cf-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}

/* ── Info hint ── */
.cf-hint{background:#f0f4f3;border-left:3px solid #4D615E;border-radius:0 10px 10px 0;padding:12px 16px;font-size:13px;color:#3d5552 !important;-webkit-text-fill-color:#3d5552 !important;margin-bottom:1.75rem;display:flex;align-items:center;gap:10px;line-height:1.5}

/* ── Section blocks (Luz y Gas) ── */
.cf-section-block{background:#FAFAF8;border:1px solid #EAEAEA;border-radius:14px;padding:1.5rem;margin-bottom:1.25rem}
.cf-section-block-title{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;color:#4D615E !important;-webkit-text-fill-color:#4D615E !important;text-transform:uppercase;letter-spacing:.07em;margin-bottom:1.25rem}

/* ── Loading ── */
.cf-loading{display:flex;flex-direction:column;align-items:center;padding:3rem;gap:14px;color:#666 !important;-webkit-text-fill-color:#666 !important;font-size:15px}
.cf-spinner{width:40px;height:40px;border:3px solid #E3E3E3;border-top-color:#4D615E;border-radius:50%;animation:cfspin .7s linear infinite}
@keyframes cfspin{to{transform:rotate(360deg)}}

/* ── Datos extraídos ── */
.cf-datos-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:#E3E3E3;border-radius:12px;overflow:hidden;margin-bottom:1.5rem}
.cf-dato-item{background:#fff;padding:11px 14px}
.cf-dato-item:nth-child(odd){background:#FAFAFA}
.cf-dato-label{font-size:10px;color:#999 !important;-webkit-text-fill-color:#999 !important;text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}
.cf-dato-value{font-size:14px;font-weight:600;color:#111 !important;-webkit-text-fill-color:#111 !important}

/* ── Ahorro banner ── */
.cf-ahorro-banner{background:#fff8f0;border:2px solid #EE8C1F;border-radius:14px;padding:1.25rem 1.5rem;margin-bottom:1.5rem;display:flex;align-items:center;gap:16px;flex-wrap:wrap}

/* ── Tarifa seleccionada — moderna ── */
.cf-tarifa-sel{background:#ffffff;border:2px solid #4D615E;border-radius:14px;padding:1rem 1.5rem;margin-bottom:1.5rem;display:flex;justify-content:space-between;align-items:center;gap:12px;position:relative;overflow:hidden}
.cf-tarifa-sel::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:#4D615E;border-radius:14px 14px 0 0}
.cf-tarifa-pill{display:inline-flex;align-items:center;gap:6px;background:#f0f4f3;border-radius:8px;padding:5px 10px;margin-bottom:5px}

/* ── Tarifa cards ── */
.cf-tarifa-card{background:#ffffff;border:2px solid #E3E3E3;border-radius:16px;padding:1.5rem;margin-bottom:14px;position:relative;transition:all .2s}
.cf-tarifa-card:hover{border-color:#4D615E}
.cf-tarifa-best{border-color:#4D615E}
.cf-tarifa-best-badge{position:absolute;top:-12px;left:50%;transform:translateX(-50%);background:#4D615E;color:#fff !important;-webkit-text-fill-color:#fff !important;font-size:11px;font-weight:700;padding:4px 18px;border-radius:20px;white-space:nowrap}
.cf-tarifa-top{display:flex;align-items:center;gap:14px;margin-bottom:12px}
/* Botón contratar — naranja con !important */
.cf-contratar-btn{width:100%;padding:13px;background:#EE8C1F !important;color:#ffffff !important;-webkit-text-fill-color:#ffffff !important;border:none !important;border-radius:10px;font-size:14px !important;font-weight:700 !important;cursor:pointer;transition:all .15s;-webkit-appearance:none;appearance:none}
.cf-contratar-btn:hover{background:#D97D18 !important;transform:translateY(-1px)}
.cf-contratar-btn.cf-btn-verde-contratar{background:#4D615E !important}
.cf-contratar-btn.cf-btn-verde-contratar:hover{background:#3D4F4C !important}

/* ── Barras comparación — ambas llenas ── */
.cf-pbar{margin-bottom:14px}
.cf-prow{display:flex;justify-content:space-between;font-size:12px;color:#999 !important;-webkit-text-fill-color:#999 !important;margin-bottom:4px;align-items:center}
.cf-prow strong{font-weight:700;font-size:13px;color:#555 !important;-webkit-text-fill-color:#555 !important}
.cf-prow strong.cf-orange{color:#EE8C1F !important;-webkit-text-fill-color:#EE8C1F !important}
.cf-ptrack{height:10px;background:#EAEAEA;border-radius:6px;overflow:hidden}
.cf-pfill-actual{height:100%;width:100%;background:#C8C8C8;border-radius:6px}
.cf-pfill-nueva{height:100%;border-radius:6px;background:#EE8C1F}
.cf-pbar-labels{display:flex;justify-content:space-between;font-size:11px;color:#ccc !important;-webkit-text-fill-color:#ccc !important;margin-top:3px}

/* ── Tags ── */
.cf-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.cf-tag{font-size:11px;padding:3px 10px;border-radius:6px;border:1px solid #E3E3E3;color:#555 !important;-webkit-text-fill-color:#555 !important}

/* ── Contratación bar ── */
.cf-contrat-bar,#comparador-facturas .cf-contrat-bar{display:flex !important;align-items:center !important;margin-bottom:10px !important;padding:0 2rem !important}
.cf-contrat-step{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex-shrink:0;background:#E3E3E3;color:#aaa !important;-webkit-text-fill-color:#aaa !important;transition:all .2s}
.cf-contrat-step.active{background:#EE8C1F;color:#fff !important;-webkit-text-fill-color:#fff !important}
.cf-contrat-step.done{background:#4D615E;color:#fff !important;-webkit-text-fill-color:#fff !important}
.cf-contrat-line{flex:1;height:2px;background:#E3E3E3;transition:background .3s;margin:0 6px}
/* Contrat labels */
.cf-contrat-labels-wrap,#comparador-facturas .cf-contrat-labels-wrap{display:flex !important;align-items:flex-start !important;margin-bottom:2rem !important;padding:0 2rem !important}
.cf-contrat-label{display:flex;flex-direction:column;align-items:center;width:36px;flex-shrink:0}
.cf-contrat-label span{font-size:10px;text-align:center;color:#aaa !important;-webkit-text-fill-color:#aaa !important;line-height:1.3;margin-top:3px;white-space:nowrap}
.cf-contrat-label span.active{color:#EE8C1F !important;-webkit-text-fill-color:#EE8C1F !important;font-weight:700}
.cf-contrat-label span.done{color:#4D615E !important;-webkit-text-fill-color:#4D615E !important;font-weight:600}
.cf-contrat-label-gap{flex:1}
.cf-contrat-panel{display:none}

/* ── Doc zones ── */
.cf-doc-zone{border:2px dashed #ccc;border-radius:10px;padding:1.25rem;text-align:center;position:relative;background:#FAFAFA;transition:all .15s;cursor:pointer;margin-top:6px}
.cf-doc-zone:hover{border-color:#4D615E;background:#f5f9f8}
.cf-doc-zone input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.cf-doc-zone label{font-size:13px;color:#555 !important;-webkit-text-fill-color:#555 !important;cursor:pointer;pointer-events:none;display:block;line-height:1.6}
.cf-doc-preview{font-size:13px;margin-top:6px;font-weight:600;color:#999 !important;-webkit-text-fill-color:#999 !important}

/* ── Legal ── */
.cf-legal{display:flex;flex-direction:column;gap:12px;margin-bottom:1.5rem}
.cf-legal-item{display:flex;align-items:flex-start;gap:10px;font-size:13px;color:#555 !important;-webkit-text-fill-color:#555 !important;cursor:pointer;line-height:1.6}
.cf-legal-item input[type=checkbox]{margin-top:3px;flex-shrink:0;accent-color:#4D615E;width:16px;height:16px}
.cf-legal-item a{color:#4D615E !important;-webkit-text-fill-color:#4D615E !important;font-weight:600}

/* ── Confirm rows ── */
.cf-confirm-section{margin-bottom:1.25rem}
.cf-confirm-section h3{font-size:11px;font-weight:700;color:#4D615E !important;-webkit-text-fill-color:#4D615E !important;text-transform:uppercase;letter-spacing:.06em;margin-bottom:10px}
.cf-confirm-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #EAEAEA;font-size:14px}
.cf-confirm-row:last-child{border:none}
.cf-confirm-row span:first-child{color:#888 !important;-webkit-text-fill-color:#888 !important}
.cf-confirm-row span:last-child{font-weight:700;color:#111 !important;-webkit-text-fill-color:#111 !important}

/* ── Responsive ── */
@media(max-width:540px){
  .cf-tipo-selector{gap:8px}
  .cf-tipo-btn{padding:14px 6px;min-height:70px}
  .cf-tipo-btn .cf-tipo-icon{font-size:20px}
  .cf-card{padding:1.5rem}
  .cf-card-title{font-size:22px}
  .cf-alt-grid,.cf-grid2,.cf-grid3{grid-template-columns:1fr}
  .cf-datos-grid{grid-template-columns:1fr}
  .cf-ahorro-banner{flex-direction:column;gap:8px}
  .cf-btns-row{flex-direction:column}
  .cf-btn-back{width:100%}
}

/* ══ FIXES TEMA WORDPRESS ══
   El tema limita el ancho del contenido. Estos estilos lo corrigen
   usando el wrapper del plugin para escapar las restricciones del tema.
*/

/* Resetear estilos del tema que afectan al plugin */
#comparador-facturas,
#comparador-facturas *{
  box-sizing:border-box !important;
}

/* El wrapper sale del flujo del tema y ocupa ancho completo disponible */
#comparador-facturas.cf-wrapper{
  max-width:100% !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  /* Escapar el max-width del tema usando margin negativo */
  position:relative;
}

/* Contenedor interno con el ancho real deseado */
#comparador-facturas .cf-inner{
  max-width:960px;
  margin:0 auto;
  padding:1.5rem 2rem;
}

/* Anular estilos de párrafos/headings del tema dentro del plugin */
#comparador-facturas p,
#comparador-facturas h1,
#comparador-facturas h2,
#comparador-facturas h3,
#comparador-facturas h4{
  margin:0 !important;
  padding:0 !important;
}

/* Anular max-width de imágenes del tema */
#comparador-facturas img{
  max-width:none !important;
}

/* Anular estilos de botones del tema */
#comparador-facturas button,
#comparador-facturas input[type="button"],
#comparador-facturas input[type="submit"]{
  border-radius:12px !important;
  text-transform:none !important;
  letter-spacing:normal !important;
  box-shadow:none !important;
}

/* Anular estilos de inputs del tema */
#comparador-facturas input,
#comparador-facturas select,
#comparador-facturas textarea{
  border-radius:12px !important;
  font-size:15px !important;
  line-height:normal !important;
  margin:0 !important;
}

/* Anular colores de links del tema */
#comparador-facturas a{
  text-decoration:none !important;
}

/* Alt cards — anular herencia del tema en badges */
#comparador-facturas .cf-badge--amber{
  background:#fff3e0 !important;
  color:#7a3d00 !important;
  -webkit-text-fill-color:#7a3d00 !important;
  padding:3px 10px !important;
  border-radius:20px !important;
  font-size:11px !important;
  display:inline-block !important;
  width:auto !important;
  text-align:center !important;
}

#comparador-facturas .cf-badge--purple{
  background:#ede9fe !important;
  color:#4c1d95 !important;
  -webkit-text-fill-color:#4c1d95 !important;
  padding:3px 10px !important;
  border-radius:20px !important;
  font-size:11px !important;
  display:inline-block !important;
  width:auto !important;
  text-align:center !important;
}

/* Tarifa cards — botón contratar ancho automático no 100% forzado por tema */
#comparador-facturas .cf-contratar-btn{
  width:auto !important;
  min-width:200px !important;
  display:block !important;
}


/* Badge dentro de alt-card — siempre alineado izquierda, ancho automático */
#comparador-facturas .cf-alt-card .cf-badge,
#comparador-facturas .cf-alt-top .cf-badge{
  display:inline-block !important;
  width:auto !important;
  max-width:fit-content !important;
  text-align:center !important;
  float:none !important;
  margin:0 !important;
  padding:3px 10px !important;
  border-radius:20px !important;
  font-size:11px !important;
  font-weight:600 !important;
}
#comparador-facturas .cf-alt-card .cf-badge--amber{
  background:#fff3e0 !important;
  color:#7a3d00 !important;
  -webkit-text-fill-color:#7a3d00 !important;
}
#comparador-facturas .cf-alt-card .cf-badge--purple{
  background:#ede9fe !important;
  color:#4c1d95 !important;
  -webkit-text-fill-color:#4c1d95 !important;
}

#comparador-facturas .cf-alt-card.cf-alt-est:hover,
#comparador-facturas .cf-alt-card.cf-alt-est:hover *{
  border-color:#4D615E !important;
  background-color:#4D615E !important;
}
#comparador-facturas .cf-alt-card.cf-alt-est:hover .cf-alt-title,
#comparador-facturas .cf-alt-card.cf-alt-est:hover .cf-alt-desc{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  background-color:transparent !important;
}
#comparador-facturas .cf-alt-card.cf-alt-est:hover .cf-badge{
  background:rgba(255,255,255,.25) !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

#comparador-facturas .cf-alt-card.cf-alt-man:hover,
#comparador-facturas .cf-alt-card.cf-alt-man:hover *{
  border-color:#EE8C1F !important;
  background-color:#EE8C1F !important;
}
#comparador-facturas .cf-alt-card.cf-alt-man:hover .cf-alt-title,
#comparador-facturas .cf-alt-card.cf-alt-man:hover .cf-alt-desc{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  background-color:transparent !important;
}
#comparador-facturas .cf-alt-card.cf-alt-man:hover .cf-badge{
  background:rgba(255,255,255,.25) !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Icono — no hereda el background del hover */
#comparador-facturas .cf-alt-card:hover .cf-alt-ico{
  background:transparent !important;
  background-color:transparent !important;
}

/* Estado seleccionado */
#comparador-facturas .cf-alt-card.cf-alt-est.cf-alt-sel{
  border-color:#4D615E !important;
  background:#f0f4f3 !important;
}
#comparador-facturas .cf-alt-card.cf-alt-man.cf-alt-sel{
  border-color:#EE8C1F !important;
  background:#fff8f0 !important;
}
#comparador-facturas .cf-alt-card.cf-alt-sel *{
  background-color:transparent !important;
}

/* ── Alt cards hover — solo fondo en el card, hijos heredan ── */
#comparador-facturas .cf-alt-card.cf-alt-est:hover{
  background:#4D615E !important;
  border-color:#4D615E !important;
}
#comparador-facturas .cf-alt-card.cf-alt-man:hover{
  background:#EE8C1F !important;
  border-color:#EE8C1F !important;
}

/* Textos en blanco al hacer hover */
#comparador-facturas .cf-alt-card.cf-alt-est:hover .cf-alt-title,
#comparador-facturas .cf-alt-card.cf-alt-man:hover .cf-alt-title{
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}
#comparador-facturas .cf-alt-card.cf-alt-est:hover .cf-alt-desc,
#comparador-facturas .cf-alt-card.cf-alt-man:hover .cf-alt-desc{
  color:rgba(255,255,255,.8) !important;
  -webkit-text-fill-color:rgba(255,255,255,.8) !important;
}

/* Badge en hover — fondo transparente blanco, texto blanco */
#comparador-facturas .cf-alt-card.cf-alt-est:hover .cf-badge,
#comparador-facturas .cf-alt-card.cf-alt-man:hover .cf-badge{
  background:rgba(255,255,255,.25) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

/* Icono — fondo transparente siempre, nunca hereda background del card */
#comparador-facturas .cf-alt-card .cf-alt-ico,
#comparador-facturas .cf-alt-card:hover .cf-alt-ico{
  background:transparent !important;
  background-color:transparent !important;
}

/* alt-top y alt-title — fondo transparente siempre */
#comparador-facturas .cf-alt-card .cf-alt-top,
#comparador-facturas .cf-alt-card:hover .cf-alt-top,
#comparador-facturas .cf-alt-card .cf-alt-title,
#comparador-facturas .cf-alt-card:hover .cf-alt-title,
#comparador-facturas .cf-alt-card .cf-alt-desc,
#comparador-facturas .cf-alt-card:hover .cf-alt-desc{
  background:transparent !important;
  background-color:transparent !important;
}

/* Estado seleccionado — borde de color, fondo muy suave, sin fondo sólido */
#comparador-facturas .cf-alt-card.cf-alt-est.cf-alt-sel{
  border-color:#4D615E !important;
  background:#f0f4f3 !important;
}
#comparador-facturas .cf-alt-card.cf-alt-man.cf-alt-sel{
  border-color:#EE8C1F !important;
  background:#fff8f0 !important;
}
/* Hover sobre seleccionado — mismo comportamiento */
#comparador-facturas .cf-alt-card.cf-alt-est.cf-alt-sel:hover{
  background:#4D615E !important;
}
#comparador-facturas .cf-alt-card.cf-alt-man.cf-alt-sel:hover{
  background:#EE8C1F !important;
}

/* ── Pantalla de análisis IA ── */
#comparador-facturas .cf-analyzing{
  border:2px solid #E0E0E0 !important;
  border-radius:16px !important;
  padding:2.5rem 2rem !important;
  background:#ffffff !important;
  position:relative !important;
  overflow:hidden !important;
  text-align:center !important;
}
#comparador-facturas .cf-progress-bar{
  position:absolute !important;
  top:0 !important;left:0 !important;right:0 !important;
  height:3px !important;
  background:#EAEAEA !important;
  border-radius:16px 16px 0 0 !important;
  overflow:hidden !important;
}
#comparador-facturas .cf-progress-fill{
  height:100% !important;
  background:linear-gradient(90deg,#4D615E,#EE8C1F) !important;
  border-radius:16px !important;
  animation:cfprog 2.5s ease-in-out infinite !important;
}
@keyframes cfprog{0%{width:0%;opacity:1}70%{width:85%;opacity:1}100%{width:95%;opacity:.7}}

#comparador-facturas .cf-analyzing-icon{
  width:66px !important;
  height:66px !important;
  background:#f0f4f3 !important;
  border-radius:18px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 auto 20px !important;
  position:relative !important;
}
#comparador-facturas .cf-icon-ring{
  position:absolute !important;
  inset:0 !important;
  border-radius:18px !important;
  border:2px solid #4D615E !important;
  opacity:0 !important;
  animation:cfring 2s ease-out infinite !important;
  pointer-events:none !important;
}
#comparador-facturas .cf-icon-ring:nth-child(2){animation-delay:.7s !important}
@keyframes cfring{0%{transform:scale(1);opacity:.4}100%{transform:scale(1.55);opacity:0}}

#comparador-facturas .cf-analyzing-title{
  font-size:17px !important;
  font-weight:700 !important;
  color:#111 !important;
  -webkit-text-fill-color:#111 !important;
  margin-bottom:5px !important;
}
#comparador-facturas .cf-analyzing-file{
  font-size:13px !important;
  color:#888 !important;
  -webkit-text-fill-color:#888 !important;
  margin-bottom:22px !important;
}
#comparador-facturas .cf-asteps{
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  max-width:300px !important;
  margin:0 auto 20px !important;
}
#comparador-facturas .cf-astep{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  font-size:13px !important;
  padding:8px 14px !important;
  border-radius:10px !important;
  text-align:left !important;
  transition:all .3s !important;
  background:transparent !important;
}
#comparador-facturas .cf-astep-icon{
  width:26px !important;
  height:26px !important;
  border-radius:50% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex-shrink:0 !important;
  font-size:12px !important;
  background:transparent !important;
}
#comparador-facturas .cf-astep.waiting{color:#ccc !important;-webkit-text-fill-color:#ccc !important}
#comparador-facturas .cf-astep.waiting .cf-astep-icon{background:#F0F0F0 !important;color:#ccc !important;-webkit-text-fill-color:#ccc !important}
#comparador-facturas .cf-astep.active{color:#111 !important;-webkit-text-fill-color:#111 !important;background:#f0f4f3 !important;font-weight:600 !important}
#comparador-facturas .cf-astep.active .cf-astep-icon{background:#4D615E !important;color:#fff !important;-webkit-text-fill-color:#fff !important}
#comparador-facturas .cf-astep.done{color:#4D615E !important;-webkit-text-fill-color:#4D615E !important}
#comparador-facturas .cf-astep.done .cf-astep-icon{background:#d4ede9 !important;color:#2d5450 !important;-webkit-text-fill-color:#2d5450 !important}

/* Puntos parpadeantes */
#comparador-facturas .cf-dots span{
  display:inline-block !important;
  width:4px !important;height:4px !important;
  border-radius:50% !important;
  background:#fff !important;
  margin:0 1px !important;
  animation:cfdot 1.2s ease-in-out infinite !important;
}
#comparador-facturas .cf-dots span:nth-child(2){animation-delay:.2s !important}
#comparador-facturas .cf-dots span:nth-child(3){animation-delay:.4s !important}
@keyframes cfdot{0%,80%,100%{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}

#comparador-facturas .cf-cancel-btn{
  font-size:12px !important;
  color:#bbb !important;
  -webkit-text-fill-color:#bbb !important;
  background:none !important;
  border:none !important;
  cursor:pointer !important;
  padding:4px 8px !important;
}
#comparador-facturas .cf-cancel-btn:hover{color:#888 !important;-webkit-text-fill-color:#888 !important}

/* ── Banner ahorro — responsive móvil ── */
@media(max-width:600px){
  #comparador-facturas .cf-ahorro-banner{
    flex-direction:column !important;
    align-items:center !important;
    text-align:center !important;
    gap:12px !important;
    padding:1.25rem !important;
  }
  #comparador-facturas .cf-ahorro-banner > div{
    margin-left:0 !important;
    text-align:center !important;
  }
  #comparador-facturas .cf-ahorro-banner > div:nth-child(2){
    display:none !important;
  }
}

/* ── Banner ahorro — clases para control responsive ── */
#comparador-facturas .cf-ahorro-label{
  font-size:11px !important;color:#7a4500 !important;
  -webkit-text-fill-color:#7a4500 !important;margin-bottom:2px !important;
}
#comparador-facturas .cf-ahorro-old{
  font-size:20px !important;font-weight:700 !important;
  color:#aaa !important;-webkit-text-fill-color:#aaa !important;
  text-decoration:line-through !important;
}
#comparador-facturas .cf-ahorro-arrow{
  font-size:22px !important;color:#ddd !important;
  -webkit-text-fill-color:#ddd !important;
}
#comparador-facturas .cf-ahorro-new{
  font-size:30px !important;font-weight:700 !important;
  color:#EE8C1F !important;-webkit-text-fill-color:#EE8C1F !important;
}
#comparador-facturas .cf-ahorro-badge-wrap{
  margin-left:auto !important;text-align:right !important;
}
#comparador-facturas .cf-ahorro-badge{
  background:#EE8C1F !important;color:#fff !important;
  -webkit-text-fill-color:#fff !important;font-size:13px !important;
  font-weight:700 !important;padding:7px 16px !important;
  border-radius:20px !important;display:inline-block !important;
}
#comparador-facturas .cf-ahorro-year{
  font-size:11px !important;color:#7a4500 !important;
  -webkit-text-fill-color:#7a4500 !important;margin-top:5px !important;
}

/* Móvil — banner en columna centrada */
@media(max-width:580px){
  #comparador-facturas .cf-ahorro-banner{
    flex-direction:column !important;
    align-items:center !important;
    text-align:center !important;
    gap:10px !important;
  }
  #comparador-facturas .cf-ahorro-arrow{display:none !important}
  #comparador-facturas .cf-ahorro-badge-wrap{
    margin-left:0 !important;
    text-align:center !important;
    width:100% !important;
  }
  #comparador-facturas .cf-ahorro-actual,
  #comparador-facturas .cf-ahorro-new-wrap{
    text-align:center !important;
  }
}
