﻿:root {
  --mbx-z-sticky: 320;
  --mbx-z-dropdown: 960;
  --mbx-z-chat: 1180;
  --mbx-z-overlay: 1200;
  --mbx-z-modal: 1210;
  --mbx-z-dialog: 1220;
  --mbx-z-toast: 1230;
  --mbx-focus-ring-color: #fb923c;
  --mbx-focus-ring-shadow: 0 0 0 6px rgba(251, 146, 60, 0.24);
}

:where(
  a[href],
  button,
  input:not([type="hidden"]),
  select,
  textarea,
  summary,
  [role="button"],
  [role="tab"],
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 3px solid var(--mbx-focus-ring-color);
  outline-offset: 2px;
  box-shadow: var(--mbx-focus-ring-shadow);
}

:where([role="tab"]) {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

:where([role="tab"][aria-selected="true"]),
.auth-tab.is-active,
.config-tab.is-active,
.payhub-tab.is-active {
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.26), 0 10px 22px -14px rgba(234, 88, 12, 0.56);
}

.mbx-tab-highlight {
  animation: mbxTabHighlightPulse 1.2s ease-in-out 2;
}

@keyframes mbxTabHighlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.45);
  }
  65% {
    box-shadow: 0 0 0 10px rgba(251, 146, 60, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(251, 146, 60, 0);
  }
}

.container__section-buscador,
.container__buscador {
  z-index: var(--mbx-z-sticky) !important;
}

.notificaciones-menu,
.notification-dropdown,
.chat-dropdown {
  z-index: var(--mbx-z-dropdown) !important;
}

.chat-sidebar {
  z-index: calc(var(--mbx-z-chat) + 8) !important;
}

.chat-sidebar-backdrop {
  z-index: calc(var(--mbx-z-chat) + 7) !important;
}

.chat-thread__menu,
.chat-item__menu {
  z-index: calc(var(--mbx-z-chat) + 4) !important;
}

.chat-thread__header,
.chat-thread__actions,
.chat-item.has-open-menu {
  z-index: calc(var(--mbx-z-chat) + 3) !important;
}

.chat-toast,
.config-toast,
.toast-msg {
  z-index: var(--mbx-z-toast) !important;
}

#toast-container {
  z-index: var(--mbx-z-toast) !important;
}

.nav {
  z-index: 350 !important;
}

#nav-overlay {
  z-index: 340 !important;
}

.nav__list li ul {
  z-index: var(--mbx-z-dropdown) !important;
}

.popup-bienvenida {
  z-index: var(--mbx-z-modal) !important;
}

.mbx-motivacion {
  z-index: var(--mbx-z-dialog) !important;
}

.notifications-modal,
.video-guide-modal,
.video-trim-modal,
.service-activation-modal,
.config-modal,
.auth-guide-modal,
.ref-modal,
.newsletter-modal,
.guide-modal,
.modal-reingreso,
.ml-zoom-lightbox,
.modal-overlay,
.modal[id^="modal-"],
.modal[id*="-modal"],
.modal[id*="modal_"] {
  position: fixed;
  inset: 0;
  z-index: var(--mbx-z-overlay) !important;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5vw, 28px);
}

.notifications-modal__card,
.video-guide-modal__dialog,
.video-trim-modal__dialog,
.service-activation-modal__dialog,
.config-modal-card,
.auth-guide-modal__card,
.ref-modal__dialog,
.newsletter-modal__card,
.guide-card,
.modal-reingreso__card,
.modal-content,
.modal-card,
.ml-zoom-lightbox__dialog {
  position: relative;
  z-index: var(--mbx-z-modal) !important;
  margin: auto;
  max-height: calc(100dvh - clamp(24px, 5vw, 72px));
}

.mbx-dialog-root {
  z-index: var(--mbx-z-dialog) !important;
}

.mbx-dialog-card {
  max-height: calc(100vh - 24px);
}

.ml-zoom-lightbox {
  z-index: var(--mbx-z-modal) !important;
}

.ml-zoom-lightbox__dialog {
  width: min(1120px, calc(100vw - 24px));
}

.notifications-modal__card,
.video-guide-modal__dialog,
.video-trim-modal__dialog,
.service-activation-modal__dialog,
.config-modal-card,
.auth-guide-modal__card,
.ref-modal__dialog,
.newsletter-modal__card,
.guide-card,
.modal-content,
.modal-card {
  width: min(96vw, 680px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-open,
body.modal-open,
body.mbx-dialog-open {
  overflow: hidden;
}

.notification-focus-target {
  scroll-margin-top: 116px;
  outline: 2px solid rgba(251, 146, 60, 0.7);
  outline-offset: 3px;
  box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.42);
}

.notification-focus-target--soft {
  animation: mbxNotificationPulse 1.35s ease-in-out 3;
}

@keyframes mbxNotificationPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.45);
    background-color: rgba(255, 237, 213, 0.28);
  }
  60% {
    box-shadow: 0 0 0 12px rgba(251, 146, 60, 0);
    background-color: rgba(255, 237, 213, 0.52);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(251, 146, 60, 0);
    background-color: transparent;
  }
}

@media (max-width: 900px) {
  .notifications-modal,
  .video-guide-modal,
  .video-trim-modal,
  .service-activation-modal,
  .config-modal,
  .auth-guide-modal,
  .ref-modal,
  .newsletter-modal,
  .guide-modal,
  .modal-reingreso,
  .ml-zoom-lightbox,
  .modal-overlay,
  .modal[id^="modal-"],
  .modal[id*="-modal"],
  .modal[id*="modal_"] {
    align-items: flex-start;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .video-guide-modal__dialog,
  .video-trim-modal__dialog,
  .service-activation-modal__dialog,
  .config-modal-card,
  .auth-guide-modal__card,
  .ref-modal__dialog,
  .newsletter-modal__card,
  .guide-card,
  .modal-content,
  .modal-card {
    width: min(96vw, 640px);
    max-height: calc(100dvh - 20px);
  }
}

