/* Navegação persistente das superfícies móveis do aluno.
   O componente só é habilitado por core/student_shell.html. */
.student-mobile-nav-enabled .mobile-bottom-nav {
  display: none !important;
}

@media (max-width: 1199px) {
  body.student-mobile-nav-enabled {
    padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  }

  .student-mobile-nav-enabled .mobile-bottom-nav {
    position: fixed;
    z-index: 100000;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex !important;
    min-height: calc(72px + env(safe-area-inset-bottom, 0px));
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(20, 83, 45, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 249, 0.99));
    box-shadow: 0 -14px 34px rgba(15, 36, 24, 0.12);
    backdrop-filter: blur(18px) saturate(1.18);
    -webkit-backdrop-filter: blur(18px) saturate(1.18);
  }

  .student-mobile-nav-enabled .mobile-nav-item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    min-height: 56px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 4px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #647067;
    font: inherit;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  }

  .student-mobile-nav-enabled .mobile-nav-item::before {
    position: absolute;
    top: 5px;
    width: 22px;
    height: 3px;
    border-radius: 999px;
    background: transparent;
    content: "";
    transition: background-color 0.18s ease, width 0.18s ease;
  }

  .student-mobile-nav-enabled .mobile-nav-item.active,
  .student-mobile-nav-enabled .mobile-nav-more[open] > summary {
    background: rgba(20, 83, 45, 0.08);
    color: #14532d;
  }

  .student-mobile-nav-enabled .mobile-nav-item.active::before,
  .student-mobile-nav-enabled .mobile-nav-more[open] > summary::before {
    width: 28px;
    background: linear-gradient(90deg, #14532d, #22c55e);
  }

  .student-mobile-nav-enabled .mobile-nav-item i,
  .student-mobile-nav-enabled .mobile-nav-icon-wrap {
    display: inline-flex;
    width: 34px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: inherit;
    font-size: 1.08rem;
  }

  .student-mobile-nav-enabled .mobile-nav-item.active i {
    background: #14532d;
    color: #fff;
    box-shadow: 0 8px 16px rgba(20, 83, 45, 0.18);
  }

  .student-mobile-nav-enabled .mobile-nav-item:active {
    transform: translateY(1px);
  }

  .student-mobile-nav-enabled .mobile-nav-item > span:last-child {
    display: block;
    max-width: 100%;
    white-space: nowrap;
  }

  .student-mobile-nav-enabled .mobile-nav-icon-wrap {
    position: relative;
  }

  .student-mobile-nav-enabled .mobile-nav-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    display: inline-flex;
    min-width: 17px;
    height: 17px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    background: #f5c85f;
    box-shadow: 0 5px 12px rgba(16, 38, 27, 0.18);
    color: #10261b;
    font-size: 0.58rem;
    font-weight: 900;
    line-height: 1;
  }

  .student-mobile-nav-enabled .mobile-nav-more {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
  }

  .student-mobile-nav-enabled .mobile-nav-more > summary {
    width: 100%;
    list-style: none;
  }

  .student-mobile-nav-enabled .mobile-nav-more > summary::-webkit-details-marker {
    display: none;
  }

  .student-mobile-nav-enabled .mobile-nav-more__menu {
    position: fixed;
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    z-index: 1;
    display: grid;
    width: min(420px, calc(100vw - 24px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-inline: auto;
    padding: 12px;
    border: 1px solid rgba(20, 83, 45, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 20px 54px rgba(15, 36, 24, 0.2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .student-mobile-nav-enabled .mobile-nav-more__menu a,
  .student-mobile-nav-enabled .mobile-nav-more__menu button {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: #f4f8f5;
    color: #173121;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
  }

  .student-mobile-nav-enabled .mobile-nav-more__menu a i,
  .student-mobile-nav-enabled .mobile-nav-more__menu button i {
    width: 22px;
    color: #15803d;
    text-align: center;
  }

  .student-mobile-nav-enabled .mobile-nav-more__menu .mobile-nav-more__mentoria {
    border: 1px solid rgba(184, 134, 11, 0.2);
    background: linear-gradient(135deg, #fffaf0, #f2f9f4);
  }

  .student-mobile-nav-enabled .mobile-nav-more__menu .mobile-nav-more__mentoria i {
    color: #b47d0b;
  }

  .student-mobile-nav-enabled .mobile-nav-more__menu .is-current {
    background: #e7f3eb;
    color: #14532d;
  }

  .student-mobile-nav-enabled .chat-tutor-root {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-mobile-nav-enabled .mobile-nav-item {
    transition: none;
  }
}
