
/* ShiftFlow 2.7 – PWA & Mobile App */

.pwa-install-button {
  position: fixed;
  right: 86px;
  bottom: 24px;
  z-index: 184;
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--app-border);
  border-radius: 17px;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: var(--app-shadow);
  font-family: inherit;
  font-weight: 800;
}

.pwa-install-button.show {
  display: inline-flex;
}

.pwa-update-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 220;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(560px, calc(100vw - 24px));
  padding: 14px 16px;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  opacity: 0;
  pointer-events: none;
  background: var(--app-surface);
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  transform: translate(-50%, 20px);
  transition: opacity 200ms ease, transform 260ms var(--sf-ease);
}

.pwa-update-banner.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.pwa-update-banner strong,
.pwa-update-banner small {
  display: block;
}

.pwa-update-banner small {
  margin-top: 4px;
  color: var(--app-text-soft);
}

.pwa-update-banner button {
  margin-left: auto;
  flex: 0 0 auto;
}

.mobile-bottom-nav,
.mobile-more-sheet {
  display: none;
}

@media (display-mode: standalone) {
  body {
    overscroll-behavior-y: contain;
  }

  .pwa-install-button {
    display: none !important;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 84px;
  }

  .app-sidebar {
    display: none !important;
  }

  .app-main,
  .calendar-main,
  .smart-calendar-main,
  .export-main,
  .analysis-v24 {
    width: 100% !important;
    margin-left: 0 !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: 110px !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 8px;
    bottom: 8px;
    left: 8px;
    z-index: 195;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 66px;
    padding: 7px;
    border: 1px solid var(--app-border);
    border-radius: 22px;
    background: color-mix(in srgb, var(--app-surface) 94%, transparent);
    box-shadow: 0 22px 70px rgba(0,0,0,.28);
    backdrop-filter: blur(24px);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    min-width: 0;
    border: 0;
    border-radius: 15px;
    cursor: pointer;
    color: var(--app-text-soft);
    background: transparent;
    text-decoration: none;
    font-family: inherit;
  }

  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button.active {
    color: white;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  }

  .mobile-bottom-nav span {
    font-size: 18px;
  }

  .mobile-bottom-nav small {
    font-size: 8px;
    font-weight: 800;
  }

  .mobile-more-sheet {
    position: fixed;
    right: 8px;
    bottom: 84px;
    left: 8px;
    z-index: 194;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 22px;
    opacity: 0;
    pointer-events: none;
    background: var(--app-surface);
    box-shadow: 0 24px 80px rgba(0,0,0,.32);
    transform: translateY(14px);
    transition: opacity 180ms ease, transform 240ms var(--sf-ease);
  }

  .mobile-more-sheet.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-more-sheet a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--app-border);
    border-radius: 15px;
    color: var(--app-text);
    background: var(--app-surface-2);
    text-decoration: none;
    font-weight: 800;
  }

  .mobile-more-sheet a.active {
    color: white;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  }

  .pwa-install-button {
    right: 14px;
    bottom: 90px;
    min-height: 44px;
  }

  .notification-center-button {
    right: 70px !important;
    bottom: 90px !important;
  }

  .sf-ai-launcher {
    right: 126px !important;
    bottom: 90px !important;
  }

  .pwa-update-banner {
    bottom: 88px;
  }
}


/* ShiftFlow 10.1 – Mobile Navigation Text Fix */
.mobile-more-sheet a,
.mobile-nav a,
.pwa-more-menu a {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.mobile-more-sheet a span,
.mobile-nav a span,
.pwa-more-menu a span {
  flex: 0 0 auto;
}

.mobile-more-sheet a,
.pwa-more-menu a {
  text-overflow: ellipsis;
}
