/**
 * "Tu espacio Doutor" — [dr_espacio_doutor] (ver inc/espacio-doutor/class-espacio-doutor.php).
 *
 * Todo el selector va prefijado con #dr-espacio-doutor-root para no filtrar
 * estilos hacia el resto de Elementor (mismo criterio que
 * #dr-hub-v6-root en css/portal-cliente/portal-cliente.css). Paleta y
 * tipografía toman las variables globales de style.css
 * (--color-azul-digital / --color-azul-oscuro / --color-azul-cielo /
 * --font-universo / --transition-smooth) en vez de redefinirlas — así esta
 * sección queda ligada al sistema de marca real del sitio, no a una copia
 * local de esos valores.
 */

#dr-espacio-doutor-root {
  --esd-bg: #f4f6fb;
  --esd-surface: #ffffff;
  --esd-border: #e8ebf3;
  --esd-ink: var(--color-azul-oscuro);
  --esd-muted: #64708a;
  --esd-pago: var(--color-azul-digital);
  --esd-pago-dark: #1a2ab5;
  --esd-kickoff: #0090d8;
  --esd-kickoff-light: #00c2f5;
  --esd-trabajo: var(--color-azul-oscuro);
  --esd-help-bg: #e8ecfa;

  display: block;
  width: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--esd-ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(44, 63, 205, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 88% 100%, rgba(0, 144, 216, 0.06) 0%, transparent 45%),
    var(--esd-bg);
  -webkit-font-smoothing: antialiased;
  padding: 80px 20px 90px;
}

#dr-espacio-doutor-root * { box-sizing: border-box; }
#dr-espacio-doutor-root .esd-container { max-width: 880px; margin: 0 auto; }

/* ---------------------------------------------------------------------
   INTRO
   ------------------------------------------------------------------- */

#dr-espacio-doutor-root .esd-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--esd-kickoff);
  margin-bottom: 14px;
}

#dr-espacio-doutor-root .esd-title {
  font-family: var(--font-universo);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(32px, 4.2vw, 44px);
  line-height: 1.12;
  margin: 0 0 16px;
  color: var(--esd-ink);
}

#dr-espacio-doutor-root .esd-subtitle {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--esd-muted);
  max-width: 540px;
  margin: 0;
}

#dr-espacio-doutor-root .esd-section-head {
  margin: 56px 0 24px;
}

#dr-espacio-doutor-root .esd-section-title {
  font-family: var(--font-universo);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 27px);
  margin: 0 0 6px;
  color: var(--esd-ink);
}

#dr-espacio-doutor-root .esd-section-hint {
  font-size: 14.5px;
  color: var(--esd-muted);
  margin: 0;
}

/* ---------------------------------------------------------------------
   SELECTOR (ARIA tabs)
   ------------------------------------------------------------------- */

#dr-espacio-doutor-root .esd-tabs {
  display: flex;
  gap: 6px;
  background: rgba(10, 20, 68, 0.055);
  box-shadow: inset 0 1px 2px rgba(10, 20, 68, 0.06);
  padding: 6px;
  border-radius: 999px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

#dr-espacio-doutor-root .esd-tab {
  appearance: none;
  border: none;
  background: transparent;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--esd-muted);
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

#dr-espacio-doutor-root .esd-tab-icon { width: 17px; height: 17px; flex-shrink: 0; transition: var(--transition-smooth); }

#dr-espacio-doutor-root .esd-tab:hover { color: var(--esd-ink); }
#dr-espacio-doutor-root .esd-tab:focus-visible { outline: 2px solid var(--esd-ink); outline-offset: 2px; }

#dr-espacio-doutor-root .esd-tab#esd-tab-pago.is-active { background: var(--esd-pago); color: #fff; box-shadow: 0 4px 14px rgba(44, 63, 205, 0.3); }
#dr-espacio-doutor-root .esd-tab#esd-tab-kickoff.is-active { background: linear-gradient(135deg, var(--esd-kickoff-light), var(--esd-kickoff)); color: #fff; box-shadow: 0 4px 14px rgba(0, 144, 216, 0.35); }
#dr-espacio-doutor-root .esd-tab#esd-tab-trabajo.is-active { background: var(--esd-trabajo); color: #fff; box-shadow: 0 4px 14px rgba(10, 20, 68, 0.3); }

/* ---------------------------------------------------------------------
   PANELES
   ------------------------------------------------------------------- */

#dr-espacio-doutor-root .esd-panel {
  position: relative;
  background: var(--esd-surface);
  border: 1px solid var(--esd-border);
  box-shadow: 0 1px 3px rgba(15, 27, 61, 0.05), 0 12px 28px rgba(15, 27, 61, 0.06);
  border-radius: 24px;
  padding: 38px 38px 34px;
  animation: esdPanelIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes esdPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#dr-espacio-doutor-root .esd-badge {
  position: absolute;
  top: 0;
  right: 28px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--esd-kickoff-light), var(--esd-kickoff));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 15px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 144, 216, 0.35);
  animation: esdBadgePulse 2.4s infinite;
}

@keyframes esdBadgePulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(0, 144, 216, 0.35); }
  50% { box-shadow: 0 4px 20px rgba(0, 144, 216, 0.6); }
}

#dr-espacio-doutor-root .esd-panel-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 4px;
}

#dr-espacio-doutor-root .esd-panel-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

#dr-espacio-doutor-root .esd-panel-icon svg { width: 21px; height: 21px; }

#dr-espacio-doutor-root .esd-panel:hover .esd-panel-icon { transform: scale(1.06) rotate(-3deg); }

#dr-espacio-doutor-root .esd-panel-head--pago .esd-panel-icon { background: linear-gradient(135deg, var(--esd-pago), var(--esd-pago-dark)); box-shadow: 0 6px 16px rgba(44, 63, 205, 0.3); }
#dr-espacio-doutor-root .esd-panel-head--kickoff .esd-panel-icon { background: linear-gradient(135deg, var(--esd-kickoff-light), var(--esd-kickoff)); box-shadow: 0 6px 16px rgba(0, 144, 216, 0.32); }
#dr-espacio-doutor-root .esd-panel-head--trabajo .esd-panel-icon { background: var(--esd-trabajo); box-shadow: 0 6px 16px rgba(10, 20, 68, 0.32); }

#dr-espacio-doutor-root .esd-when {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

#dr-espacio-doutor-root .esd-panel-head--pago .esd-when { color: var(--esd-pago); }
#dr-espacio-doutor-root .esd-panel-head--kickoff .esd-when { color: var(--esd-kickoff); }
#dr-espacio-doutor-root .esd-panel-head--trabajo .esd-when { color: var(--esd-trabajo); }

#dr-espacio-doutor-root .esd-panel-title {
  font-family: var(--font-universo);
  font-weight: 700;
  font-size: 22px;
  margin: 0;
  color: var(--esd-ink);
}

#dr-espacio-doutor-root .esd-desc {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--esd-muted);
  margin: 18px 0 4px;
}

/* Lista de confianza (panel Pago) */
#dr-espacio-doutor-root .esd-trust-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 4px;
  padding: 0;
}

#dr-espacio-doutor-root .esd-trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--esd-muted);
}

#dr-espacio-doutor-root .esd-trust-list svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* Checklist (panel Kickoff) */
#dr-espacio-doutor-root .esd-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0 4px;
  padding-top: 18px;
  border-top: 1px solid rgba(10, 20, 68, 0.08);
}

#dr-espacio-doutor-root .esd-checklist li { display: flex; gap: 12px; align-items: flex-start; }

#dr-espacio-doutor-root .esd-dot {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 144, 216, 0.12);
  color: var(--esd-kickoff);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

#dr-espacio-doutor-root .esd-checklist h5 { font-size: 14.5px; font-weight: 700; color: var(--esd-ink); margin: 0 0 2px; }
#dr-espacio-doutor-root .esd-checklist p { font-size: 14px; line-height: 1.5; color: var(--esd-muted); margin: 0; }

#dr-espacio-doutor-root .esd-note {
  font-size: 13px;
  color: var(--esd-muted);
  font-style: italic;
  font-family: var(--font-universo);
  margin: 16px 0 0;
}

/* ---------------------------------------------------------------------
   BOTONES
   ------------------------------------------------------------------- */

#dr-espacio-doutor-root .esd-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  margin-top: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

#dr-espacio-doutor-root .esd-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* barrido de luz al hover, igual que .btn-portal del hub de arriba */
#dr-espacio-doutor-root .esd-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
#dr-espacio-doutor-root .esd-btn:hover::after { left: 130%; }
#dr-espacio-doutor-root .esd-btn:focus-visible { outline: 3px solid var(--esd-ink); outline-offset: 2px; }

#dr-espacio-doutor-root .esd-btn--pago { background: linear-gradient(135deg, var(--esd-pago), var(--esd-pago-dark)); box-shadow: 0 4px 15px rgba(44, 63, 205, 0.28); }
#dr-espacio-doutor-root .esd-btn--pago:hover { box-shadow: 0 6px 22px rgba(44, 63, 205, 0.42); transform: translateY(-1px); }

#dr-espacio-doutor-root .esd-btn--kickoff { background: linear-gradient(135deg, var(--esd-kickoff-light), var(--esd-kickoff)); box-shadow: 0 4px 18px rgba(0, 144, 216, 0.32); }
#dr-espacio-doutor-root .esd-btn--kickoff:hover { box-shadow: 0 6px 24px rgba(0, 144, 216, 0.46); transform: translateY(-1px) scale(1.01); }

#dr-espacio-doutor-root .esd-btn--trabajo { background: var(--esd-trabajo); box-shadow: 0 4px 15px rgba(10, 20, 68, 0.28); }
#dr-espacio-doutor-root .esd-btn--trabajo:hover { box-shadow: 0 6px 22px rgba(10, 20, 68, 0.4); transform: translateY(-1px); }

/* ---------------------------------------------------------------------
   BARRA DE SOPORTE (rescatada de [dr_portal_cliente], ver class-espacio-doutor.php)
   ------------------------------------------------------------------- */

#dr-espacio-doutor-root .esd-support-bar {
  background: var(--esd-surface);
  border: 1px solid var(--esd-border);
  border-radius: 20px;
  padding: 16px 28px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(15, 27, 61, 0.04);
}

#dr-espacio-doutor-root .esd-support-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--esd-muted);
}

#dr-espacio-doutor-root .esd-status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  animation: esdPulseDot 2s infinite;
}
@keyframes esdPulseDot { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

#dr-espacio-doutor-root .esd-btn--support {
  background: rgba(44, 63, 205, 0.05);
  border: 1px solid rgba(44, 63, 205, 0.14);
  color: var(--esd-ink);
  padding: 10px 20px;
  font-size: 13.5px;
  margin-top: 0;
  box-shadow: none;
}
#dr-espacio-doutor-root .esd-btn--support:hover {
  background: rgba(0, 144, 216, 0.1);
  border-color: var(--esd-kickoff);
  color: var(--esd-kickoff);
  box-shadow: none;
  transform: none;
}

/* ---------------------------------------------------------------------
   BLOQUE DE AYUDA
   ------------------------------------------------------------------- */

#dr-espacio-doutor-root .esd-help {
  background: var(--esd-help-bg);
  border-radius: 24px;
  margin-top: 20px;
  padding: 32px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 18px rgba(10, 20, 68, 0.05);
}

#dr-espacio-doutor-root .esd-help-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#dr-espacio-doutor-root .esd-help-text h3 {
  font-family: var(--font-universo);
  font-weight: 700;
  font-size: 19px;
  margin: 0 0 5px;
  color: var(--esd-ink);
}

#dr-espacio-doutor-root .esd-help-text p {
  font-size: 14px;
  color: var(--esd-muted);
  max-width: 380px;
  margin: 0;
}

#dr-espacio-doutor-root .esd-btn--help {
  background: linear-gradient(135deg, var(--esd-pago), var(--esd-pago-dark));
  box-shadow: 0 4px 15px rgba(44, 63, 205, 0.28);
  margin-top: 0;
  flex-shrink: 0;
}
#dr-espacio-doutor-root .esd-btn--help:hover { box-shadow: 0 6px 22px rgba(44, 63, 205, 0.42); transform: translateY(-1px); }

#dr-espacio-doutor-root .esd-btn--help-alt {
  background: transparent;
  border: 1.5px solid var(--esd-pago);
  color: var(--esd-pago);
  box-shadow: none;
  margin-top: 0;
  flex-shrink: 0;
}
#dr-espacio-doutor-root .esd-btn--help-alt:hover {
  background: var(--esd-pago);
  color: #fff;
  transform: translateY(-1px);
}
#dr-espacio-doutor-root .esd-btn--help-alt::after { display: none; }

/* ---------------------------------------------------------------------
   ACCESIBILIDAD / RESPONSIVE
   ------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  #dr-espacio-doutor-root .esd-btn,
  #dr-espacio-doutor-root .esd-tab,
  #dr-espacio-doutor-root .esd-panel-icon { transition: none; }
  #dr-espacio-doutor-root .esd-panel { animation: none !important; }
  #dr-espacio-doutor-root .esd-badge { animation: none !important; }
  #dr-espacio-doutor-root .esd-status-dot { animation: none !important; opacity: 1; }
}

@media (max-width: 768px) {
  #dr-espacio-doutor-root { padding: 56px 18px 70px; }
  #dr-espacio-doutor-root .esd-help { padding: 28px 24px; }
}

@media (max-width: 560px) {
  #dr-espacio-doutor-root .esd-tabs { border-radius: 18px; }
  #dr-espacio-doutor-root .esd-tab { flex: 1 1 100%; }
  #dr-espacio-doutor-root .esd-panel { padding: 28px 22px 26px; }
  #dr-espacio-doutor-root .esd-badge { position: static; display: inline-block; transform: none; margin-bottom: 14px; }
}
