/**
 * Opt-in autonomous F7 shell sandbox — scoped layout only.
 * Does not affect production root tabs.
 */

#f7-app-root .page-shell-section .f7-autonomous-shell-page {
  padding: 0 !important;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

#f7-app-root .page-shell-section .shell-proof-card {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 12px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(145deg, #1a3d6f, #0d2240);
}

#f7-app-root .page-shell-section[data-name="shell-feed"] .shell-proof-card {
  background: linear-gradient(145deg, #1a4d8f, #0d2a52);
}

#f7-app-root .page-shell-section[data-name="shell-queue"] .shell-proof-card {
  background: linear-gradient(145deg, #6b2d8f, #3a1652);
}

#f7-app-root .page-shell-section[data-name="shell-chats"] .shell-proof-card {
  background: linear-gradient(145deg, #0f7a4d, #06402a);
}

#f7-app-root .page-shell-section[data-name="shell-search"] .shell-proof-card {
  background: linear-gradient(145deg, #b35a00, #6a3400);
}

#f7-app-root .page-shell-section[data-name="shell-profile"] .shell-proof-card {
  background: linear-gradient(145deg, #8f1a3a, #520f22);
}

#f7-app-root .f7-autonomous-shell-tabbar {
  flex-shrink: 0;
}

#f7-app-root .f7-autonomous-shell-tabbar,
#f7-app-root .f7-autonomous-shell-tabbar *,
#f7-app-root .f7-autonomous-shell-tabbar .tab-link,
#f7-app-root .f7-autonomous-shell-tabbar .tabbar-label {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

#f7-app-root .page-shell-swipe-host .f7-autonomous-shell-swipe-page {
  padding: 0 !important;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

#f7-app-root .page-shell-swipe-host swiper-container.tabs {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}

#f7-app-root .page-shell-swipe-host .shell-proof-card {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 12px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(145deg, #1a3d6f, #0d2240);
}

#f7-app-root .page-shell-swipe-host .shell-proof-card[data-shell-section="feed"] {
  background: linear-gradient(145deg, #1a4d8f, #0d2a52);
}

#f7-app-root .page-shell-swipe-host .shell-proof-card[data-shell-section="queue"] {
  background: linear-gradient(145deg, #6b2d8f, #3a1652);
}

#f7-app-root .page-shell-swipe-host .shell-proof-card[data-shell-section="chats"] {
  background: linear-gradient(145deg, #0f7a4d, #06402a);
}

#f7-app-root .page-shell-swipe-host .shell-proof-card[data-shell-section="search"] {
  background: linear-gradient(145deg, #b35a00, #6a3400);
}

#f7-app-root .page-shell-swipe-host .shell-proof-card[data-shell-section="profile"] {
  background: linear-gradient(145deg, #8f1a3a, #520f22);
}

/* CT-A autonomous tab surfaces (feed / queue / chats / profile) */
#f7-app-root .f7-autonomous-surface {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(var(--navh-inp, 56px) + 12px);
  box-sizing: border-box;
}

#f7-app-root .f7-autonomous-feed-shell__title,
#f7-app-root .f7-autonomous-queue-shell__title,
#f7-app-root .f7-autonomous-chat-hub-shell__title,
#f7-app-root .f7-autonomous-profile-shell__title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

#f7-app-root .f7-autonomous-queue-shell__hint,
#f7-app-root .f7-autonomous-profile-shell__hint {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

#f7-app-root .f7-autonomous-queue-shell__subhint,
#f7-app-root .f7-autonomous-profile-shell__subhint {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
}

#f7-app-root .f7-autonomous-feed-shell__mount {
  min-height: 120px;
}

#f7-app-root .f7-autonomous-feed-fallback {
  margin: 8px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

#f7-app-root .f7-autonomous-chat-hub__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

#f7-app-root .f7-autonomous-chat-hub__row--disabled {
  opacity: 0.72;
  pointer-events: none;
}

#f7-app-root .f7-autonomous-chat-hub__row--active {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#f7-app-root .f7-autonomous-chat-hub__row--active:active {
  opacity: 0.92;
}

#f7-app-root .f7-autonomous-chat-hub__row-badge--active {
  color: rgba(255, 200, 140, 0.95);
}

#f7-app-root .f7-autonomous-chat-hub__row-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

#f7-app-root .f7-autonomous-chat-hub__row-badge {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

#f7-app-root .f7-autonomous-chat-hub__empty {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}

#f7-app-root .f7-autonomous-profile-readonly-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#f7-app-root .f7-autonomous-profile-readonly-card__avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff6a00, #cc2200);
  box-shadow: 0 4px 18px rgba(255, 106, 0, 0.32);
}

#f7-app-root .f7-autonomous-profile-readonly-card__table-row {
  margin: 12px 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#f7-app-root .f7-autonomous-profile-readonly-card__table-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 6px;
}

#f7-app-root .f7-autonomous-profile-readonly-card__shift {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}

#f7-app-root .f7-autonomous-profile-shell--stable-readonly {
  padding-bottom: 4px;
}

#f7-app-root .f7-autonomous-profile-readonly-card__nick {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

#f7-app-root .f7-autonomous-profile-readonly-card__seat {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 10px;
}

#f7-app-root .f7-autonomous-profile-shell--productized {
  padding-bottom: 8px;
}

#f7-app-root .f7-autonomous-profile-shell--productized .f7-autonomous-profile-readonly-card {
  margin-bottom: 16px;
}

#f7-app-root .f7-autonomous-profile-logout-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}

#f7-app-root .f7-autonomous-profile-logout-btn:active:not(:disabled) {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.1);
}

#f7-app-root .f7-autonomous-profile-logout-btn:disabled,
#f7-app-root .f7-autonomous-profile-logout-btn[data-f7-autonomous-logout-pending="1"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Logout → Join only: suppress F7 .page-previous left shift before Join paint */
#f7-app-root .page-shell-swipe-host.bar-logout-join-prehide,
#f7-app-root .page-shell-section.bar-logout-join-prehide,
#f7-app-root .page-shell-swipe-host.bar-logout-join-prehide.page-previous,
#f7-app-root .page-shell-section.bar-logout-join-prehide.page-previous {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
  transform: none !important;
}
