/* =============================================
   WA-NAV — Menu hamburguesa universal
   Estilo panel deslizante tipo Legalbet
   ============================================= */

/* === Hamburger toggle (always visible) === */
.wa-nav-toggle {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.wa-nav-toggle__icon {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: background 0.2s ease;
}

.wa-nav-toggle__icon::before,
.wa-nav-toggle__icon::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: absolute;
  left: 0;
  transition: transform 0.2s ease;
}

.wa-nav-toggle__icon::before { top: -7px; }
.wa-nav-toggle__icon::after { top: 7px; }

/* === Hide old desktop collapse menu === */
#CollapsingNavbar { display: none !important; }

/* === Offcanvas / Nav panel === */
.wa-nav {
  width: 100vw !important;
  max-width: 100vw !important;
  background: #fff !important;
  border-right: none !important;
  box-shadow: 4px 0 30px rgba(0,0,0,0.15);
  font-family: 'Poppins', 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .wa-nav {
    width: 40vw !important;
    max-width: 480px !important;
  }
}

/* === Navbar — force consistent height === */
header#header .navbar {
  height: 65px !important;
  min-height: 65px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: 2px solid #049EC5 !important;
}

header#header .navbar > .container,
header#header .navbar > .container-fluid {
  height: 65px !important;
}

/* Adjust page top margin for navbar (65px + 2px border) */
.page-wrapper {
  margin-top: 67px !important;
}

/* === Menu header — same height as navbar === */
.wa-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 2px solid #049EC5;
  flex-shrink: 0;
  background: #131313;
  height: 65px;
}

.wa-nav__close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.wa-nav__close:hover {
  background: rgba(255,255,255,0.1);
}

/* === Body / Panels container === */
.wa-nav__body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.wa-nav__panels {
  position: relative;
  width: 100%;
  height: 100%;
}

/* === Individual panel === */
.wa-nav__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
  padding-bottom: 40px;
}

.wa-nav__panel--active {
  transform: translateX(0);
}

.wa-nav__panel--exit-left {
  transform: translateX(-30%);
}

/* === Back button === */
.wa-nav__back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #7B7B7B;
  cursor: pointer;
  border-bottom: 1px solid #e9e9e9;
  transition: background 0.15s ease;
  user-select: none;
}

.wa-nav__back:hover {
  background: #f9f9f9;
}

.wa-nav__back svg {
  color: #049EC5;
}

/* === Panel title === */
.wa-nav__panel-title {
  padding: 18px 20px 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #131313;
  letter-spacing: -0.01em;
}

/* === Menu item === */
.wa-nav__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  font-size: 1.05rem;
  font-weight: 400;
  color: #131313;
  text-decoration: none;
  border-bottom: 1px solid #f4f4f4;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}

.wa-nav__item:hover {
  background: #f9f9f9;
  color: #131313;
  text-decoration: none;
}

/* All items same style */
[data-panel="root"] > .wa-nav__item {
  font-weight: 500;
}

.wa-nav__item--has-children {
  font-weight: 500;
}

/* Parent link inside subpanel — identical to siblings */
.wa-nav__item--all {
  color: #131313;
  font-weight: 500;
  font-size: 1.05rem;
  border-bottom: 1px solid #f4f4f4;
}

.wa-nav__item--all:hover {
  color: #131313;
  background: #f9f9f9;
}

/* Force all items inside subpanels same style */
.wa-nav__panel .wa-nav__item {
  font-weight: 500 !important;
  font-size: 1.05rem !important;
  color: #131313 !important;
}

/* === Item content (icon + text) === */
.wa-nav__item-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* === Icons inside menu items (FA icons, images, svgs) === */
.wa-nav__item i,
.wa-nav__item .fa,
.wa-nav__item .fas,
.wa-nav__item .far,
.wa-nav__item .fab,
.wa-nav__item .fa-solid,
.wa-nav__item .fa-regular,
.wa-nav__item .fa-brands {
  width: 24px;
  text-align: center;
  font-size: 1rem;
  color: #049EC5;
  flex-shrink: 0;
}

.wa-nav__panel-title i,
.wa-nav__panel-title .fa,
.wa-nav__panel-title .fas,
.wa-nav__panel-title .far,
.wa-nav__panel-title .fab,
.wa-nav__panel-title .fa-solid,
.wa-nav__panel-title .fa-regular,
.wa-nav__panel-title .fa-brands {
  color: #049EC5;
  margin-right: 6px;
}

.wa-nav__item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  margin-right: 4px;
}

.wa-nav__item svg {
  flex-shrink: 0;
}

.wa-nav__item .link-text {
  /* Ensure text inside icon+text spans displays inline */
}

/* === Chevron === */
.wa-nav__chevron {
  display: flex;
  align-items: center;
  color: #BBBBBB;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.wa-nav__item:hover .wa-nav__chevron {
  color: #049EC5;
}

/* === Navbar override — always show hamburger === */
.navbar {
  padding: 0 !important;
}

.navbar > .container,
.navbar > .container-fluid {
  min-height: 60px;
}

/* === Backdrop === */
.offcanvas-backdrop.show {
  opacity: 0.5;
}

/* === Scrollbar styling === */
.wa-nav__panel::-webkit-scrollbar {
  width: 4px;
}

.wa-nav__panel::-webkit-scrollbar-track {
  background: transparent;
}

.wa-nav__panel::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

/* =============================================
   WA-BOTTOMBAR — Barra inferior fija tipo app
   ============================================= */
.wa-bottombar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #fff;
  border-top: 1px solid #e9e9e9;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  font-family: 'Poppins', 'Inter', sans-serif;
}

/* Flatten Drupal block wrappers inside bottombar (only mobile) */
@media (max-width: 767px) {
  .wa-bottombar,
  .wa-bottombar .region,
  .wa-bottombar .block,
  .wa-bottombar nav {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .wa-bottombar {
    background: #fff !important;
    border-top: 1px solid #e9e9e9 !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06) !important;
  }

  .wa-bottombar .block h2 {
    display: none !important;
  }
}

/* Hide on desktop/tablet */
@media (min-width: 768px) {
  .wa-bottombar {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .wa-bottombar {
    display: flex;
  }

  /* Espacio para que el contenido no quede tapado */
  body {
    padding-bottom: 64px !important;
  }

  /* Subir banners fixed encima de la bottombar */
  div#sticky_mobile {
    bottom: 56px !important;
  }

  .gumgum {
    bottom: 55px !important;
  }

  /* JS añade .has-gumgum al body cuando existe .gumgum */
  .has-gumgum .mobile-anchor-toggle {
    bottom: 135px !important;
  }

  body:not(.has-gumgum) .mobile-anchor-toggle {
    bottom: 70px !important;
  }
}

.wa-bottombar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 2px 6px;
  text-decoration: none;
  color: #555;
  font-size: 0.55rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.wa-bottombar__item i {
  font-size: 1.25rem;
  line-height: 1;
  transition: color 0.2s ease;
  margin-bottom: 1px;
}

.wa-bottombar__item:hover,
.wa-bottombar__item:active {
  color: #049EC5;
  text-decoration: none;
}

.wa-bottombar__item:hover i,
.wa-bottombar__item:active i {
  color: #049EC5;
}

/* Active state — highlight current page */
.wa-bottombar__item--active {
  color: #049EC5;
}

.wa-bottombar__item--active i {
  color: #049EC5;
}

/* Notification dot (Bonos) — animated */
.wa-bottombar__item--notify::before {
  content: '';
  position: absolute;
  top: 4px;
  right: calc(50% - 14px);
  width: 7px;
  height: 7px;
  background: #e74c3c;
  border-radius: 50%;
  border: 1.5px solid #fff;
  z-index: 1;
  animation: wa-dot-pulse 2s ease-in-out infinite;
}

.wa-bottombar__item--notify::after {
  content: '';
  position: absolute;
  top: 4px;
  right: calc(50% - 14px);
  width: 7px;
  height: 7px;
  background: #e74c3c;
  border-radius: 50%;
  z-index: 0;
  animation: wa-dot-ring 2s ease-in-out infinite;
}

@keyframes wa-dot-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

@keyframes wa-dot-ring {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(2.5); opacity: 0; }
}
