/* TestFlight clone overlay — hideable blue-tinted Liquid Glass
   (Dezmond 2026-09-15, subgoal: agent controller mode; aspect: testflight-overlay-polish) */
#tf-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(10, 132, 255, 0.28);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.25s ease;
}
#tf-banner.hidden { transform: translateY(-100%); }
#tf-banner .live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #30d158;
  margin-right: 6px;
  animation: tf-pulse 2s infinite;
}
@keyframes tf-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
#tf-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(10, 132, 255, 0.32);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.35);
  cursor: pointer;
}
#tf-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9997;
  background: rgba(20, 40, 70, 0.45);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 70vh;
  overflow-y: auto;
  color: #fff;
}
#tf-sheet.open { transform: translateY(0); }
.tf-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.tf-sheet-body { padding: 16px; }
#tf-back-prod {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 132, 255, 0.35);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  cursor: pointer;
}
#tf-show-banner {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 9999;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 132, 255, 0.32);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
#tf-show-banner.visible { display: flex; }
/* Push content down to account for banner */
body { padding-top: 30px; }
body.tf-banner-hidden { padding-top: 0; }
/* ---------- TestFlight health bar (Aspect: testflight-health-color-scale) ---------- */
.tf-healthbar{position:relative;background:rgba(255,255,255,.12);border-radius:6px;overflow:hidden;margin:8px 0}
.tf-healthbar-fill{border-radius:6px;transition:width .3s}
.tf-healthbar-pct{position:absolute;right:6px;top:50%;transform:translateY(-50%);font-size:11px;font-weight:600;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.5)}
.tf-healthbar.merge-ready .tf-healthbar-fill{background:#AF52DE !important}
/* ---------- TestFlight progress popup (Aspect: testflight-menu-progress-popup) ---------- */
#tf-progress-popup{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:60;max-width:min(92vw,420px);max-height:80vh;overflow-y:auto;border-radius:18px;padding:0}
#tf-progress-popup .tf-sheet-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.15)}
#tf-progress-popup .tf-sheet-body{padding:12px 16px}
.tf-prog-item{display:flex;align-items:center;gap:10px;width:100%;padding:10px;margin:6px 0;border-radius:12px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:#fff;font-size:13px;text-align:left}
.tf-prog-bar{flex:1;height:8px;border-radius:4px;background:rgba(255,255,255,.15);overflow:hidden}
.tf-prog-bar span{display:block;height:100%;border-radius:4px}
#tf-prog-close{background:none;border:none;color:#fff;font-size:18px}
#tf-backup-details{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:60;max-width:min(92vw,480px);max-height:80vh;overflow-y:auto;border-radius:18px;padding:0}
#tf-backup-details .tf-sheet-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.15)}
#tf-backup-details .tf-sheet-body{padding:12px 16px}
#tf-backup-close{background:none;border:none;color:#fff;font-size:18px}
#tf-details-popup{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:60;max-width:min(94vw,520px);max-height:84vh;overflow-y:auto;border-radius:18px;padding:0}
#tf-details-popup .tf-sheet-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.15)}
#tf-details-popup .tf-sheet-body{padding:12px 16px}
.tf-deck-card{border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:10px 12px;margin:8px 0;background:rgba(255,255,255,.05)}
#tf-det-close{background:none;border:none;color:#fff;font-size:18px}
.tf-resize-handle{position:absolute;right:4px;bottom:4px;width:22px;height:22px;cursor:nwse-resize;border-radius:6px;background:linear-gradient(135deg,transparent 50%,rgba(255,255,255,.5) 50%);touch-action:none}
.tf-purple-pill{border:2px solid #AF52DE !important;background:linear-gradient(135deg, rgba(175,82,222,.25), rgba(175,82,222,.08)) !important;box-shadow:0 0 18px rgba(175,82,222,.35)}

/* Liquid Glass pulsing purple head card (Dezmond 2026-09-15):
   Ultra-clear head card in the card stack with pulsing purple tint glow. */
@keyframes tf-purple-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(175,82,222,.35), 0 0 30px rgba(175,82,222,.15); }
  50% { box-shadow: 0 0 24px rgba(175,82,222,.65), 0 0 60px rgba(175,82,222,.30); }
}
.tf-purple-pill.tf-head-card {
  background: rgba(255,255,255,.06) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1.5px solid rgba(175,82,222,.55) !important;
  animation: tf-purple-pulse 2.4s ease-in-out infinite;
}
