/* Task status and live-task styles */

.live-task-bubble {
  position: absolute;
  left: clamp(210px, 30%, 440px);
  top: 22px;
  z-index: 11;
  width: min(560px, 48vw);
  min-height: 122px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 0;
  transform: translateY(8px) scale(.98);
  pointer-events: none;
  transition: opacity .28s ease, transform .36s cubic-bezier(.19,1,.22,1);
}

.live-task-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.live-task-bubble-header {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  max-width: 230px;
  margin: 0 0 9px 0;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  box-shadow: 0 12px 28px rgba(0,0,0,.07);
  backdrop-filter: blur(18px) saturate(1.15);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(17,17,20,.48);
}

.live-task-bubble-header strong {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--blue);
}

.live-task-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 9px;
  max-width: 100%;
}

.live-task-item {
  display: inline-grid;
  grid-template-columns: 9px minmax(0, 1fr);
  column-gap: 9px;
  row-gap: 2px;
  align-items: center;
  max-width: min(260px, 100%);
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 14px 34px rgba(0,0,0,.08);
  backdrop-filter: blur(20px) saturate(1.12);
  color: rgba(17,17,20,.74);
}

.live-task-item:nth-child(2),
.live-task-item:nth-child(5) {
  margin-top: 14px;
}

.live-task-item:nth-child(3) {
  margin-top: -2px;
}

.live-task-item span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(120,120,128,.48);
  box-shadow: 0 0 0 4px rgba(120,120,128,.08);
}

.live-task-item p,
.live-task-item small {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-task-item p {
  font-size: 12px;
  font-weight: 850;
}

.live-task-item small {
  display: none;
}

.live-task-item.running span {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(55,118,221,.12), 0 0 18px rgba(55,118,221,.34);
  animation: liveTaskPulse 1.2s ease-in-out infinite;
}

.live-task-item.done span {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(49,209,88,.13);
}

.live-task-item.waiting span {
  background: #ffb020;
  box-shadow: 0 0 0 4px rgba(255,176,32,.12);
}

.live-task-item.failed span {
  background: #ff453a;
  box-shadow: 0 0 0 4px rgba(255,69,58,.12);
}

.live-task-item.web {
  background: rgba(232,248,255,.68);
}

.live-task-item.web span {
  background: #20a7ff;
}

.live-task-item.llm {
  background: rgba(245,241,255,.68);
}

.live-task-item.llm span {
  background: #7b61ff;
}

.live-task-item.coding {
  background: rgba(236,250,242,.7);
}

.live-task-item.coding span {
  background: #1fb56f;
}

.live-task-item.learning {
  background: rgba(255,248,229,.72);
}

.live-task-item.learning span {
  background: #ffb020;
}

.task-feed {
  position: absolute;
  left: 26px;
  bottom: 22px;
  z-index: 4;
}

.task-feed h2 {
  margin: 0;
  color: rgba(17,17,20,.58);
  font-size: clamp(19px, 3vw, 32px);
  letter-spacing: -.055em;
  line-height: .98;
}

.task-status-card {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.64) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
}

.task-status-card p {
  margin: 4px 0 0 !important;
  color: var(--muted) !important;
  line-height: 1.35 !important;
}

.task-preview-list {
  display: grid !important;
  gap: 10px !important;
  margin-top: 18px !important;
}

.task-preview-item {
  display: grid !important;
  gap: 5px !important;
  padding: 14px 15px !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.58) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
}

.task-preview-item strong {
  color: var(--ink) !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
}

.task-preview-item span {
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

.task-status-dot {
  width: 10px !important;
  height: 10px !important;
  flex: 0 0 auto !important;
  margin-top: 5px !important;
  border-radius: 999px !important;
  background: rgba(110,110,115,.4) !important;
}

.task-status-dot.active {
  background: var(--green) !important;
  box-shadow: 0 0 14px rgba(49,209,88,.75) !important;
}

.live-task-bubble {
  left: 30px !important;
  right: auto !important;
  top: 18px !important;
  width: min(390px, calc(100% - 220px)) !important;
  min-height: 0 !important;
  visibility: hidden !important;
}

.live-task-bubble.visible {
  visibility: visible !important;
}

.live-task-bubble-header {
  max-width: 210px !important;
  margin-bottom: 8px !important;
  padding: 6px 9px !important;
  font-size: 10px !important;
}

.live-task-list {
  gap: 6px !important;
  align-items: flex-start !important;
}

.live-task-item {
  max-width: min(176px, 100%) !important;
  min-height: 29px !important;
  padding: 6px 9px !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.07) !important;
}

.live-task-item:nth-child(2),
.live-task-item:nth-child(3),
.live-task-item:nth-child(5) {
  margin-top: 0 !important;
}

.live-task-item p {
  font-size: 10.5px !important;
}

.live-task-item small {
  max-width: 132px !important;
}

@keyframes liveTaskPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.55); opacity: .68; }
}

@media (max-width: 1180px) {
  .task-feed {
    left: 20px;
    bottom: 18px;
  }
}

@media (max-width: 720px) {
  .live-task-bubble {
    left: 14px !important;
    right: 14px !important;
    top: auto !important;
    bottom: 48px !important;
    width: auto !important;
  }
}

@media (max-width: 720px) {
  .live-task-bubble {
    left: 12px !important;
    right: 64px !important;
    top: auto !important;
    bottom: 44px !important;
    width: auto !important;
  }
}
