/**
 * Modal de módulos / Network — pantalla completa (estilo F11).
 */

#mobibcModuloModalBackdrop {
  position: fixed;
  inset: 0;
  z-index: 10190;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s;
}

#mobibcModuloModalBackdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

#mobibcModuloModal {
  position: fixed;
  z-index: 10200;
  inset: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  width: 100dvw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  transform: scale(0.985);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: #0b0f14;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #fff;
  transition:
    transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.32s ease,
    visibility 0s linear 0.32s;
}

#mobibcModuloModal.is-open {
  transform: scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.32s ease,
    visibility 0s linear 0s;
}

/* También cuando el navegador pone el modal en Fullscreen API */
#mobibcModuloModal:fullscreen,
#mobibcModuloModal:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: #0b0f14;
}

html.mobibc-modal-open,
html.mobibc-modal-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.mobibc-modulo-modal__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-left: max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 10, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex: 0 0 auto;
}

.mobibc-modulo-modal__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  min-width: 0;
}

.mobibc-modulo-modal__title .fa {
  font-size: 1.25rem;
  opacity: 0.95;
}

.mobibc-modulo-modal__title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobibc-modulo-modal__close {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.mobibc-modulo-modal__close:hover,
.mobibc-modulo-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.05);
  outline: none;
}

.mobibc-modulo-modal__body {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  color: #1a1a1a;
  background: #f8fafc;
  min-height: 0;
}

.mobibc-modulo-modal__body a {
  color: inherit;
}

/* Network: lista elegante (sin PNG legacy) */
.mobibc-modulo-modal__body:has(.mobibc-net),
.mobibc-modulo-modal__body:has(.mobibc-network-modal-grid) {
  background: #0b0f14;
  color: #fff;
  padding-top: 8px;
}

.mobibc-modulo-modal__loading,
.mobibc-modulo-modal__error {
  text-align: center;
  padding: 40px 16px;
  opacity: 0.9;
}

.mobibc-net {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 8px;
  max-width: 560px;
  margin: 0 auto;
}

.mobibc-net-empty {
  text-align: center;
  opacity: 0.75;
  margin: 28px 0;
  color: #fff;
}

.mobibc-net-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  text-decoration: none !important;
  color: #fff !important;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mobibc-net-btn:hover,
.mobibc-net-btn:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
  outline: none;
}

.mobibc-net-btn__glow {
  position: absolute;
  inset: auto -20% -60% auto;
  width: 55%;
  height: 140%;
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(28px);
  z-index: 0;
  pointer-events: none;
}

.mobibc-net-btn__icon,
.mobibc-net-btn__text,
.mobibc-net-btn__go {
  position: relative;
  z-index: 1;
}

.mobibc-net-btn__icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobibc-net-btn__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobibc-net-btn__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.mobibc-net-btn__hint {
  font-size: 12px;
  opacity: 0.72;
  font-weight: 400;
}

.mobibc-net-btn__go {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.mobibc-net-btn:hover .mobibc-net-btn__go {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.2);
}

.mobibc-net-btn--facebook .mobibc-net-btn__glow { background: #1877F2; }
.mobibc-net-btn--facebook .mobibc-net-btn__icon {
  background: rgba(24, 119, 242, 0.35);
  border-color: rgba(24, 119, 242, 0.55);
}

.mobibc-net-btn--instagram .mobibc-net-btn__glow { background: #E1306C; }
.mobibc-net-btn--instagram .mobibc-net-btn__icon {
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.45), rgba(253, 29, 29, 0.4), rgba(252, 176, 69, 0.35));
  border-color: rgba(225, 48, 108, 0.5);
}

.mobibc-net-btn--x .mobibc-net-btn__glow { background: #fff; opacity: 0.18; }
.mobibc-net-btn--x .mobibc-net-btn__icon {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.35);
}

.mobibc-net-btn--youtube .mobibc-net-btn__glow { background: #FF0000; }
.mobibc-net-btn--youtube .mobibc-net-btn__icon {
  background: rgba(255, 0, 0, 0.32);
  border-color: rgba(255, 80, 80, 0.55);
}

.mobibc-net-btn--tiktok .mobibc-net-btn__glow { background: #69C9D0; }
.mobibc-net-btn--tiktok .mobibc-net-btn__icon {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(254, 44, 85, 0.55);
  color: #fff;
}

.mobibc-net-btn--tiktok .mobibc-net-btn__icon svg {
  display: block;
}

.mobibc-network-modal-grid { display: none !important; }

/* Cinema / rail: también a pantalla completa (cubre el menú lateral) */
html.mobibc-cinema #mobibcModuloModal {
  width: 100vw;
  width: 100dvw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  left: 0;
  right: 0;
}
