/* =====================================================================
   TELECARE POPUP — REESCRITO, LIMPIO Y AMPLIADO / 3 PASOS
   ===================================================================== */
 
:root {
  --tc-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
 
  --tc-overlay: rgba(15, 18, 25, 0.42);
  --tc-surface: rgba(255, 255, 255, 0.92);
  --tc-surface-strong: rgba(255, 255, 255, 0.98);
  --tc-border: rgba(17, 24, 39, 0.08);
 
  --tc-text: #121826;
  --tc-muted: #667085;
 
  --tc-green: #12B76A;
  --tc-blue: #0A84FF;
  --tc-cyan: #22C3D6;
  --tc-red: #FF3B30;
 
  --tc-shadow: 0 28px 80px rgba(15, 18, 25, 0.18);
  --tc-shadow-soft: 0 12px 30px rgba(15, 18, 25, 0.10);
 
  --tc-radius-xl: 28px;
  --tc-radius-lg: 22px;
  --tc-pill: 999px;
}
 
/* ---------- Overlay ---------- */
.telecare-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--tc-overlay);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  font-family: var(--tc-font);
}
 
.telecare-overlay.visible {
  opacity: 1;
  visibility: visible;
}
 
/* ---------- Modal base ---------- */
.telecare-modal {
  box-sizing: border-box;
  position: relative;
  width: min(95vw, 560px);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--tc-surface);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-xl);
  box-shadow: var(--tc-shadow), 0 1px 0 rgba(255, 255, 255, .8) inset;
  padding: 30px 36px 30px;
  transform: translateY(10px) scale(.965);
  transition: transform .30s cubic-bezier(.16, 1, .3, 1), opacity .30s ease, width .28s ease, max-height .28s ease, padding .28s ease;
  display: flex;
  flex-direction: column;
}
 
.telecare-modal * ,
.telecare-modal *::before,
.telecare-modal *::after {
  box-sizing: inherit;
}
 
.telecare-overlay.visible .telecare-modal {
  transform: translateY(0) scale(1);
}
 
.telecare-overlay:has(.telecare-step[data-step="1"].active) .telecare-modal {
  width: min(95vw, 560px);
}
 
.telecare-overlay:has(.telecare-step[data-step="2"].active) .telecare-modal {
  width: min(95vw, 580px);
}
 
.telecare-overlay:has(.telecare-step[data-step="3"].active) .telecare-modal {
  width: min(95vw, 720px);
  max-height: 92vh;
  padding: 32px 36px;
}
 
/* ---------- Botón cerrar ---------- */
.telecare-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 18, 25, 0.05);
  color: rgba(18, 24, 38, 0.72);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: transform .15s ease, background .15s ease, color .15s ease;
  z-index: 5;
}
 
.telecare-close-btn:hover {
  background: rgba(15, 18, 25, 0.09);
  color: var(--tc-text);
  transform: scale(1.04);
}
 
/* ---------- Progreso ---------- */
.telecare-progress-container {
  display: flex;
  gap: 8px;
  margin: 4px 44px 20px 44px;
  align-items: center;
}
 
.telecare-progress-dot {
  height: 5px;
  flex: 1;
  border-radius: var(--tc-pill);
  background: rgba(152, 162, 179, 0.28);
  transition: background .25s ease, transform .25s ease;
}
 
.telecare-progress-dot.active {
  background: var(--tc-blue);
  transform: scaleY(1.15);
}
 
/* ---------- Steps ---------- */
.telecare-step {
  display: none;
  animation: tcFadeIn .22s ease;
}
 
.telecare-step.active {
  display: block;
}
 
@keyframes tcFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
 
/* ---------- Títulos ---------- */
.telecare-step-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tc-muted);
  text-align: center;
}
 
.telecare-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
  letter-spacing: -.035em;
  font-weight: 850;
  color: var(--tc-text);
  text-align: center;
}
 
.telecare-step[data-step="3"] .telecare-title {
  font-size: 26px;
  margin-bottom: 18px;
}
 
.telecare-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--tc-muted);
  text-align: center;
}
 
/* ---------- Tarjetas de opción (pasos 1 y 2) ---------- */
.telecare-options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 22px 0 20px 0;
  width: 100%;
}
 
.telecare-radio-card {
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 24px;
  background: var(--tc-surface-strong);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .82) inset;
  text-align: left;
}
 
.telecare-radio-card:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 132, 255, .25);
  box-shadow: var(--tc-shadow-soft);
}
 
.telecare-radio-card.selected {
  border-color: rgba(10, 132, 255, .65);
  background: linear-gradient(180deg, rgba(10, 132, 255, .07), rgba(10, 132, 255, .03));
  box-shadow: 0 16px 34px rgba(10, 132, 255, .12);
}
 
.telecare-radio-card input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}
 
.radio-custom {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(152, 162, 179, 0.72);
  background: #fff;
  flex: 0 0 auto;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
 
.telecare-radio-card.selected .radio-custom {
  border-color: var(--tc-blue);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, .12);
}
 
.telecare-radio-card.selected .radio-custom::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--tc-blue);
}
 
.radio-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
 
.radio-info strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--tc-text);
  letter-spacing: -.02em;
  line-height: 1.2;
}
 
.radio-info small {
  font-size: 12px;
  line-height: 1.3;
  color: var(--tc-muted);
}
 
/* ---------- Botones generales ---------- */
.telecare-footer-actions,
.telecare-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  width: 100%;
}
 
.telecare-footer-actions > .telecare-btn:only-child,
.telecare-actions > .telecare-btn:only-child {
  margin-left: auto;
}
 
.telecare-btn {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
  box-shadow: 0 10px 22px rgba(15, 18, 25, 0.08);
}
 
.telecare-btn:hover { transform: translateY(-1px); }
.telecare-btn:active { transform: translateY(0) scale(.99); }
 
.telecare-btn.secondary { background: #F3F4F7; color: var(--tc-text); }
.telecare-btn.secondary:hover { background: #E9EBF0; }
 
.telecare-step[data-step="1"] .telecare-btn.primary,
.telecare-step[data-step="2"] .telecare-btn.primary {
  background: var(--tc-blue);
  color: #fff;
}
.telecare-step[data-step="1"] .telecare-btn.primary:hover,
.telecare-step[data-step="2"] .telecare-btn.primary:hover {
  background: #006fe0;
  box-shadow: 0 14px 28px rgba(10, 132, 255, .22);
}
 
/* ---------- Paso 3: tarjeta resultado ---------- */
#telecare-card-container {
  display: block;
  width: 100%;
}
 
.tc-result-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--tc-shadow-soft);
  width: 100%;
}
 
.tc-card-top-border {
  height: 8px;
}
 
.tc-card-body {
  padding: 22px 26px 24px;
}
 
.tc-card-header-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}
 
.tc-license-title {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.035em;
  text-align: center;
}
 
.tc-license-subtitle {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--tc-muted);
  text-align: center;
}
 
.tc-license-duration {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #F4F7FB;
  color: var(--tc-text);
  font-size: 11px;
  font-weight: 750;
  border: 1px solid rgba(17, 24, 39, 0.05);
}
 
/* Lista de características */
.tc-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}
 
.tc-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--tc-text);
}
 
.tc-feature-icon {
  width: 16px;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  margin-top: 1px;
}
 
.tc-features-list li:not(.disabled) .tc-feature-icon {
  color: var(--tc-blue) !important;
}
 
.tc-features-list li.disabled {
  color: var(--tc-muted);
}
 
.tc-features-list li.disabled .tc-feature-icon {
  color: var(--tc-red) !important;
}
 
/* ---------- Caja "acceso restringido" horizontal y estrecha ---------- */
.tc-restricted-box {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 14px !important;
  width: 100% !important;
  margin: 12px 0 8px !important;
  padding: 12px 18px !important;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfe, #f3f7fb);
  border: 1px solid rgba(17, 24, 39, 0.07);
}
 
.tc-restricted-icon {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.tc-restricted-icon img {
  width: 34px !important;
  height: auto !important;
  display: block;
  object-fit: contain;
}
 
.tc-restricted-copy {
  text-align: left !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}
 
.tc-restricted-copy strong {
  display: block;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: var(--tc-text) !important;
  line-height: 1.2 !important;
  margin-bottom: 2px !important;
  text-align: left !important;
}
 
.tc-restricted-copy p {
  margin: 0 !important;
  font-size: 11.5px !important;
  line-height: 1.3 !important;
  color: var(--tc-muted) !important;
  text-align: left !important;
}
 
/* ---------- Frase "Regístrate para ver el precio" a la derecha ---------- */
.tc-cta-register {
  margin: 10px 0 0 0 !important;
  font-size: 12px;
  font-weight: 800;
  text-align: right !important;
  width: 100%;
}
 
.tc-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}
 
/* Ajuste de tamaño y padding para que el botón entre en 2 líneas, 
   PERO PERMITIENDO que el color de fondo dinámico mande sobre el botón */
.tc-card-actions .telecare-btn.primary {
  flex: 1;
  padding: 0 10px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  text-align: center;
  color: #fff !important;
}
 
.tc-card-actions .telecare-btn.secondary {
  flex: 1;
}
 
.tc-note {
  font-size: 11px;
  color: var(--tc-muted);
  text-align: center;
  margin-top: 8px;
}
 
.tc-highlight-green { color: var(--tc-green); }
.tc-highlight-blue { color: var(--tc-blue); }
.tc-highlight-cyan { color: var(--tc-cyan); }
 
/* =====================================================================
   RESPONSIVE — MÓVIL
   ===================================================================== */
@media (max-width: 640px) {
  .telecare-overlay { padding: 10px; }
 
  .telecare-modal {
    border-radius: 22px;
    padding: 20px 18px;
  }
 
  .telecare-overlay:has(.telecare-step[data-step="1"].active) .telecare-modal,
  .telecare-overlay:has(.telecare-step[data-step="2"].active) .telecare-modal {
    width: min(94vw, 500px);
  }
 
  .telecare-overlay:has(.telecare-step[data-step="3"].active) .telecare-modal {
    width: min(96vw, 540px);
    max-height: 90vh;
    padding: 18px;
  }
 
  .telecare-title { font-size: 21px; }
 
  .telecare-radio-card { padding: 15px 18px; }
 
  .telecare-btn { min-height: 42px; font-size: 12.5px; }
 
  .tc-card-body { padding: 16px 16px 18px; }
 
  .tc-license-title { font-size: 22px; }
 
  .tc-features-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }
 
  .tc-restricted-icon { width: 32px !important; height: 32px !important; }
  .tc-restricted-icon img { width: 30px !important; }
  .tc-restricted-copy strong { font-size: 13px !important; }
  .tc-restricted-copy p { font-size: 11px !important; }

  .tc-card-actions .telecare-btn.primary {
    padding: 0 6px !important;
    font-size: 11px !important;
  }
}