/* M1: capa móvil aislada. Las reglas de escritorio existentes no se alteran. */
.mobile-demo-modal {
  position: fixed;
  inset: 0;
  z-index: 1380;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: hidden;
  background: rgba(18, 15, 39, .68);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.mobile-demo-modal.is-open { opacity: 1; visibility: visible; }
body.mobile-demo-open { overflow: hidden; overscroll-behavior: none; }

.mobile-demo-dialog {
  position: relative;
  box-sizing: border-box;
  width: min(460px, 100%);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 138, 61, .2);
  border-radius: 26px;
  background: linear-gradient(155deg, #fff 0%, #fffaf6 100%);
  box-shadow: 0 30px 80px rgba(8, 12, 30, .34);
  color: #35415a;
  font-family: 'Nunito', system-ui, sans-serif;
  transform: translateY(12px) scale(.985);
  transition: transform .24s cubic-bezier(.2, .9, .3, 1.05);
  -webkit-overflow-scrolling: touch;
}

.mobile-demo-modal.is-open .mobile-demo-dialog { transform: none; }
.mobile-demo-panel[hidden] { display: none; }
.mobile-demo-panel h2 { margin: 6px 42px 7px 0; color: #26314e; font-family: 'Baloo 2', 'Nunito', sans-serif; font-size: clamp(27px, 8vw, 36px); line-height: 1.02; }
.mobile-demo-panel > p { margin: 0; color: #68758d; font-size: 14px; line-height: 1.55; }
.mobile-demo-kicker { color: #d95f13; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }

.mobile-demo-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #e5e8f0;
  border-radius: 14px;
  background: #fff;
  color: #5d6780;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.mobile-demo-go {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 116px;
  margin-top: 20px;
  padding: 16px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff9d59, #f06d1a);
  box-shadow: 0 18px 35px -18px rgba(217, 95, 19, .75);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mobile-demo-go-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: rgba(255,255,255,.2); font-family: 'Baloo 2', sans-serif; font-size: 25px; font-weight: 800; }
.mobile-demo-go span:nth-child(2) { display: grid; gap: 3px; }
.mobile-demo-go strong { font-family: 'Baloo 2', 'Nunito', sans-serif; font-size: 21px; line-height: 1; }
.mobile-demo-go small { color: rgba(255,255,255,.88); font-size: 11px; font-weight: 700; line-height: 1.35; }
.mobile-demo-go em { margin-top: 4px; color: #fff; font-size: 11px; font-style: normal; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.mobile-demo-go b { font-size: 21px; }

.mobile-demo-desktop-head { display: grid; gap: 4px; margin: 22px 0 10px; }
.mobile-demo-desktop-head strong { color: #35415a; font-size: 13px; }
.mobile-demo-desktop-head span { color: #7c88a3; font-size: 11px; line-height: 1.4; }
.mobile-demo-module-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mobile-demo-module {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid #e4e8f1;
  border-radius: 14px;
  background: #fff;
  color: #43506a;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.mobile-demo-module i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #fff0e5; color: #d95f13; font-size: 10px; font-style: normal; font-weight: 900; }

.mobile-demo-computer { position: relative; display: grid; place-items: center; width: 76px; height: 62px; margin: 5px auto 20px; border: 4px solid #5e4b9a; border-radius: 11px; background: linear-gradient(145deg, #f6f3ff, #fff4ec); }
.mobile-demo-computer::before { content: ''; position: absolute; bottom: -12px; width: 26px; height: 9px; border-bottom: 4px solid #5e4b9a; border-left: 4px solid #5e4b9a; border-right: 4px solid #5e4b9a; border-radius: 0 0 6px 6px; }
.mobile-demo-computer i { width: 9px; height: 9px; border-radius: 50%; background: #ff8a3d; box-shadow: 0 0 0 7px rgba(255, 138, 61, .15); }
.mobile-demo-panel[data-mobile-demo-panel="notice"] { text-align: center; }
.mobile-demo-selected { display: table; margin: 0 auto 8px; padding: 5px 11px; border-radius: 999px; background: #f0ecfb; color: #5e4b9a; font-size: 11px; }
.mobile-demo-panel[data-mobile-demo-panel="notice"] h2 { margin-right: 0; }
.mobile-demo-complement { margin-top: 13px !important; padding: 12px; border-radius: 14px; background: #fff2e8; color: #7b4a2e !important; font-weight: 700; }
.mobile-demo-actions { display: grid; gap: 9px; margin-top: 20px; }
.mobile-demo-actions .btn { min-height: 48px; width: 100%; justify-content: center; }

.mobile-demo-close:focus-visible,
.mobile-demo-go:focus-visible,
.mobile-demo-module:focus-visible,
.mobile-demo-actions .btn:focus-visible { outline: 3px solid rgba(255, 138, 61, .48); outline-offset: 3px; }

/* La demo Go real reutiliza el modal y la lógica aprobados, pero en un teléfono
   ocupa el viewport disponible y elimina el efecto de “teléfono dentro de teléfono”. */
.sld-modal.sld-mobile-go-only { padding: 0; }
.sld-modal.sld-mobile-go-only .sld-shell { width: 100%; height: 100%; border: 0; border-radius: 0; }
.sld-modal.sld-mobile-go-only .sld-topstrip { min-height: 52px; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); }
.sld-modal.sld-mobile-go-only .sld-topstrip p,
.sld-modal.sld-mobile-go-only .sld-topstrip [data-sld-reset],
.sld-modal.sld-mobile-go-only .sld-sidebar,
.sld-modal.sld-mobile-go-only .sld-topbar,
.sld-modal.sld-mobile-go-only .sld-progress,
.sld-modal.sld-mobile-go-only .sld-kuntur { display: none; }
.sld-modal.sld-mobile-go-only .sld-topstrip-badge { font-size: 9px; }
.sld-modal.sld-mobile-go-only .sld-strip-btn.close { width: 44px; height: 44px; padding: 0; font-size: 22px; }
.sld-modal.sld-mobile-go-only .sl-tour-pilot-launch { min-height: 44px; }
.sld-modal.sld-mobile-go-only .sld-app { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.sld-modal.sld-mobile-go-only .sld-main { min-height: 0; }
.sld-modal.sld-mobile-go-only .sld-desktop { padding: 0; overflow: hidden; }
.sld-modal.sld-mobile-go-only [data-central-demo="go"] { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sld-modal.sld-mobile-go-only [data-go-central-content] { flex: 1 1 auto; height: auto; min-height: 0; }
.sld-modal.sld-mobile-go-only .go-central-v10 { height: 100%; min-height: 0; }
.sld-modal.sld-mobile-go-only .go-central-v10 { display: block; padding: 0; }
.sld-modal.sld-mobile-go-only .go-context-panel { display: none; }
.sld-modal.sld-mobile-go-only .go-central-v10 .go-phone { display: flex; flex-direction: column; width: 100%; max-width: none; height: 100%; margin: 0; padding: 7px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border: 0; border-radius: 0; box-shadow: none; transform: none; }
.sld-modal.sld-mobile-go-only .go-central-v10 .go-phone main { flex: 1 1 auto; min-height: 0; max-height: none; height: auto; padding: 15px; overflow-y: auto; overscroll-behavior: contain; border-radius: 18px; -webkit-overflow-scrolling: touch; }
.sld-modal.sld-mobile-go-only .go-central-v10 .go-phone nav { flex: 0 0 auto; gap: 5px; padding-top: 7px; }
.sld-modal.sld-mobile-go-only .go-central-v10 .go-phone nav button { min-height: 44px; padding: 6px 2px; border-radius: 12px; touch-action: manipulation; }
.sld-modal.sld-mobile-go-only .go-central-v10 .go-phone main button,
.sld-modal.sld-mobile-go-only .go-central-v10 .go-phone main input,
.sld-modal.sld-mobile-go-only .go-central-v10 .go-phone main select { min-height: 44px; touch-action: manipulation; }

@media (max-width: 359px) {
  .mobile-demo-dialog { padding: 20px 15px; border-radius: 21px; }
  .mobile-demo-panel h2 { font-size: 27px; }
  .mobile-demo-go { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 13px 12px; }
  .mobile-demo-go-icon { width: 42px; height: 42px; }
  .mobile-demo-module-list { grid-template-columns: 1fr; }
}

@media (orientation: landscape) and (max-height: 430px) {
  .mobile-demo-modal { align-items: stretch; padding: max(6px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .mobile-demo-dialog { width: min(720px, 100%); padding: 16px 20px; border-radius: 18px; }
  .mobile-demo-panel h2 { font-size: 27px; }
  .mobile-demo-go { min-height: 88px; margin-top: 12px; }
  .mobile-demo-desktop-head { margin-top: 14px; }
  .mobile-demo-module-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobile-demo-computer { width: 58px; height: 44px; margin-bottom: 14px; }
  .mobile-demo-actions { grid-template-columns: 1fr 1fr; }
  .sld-modal.sld-mobile-go-only .sld-topstrip { min-height: 46px; }
  .sld-modal.sld-mobile-go-only .go-central-v10 .go-phone header { padding-block: 2px 5px; }
  .sld-modal.sld-mobile-go-only .go-central-v10 .go-phone main { padding: 11px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-demo-modal,
  .mobile-demo-dialog { transition: none; }
}
