/**
 * EntregaChef — tema oscuro (charcoal + navy + naranja)
 * Reemplaza el dark azul del template. Activo con body.next-dark-theme
 */

/* ── Toggle visible (anula style.css light-only) ── */
#site-theme-toggle,
.ec-theme-toggle {
  display: inline-flex !important;
}

#pricing-theme-toggle {
  display: none !important;
}

/* Móvil: sin toggle en barra (solo en menú lateral) */
@media (max-width: 1023px) {
  .cZLQUC .kEWrJc {
    gap: 0.35rem;
  }

  .cZLQUC .hUOMAk {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
  }
}

/* ── Toggle UI ── */
.ec-theme-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(var(--text), 0.08);
  color: rgb(var(--text));
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
  flex-shrink: 0;
}

.ec-theme-toggle:hover {
  background: rgba(var(--text), 0.14);
  transform: scale(1.04);
}

.ec-theme-toggle:focus-visible {
  outline: 2px solid rgb(var(--primary));
  outline-offset: 3px;
}

.ec-theme-toggle svg {
  display: block;
  flex-shrink: 0;
}

.next-light-theme .ec-theme-icon--sun {
  display: none;
}

.next-light-theme .ec-theme-icon--moon {
  display: block;
}

.next-dark-theme .ec-theme-icon--sun {
  display: block;
}

.next-dark-theme .ec-theme-icon--moon {
  display: none;
}

.ec-drawer-theme {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(var(--text), 0.12);
  display: flex;
  justify-content: center;
}

/* ── Tokens semánticos oscuros ── */
body.next-dark-theme {
  --ec-line: rgba(255, 255, 255, 0.08);
  --ec-line-strong: rgba(255, 255, 255, 0.14);
  --ec-surface-border: rgba(255, 255, 255, 0.1);
  --ec-surface-border-strong: rgba(255, 255, 255, 0.16);
  --ec-input-bg: #262626;
  --ec-input-border: rgba(255, 255, 255, 0.14);
  --ec-input-border-hover: rgba(255, 255, 255, 0.24);
  --ec-ink-3: #cbd5e1;
  --ec-slate-1: #94a3b8;
  --ec-slate-2: #64748b;
  --ec-text-on-dark: #f8fafc;
  --ec-text-on-dark-muted: #cbd5e1;
  --ec-card-stroke: 1px solid rgba(255, 255, 255, 0.1);
  --ec-card-shadow: 2px 3px 10px rgba(0, 0, 0, 0.28);
  --ec-card-shadow-hover: 2px 4px 14px rgba(0, 0, 0, 0.38);
  --ec-btn-ghost-border: rgba(255, 106, 26, 0.55);
  --ec-btn-ghost-border-hover: rgba(255, 146, 72, 0.85);
  --ec-btn-ghost-ring: rgba(255, 255, 255, 0.08);
  --ec-hero-stroke: 0.1em;
  --ec-hero-stroke-color: #000000;
  --ec-hero-shadow-angle: 25deg;
  --ec-hero-shadow-offset: clamp(3px, 0.065em, 4px);
  --ec-hero-shadow-x: calc(cos(var(--ec-hero-shadow-angle)) * var(--ec-hero-shadow-offset));
  --ec-hero-shadow-y: calc(sin(var(--ec-hero-shadow-angle)) * var(--ec-hero-shadow-offset));
  --ec-hero-shadow-x2: calc(
    cos(var(--ec-hero-shadow-angle)) * (var(--ec-hero-shadow-offset) + 1px)
  );
  --ec-hero-shadow-y2: calc(
    sin(var(--ec-hero-shadow-angle)) * (var(--ec-hero-shadow-offset) + 1px)
  );
  --ec-hero-shadow-color: rgba(0, 0, 0, 0.92);
  --ec-hero-shadow-accent: rgba(255, 106, 26, 0.48);
  --mist: #1a2230;
  --slate: #cbd5e1;
  color: rgb(var(--text));
  background: rgb(var(--background)) !important;
}

body.next-dark-theme .fkUCPe,
body.next-dark-theme .gqTlSS,
body.next-dark-theme .gtWuaL,
body.next-dark-theme .fNVwKQ {
  background: rgb(var(--background));
  color: rgb(var(--text));
}

body.next-dark-theme .gqTlSS {
  background: rgb(var(--secondBackground));
}

/* ── Navbar ── */
body.next-dark-theme .cZLQUC {
  background: rgb(var(--navbarBackground)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35) !important;
}

body.next-dark-theme .cZLQUC .ccEuKk a,
body.next-dark-theme .cZLQUC .gsKOun a:not(.bDjvej) {
  color: #e2e8f0 !important;
}

body.next-dark-theme .cZLQUC .hUOMAk button,
body.next-dark-theme .cZLQUC .gHjyjX {
  color: #f8fafc !important;
}

body.next-dark-theme .my-drawer-container {
  background: rgb(var(--navbarBackground));
  color: #f8fafc;
}

body.next-dark-theme .drawer-nav a {
  color: #e2e8f0 !important;
}

/* ── Heroes de página (Características, Planes, Contacto) ── */
body.next-dark-theme .kMVLIF {
  background: rgb(var(--secondary)) !important;
}

body.next-dark-theme .kMVLIF .idrxjM::before {
  background-color: var(--accent-on-dark);
}

/* ── Index hero ── */
body.next-dark-theme .gXvFm#inicio.ec-hero {
  background: linear-gradient(145deg, #0f172a 0%, #121212 42%, #1a2230 100%);
  border-bottom-color: rgba(255, 106, 26, 0.22);
}

body.next-dark-theme .gXvFm#inicio.ec-hero::before {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 106, 26, 0.22) 0%,
    rgba(255, 106, 26, 0.06) 45%,
    transparent 72%
  );
}

body.next-dark-theme #inicio .eHacTl,
body.next-dark-theme #inicio .ec-hero-title {
  color: #ffffff !important;
  -webkit-text-stroke: 0;
  filter: none;
}

/* Trazo + sombra direccional (~25°) — mismo ángulo en texto base y palabras destacadas */
body.next-dark-theme #inicio .ec-hero-title {
  padding-bottom: var(--ec-hero-shadow-offset);
}

body.next-dark-theme #inicio .ec-hero-title .ec-hero-text,
body.next-dark-theme #inicio .ec-hero-title .ec-hero-mark {
  filter: drop-shadow(
      var(--ec-hero-shadow-x) var(--ec-hero-shadow-y) 0 var(--ec-hero-shadow-color)
    )
    drop-shadow(
      var(--ec-hero-shadow-x2) var(--ec-hero-shadow-y2) 0 var(--ec-hero-shadow-accent)
    ) !important;
}

body.next-dark-theme #inicio .ec-hero-title .ec-hero-text {
  color: #ffffff !important;
  -webkit-text-stroke: var(--ec-hero-stroke) var(--ec-hero-stroke-color) !important;
  paint-order: stroke fill;
}

body.next-dark-theme #inicio .ec-hero-title .ec-hero-mark {
  color: var(--heat) !important;
  background: linear-gradient(135deg, #ff9248 0%, #ff6a1a 52%, #e85d0a 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke: 0 !important;
  paint-order: normal !important;
  text-shadow: none !important;
}

body.next-dark-theme #inicio .duzary,
body.next-dark-theme #inicio .dlwjbS {
  color: #cbd5e1 !important;
}

body.next-dark-theme #inicio .ec-hero-badge {
  color: #e2e8f0;
  background: linear-gradient(90deg, rgba(255, 106, 26, 0.14) 0%, rgba(30, 41, 59, 0.85) 100%);
  border-right-color: rgba(255, 255, 255, 0.12);
}

body.next-dark-theme #inicio .idrxjM.iQxMko {
  color: #fdba74 !important;
  background: rgba(255, 106, 26, 0.14);
  border-color: rgba(255, 106, 26, 0.28);
}

/* ── Secciones landing ── */
body.next-dark-theme .ec-landing-section {
  background: #121212;
  color: #f8fafc;
}

body.next-dark-theme .ec-landing-section--mist {
  background: #1a2230;
}

body.next-dark-theme .ec-landing-section,
body.next-dark-theme .ec-landing-section--mist,
body.next-dark-theme .gtWuaL,
body.next-dark-theme #modulos,
body.next-dark-theme #contacto.iHXKrY,
body.next-dark-theme .ec-index-pricing {
  color: #f8fafc;
}

body.next-dark-theme .ec-landing-section .ec-card:not(.ec-ba-card--after) .hRwyNG,
body.next-dark-theme .ec-card:not(.ec-ba-card--after) .hRwyNG,
body.next-dark-theme .ec-landing-section--mist .hRwyNG,
body.next-dark-theme .gtWuaL .hRwyNG,
body.next-dark-theme #contacto.iHXKrY .hRwyNG {
  color: #f8fafc !important;
}

body.next-dark-theme .ec-landing-section__head .kugkhQ,
body.next-dark-theme .ec-section-title .kugkhQ {
  color: #e2e8f0 !important;
}

body.next-dark-theme .ec-landing-section .huhnXB,
body.next-dark-theme .ec-landing-section .ec-card:not(.ec-ba-card--after) .jmpCRK,
body.next-dark-theme .ec-landing-section .dlwjbS,
body.next-dark-theme .ec-landing-section .jmpCRK:not(.ec-case-study__note),
body.next-dark-theme .gtWuaL .dlwjbS,
body.next-dark-theme .gtWuaL .dnlpoE,
body.next-dark-theme .gtWuaL .jmpCRK,
body.next-dark-theme .ec-landing-section__lead,
body.next-dark-theme #inicio .duzary,
body.next-dark-theme .ec-features-intro-note {
  color: #cbd5e1 !important;
}

body.next-dark-theme .ec-section-title,
body.next-dark-theme .jvMpbf,
body.next-dark-theme .kuHjMB,
body.next-dark-theme .ec-landing-section .jvMpbf {
  color: #ffffff !important;
}

body.next-dark-theme .idrxjM:not(.ec-field-label) {
  color: #fdba74 !important;
}

body.next-dark-theme .ec-section-mark,
body.next-dark-theme .kMVLIF .ec-section-mark,
body.next-dark-theme .wquXK .ec-section-mark {
  color: var(--heat) !important;
}

/* ── Tarjetas oscuras (index, pricing, etc.) ── */
body.next-dark-theme .ec-card:not(.ec-ba-card--after),
body.next-dark-theme .ec-calc-mini__fields,
body.next-dark-theme .ec-calc-mini__results,
body.next-dark-theme .ec-calc-panel,
body.next-dark-theme .ec-compare-table,
body.next-dark-theme .ec-fit-card,
body.next-dark-theme .ec-demo-showcase__card,
body.next-dark-theme .ec-impl-step,
body.next-dark-theme .ec-soporte-card,
body.next-dark-theme .ec-proof-card,
body.next-dark-theme .ec-strategic-quote,
body.next-dark-theme .ec-pain-bar__item,
body.next-dark-theme .hQXyLc,
body.next-dark-theme .dMhuoV,
body.next-dark-theme .ksdSPk,
body.next-dark-theme .ikuuKu,
body.next-dark-theme .bSICVw {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: var(--ec-card-shadow) !important;
  color: #f8fafc;
}

body.next-dark-theme .ec-landing-section .ec-card:not(.ec-ba-card--after):not(.ec-surface-dark),
body.next-dark-theme .ec-card:not(.ec-surface-dark):not(.ec-ba-card--after) {
  color: #f8fafc;
}

body.next-dark-theme .ec-landing-section .ec-card:not(.ec-ba-card--after):not(.ec-surface-dark) .jmpCRK,
body.next-dark-theme .ec-landing-section .ec-card:not(.ec-ba-card--after):not(.ec-surface-dark) .jmpCRK li,
body.next-dark-theme .ec-card:not(.ec-surface-dark):not(.ec-ba-card--after) .jmpCRK,
body.next-dark-theme .ec-card:not(.ec-surface-dark):not(.ec-ba-card--after) .jmpCRK li {
  color: #cbd5e1 !important;
}

/* Catálogo / Qué obtienes — tarjetas oscuras en ec-ui-coherence.css */

/* Superficies oscuras existentes — unificar tono */
body.next-dark-theme .ec-surface-dark,
body.next-dark-theme .ec-landing-section .ec-ba-card.ec-ba-card--after.ec-card,
body.next-dark-theme .ec-ba-card.ec-ba-card--after.ec-card,
body.next-dark-theme .ec-case-study__math {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ── Botones secundarios (ghost) ── */
body.next-dark-theme #inicio .cKWTai,
body.next-dark-theme .ec-landing-section .cKWTai,
body.next-dark-theme .ec-landing-section a.cKWTai,
body.next-dark-theme .ec-card .cKWTai,
body.next-dark-theme .ec-card a.cKWTai,
body.next-dark-theme .ec-demo-showcase .cKWTai,
body.next-dark-theme .ec-demo-ctas .cKWTai,
body.next-dark-theme .ec-landing-section__cta .cKWTai,
body.next-dark-theme .ec-index-pricing__cta .cKWTai,
body.next-dark-theme .gtWuaL .cKWTai,
body.next-dark-theme #contacto.iHXKrY .cKWTai {
  background: #1e293b !important;
  border-color: var(--ec-btn-ghost-border) !important;
  color: #f8fafc !important;
  box-shadow: 0 0 0 1px var(--ec-btn-ghost-ring) !important;
}

body.next-dark-theme .ec-landing-section .cKWTai span,
body.next-dark-theme .ec-card .cKWTai span,
body.next-dark-theme #contacto.iHXKrY .cKWTai span {
  color: var(--heat) !important;
}

/* ── Formularios ── */
body.next-dark-theme .ec-landing-section .eTdnKC,
body.next-dark-theme #contacto.iHXKrY .eTdnKC,
body.next-dark-theme .gtWuaL .eTdnKC,
body.next-dark-theme .eTdnKC {
  background: var(--ec-input-bg) !important;
  border-color: var(--ec-input-border) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}

body.next-dark-theme .eTdnKC::placeholder {
  color: #94a3b8;
}

body.next-dark-theme .ec-field-label {
  color: #e2e8f0 !important;
}

/* ── Pricing — tarjetas oscuras (mismo tono que el resto del index) ── */
body.next-dark-theme .pricing-plans-stack .ec-plan--featured,
body.next-dark-theme .ec-index-pricing__stack .ec-plan--featured {
  box-shadow: var(--ec-plan-plus-shadow) !important;
  border-color: var(--ec-plan-plus-border) !important;
}

body.next-dark-theme .next-dark-theme .pricing-plans-stack .lnguyz,
body.next-dark-theme .pricing-plans-stack .lnguyz,
body.next-dark-theme .ec-index-pricing__stack .lnguyz {
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.55), 0 12px 32px rgba(255, 106, 26, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 106, 26, 0.35) !important;
}

body.next-dark-theme .ec-index-pricing__note-line,
body.next-dark-theme .ec-index-pricing__note-line strong {
  color: #cbd5e1 !important;
}

body.next-dark-theme .ec-impl-included-panel,
body.next-dark-theme .ec-impl-included-banner {
  background: linear-gradient(135deg, rgba(255, 106, 26, 0.12) 0%, #1e293b 55%) !important;
}

body.next-dark-theme .ec-impl-included-panel__note {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1 !important;
}

body.next-dark-theme .ec-impl-included-panel__bullets li {
  color: #e2e8f0 !important;
  background: rgba(15, 23, 42, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

/* ── FAQ ── */
body.next-dark-theme .ecYgmb,
body.next-dark-theme .ec-faq-block {
  background: transparent;
  color: #f8fafc;
}

body.next-dark-theme .hQXyLc {
  background: #1e293b !important;
}

body.next-dark-theme .kqQUQZ,
body.next-dark-theme .hQXyLc .fZkPUJ {
  color: #f8fafc !important;
}

body.next-dark-theme .kgIhTQ,
body.next-dark-theme .kgIhTQ p {
  color: #cbd5e1 !important;
}

/* ── Footer + CTA final ── */
body.next-dark-theme .wquXK,
body.next-dark-theme .fhICMX {
  background: #0f172a !important;
}

body.next-dark-theme .fhICMX a,
body.next-dark-theme .fhICMX .jjJTJe,
body.next-dark-theme .fhICMX .sc-1fb91c2f-6 a {
  color: #cbd5e1 !important;
}

/* ── Contacto — sección clara del template ── */
body.next-dark-theme .jtNIum,
body.next-dark-theme .LrmBX,
body.next-dark-theme .ec-contact-final {
  background: transparent;
  color: #f8fafc;
}

body.next-dark-theme .ec-contact-final__lead {
  color: #cbd5e1 !important;
}

/* ── Calculadora resultados ── */
body.next-dark-theme .ec-calc-mini__result--loss {
  background: rgba(225, 29, 72, 0.12) !important;
}

body.next-dark-theme .ec-calc-mini__result--gain {
  background: rgba(22, 163, 74, 0.12) !important;
}

body.next-dark-theme .ec-calc-result__label {
  color: #94a3b8 !important;
}

body.next-dark-theme .ec-legal-notice-link,
body.next-dark-theme .ec-legal-notice-link a {
  color: #94a3b8 !important;
}

body.next-dark-theme .ec-legal-notice-link strong {
  color: #cbd5e1;
}

/* ── Tablas comparativas ── */
body.next-dark-theme .ec-compare-table th,
body.next-dark-theme .ec-compare-table td {
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

body.next-dark-theme .ec-compare-table__us {
  background: rgba(255, 106, 26, 0.08) !important;
  color: #f8fafc !important;
}

body.next-dark-theme .ec-mobile-compare-summary li {
  color: #cbd5e1;
}

body.next-dark-theme .ec-mobile-compare-summary strong {
  color: #f8fafc;
}

/* ── Barra sticky móvil (index) ── */
body.next-dark-theme .ec-mobile-sticky-cta {
  background: rgba(15, 23, 42, 0.96);
  border-top-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

body.next-dark-theme .ec-mobile-sticky-cta__btn--secondary {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: var(--ec-btn-ghost-border);
}

/* ── Scroll to top ── */
body.next-dark-theme .scroll-to-top {
  background: var(--heat);
  color: #fff;
  box-shadow: var(--ec-elev-on-dark);
}

/* Plan badges en features */
body.next-dark-theme #modulos .ec-feature-plan-badge,
body.next-dark-theme .ec-feature-plan-badge--standard {
  background: rgba(255, 106, 26, 0.14) !important;
  color: #fdba74 !important;
  border-color: rgba(255, 106, 26, 0.28) !important;
}

body.next-dark-theme .ec-feature-plan-badge--annual {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* ── Marca navbar en oscuro ── */
@media (max-width: 768px) {
  body.next-dark-theme .ec-theme-toggle {
    width: 2.85rem;
    height: 2.85rem;
  }
}
