/*
 * Release 260
 * Original ClickBee task modal + embedded website visit.
 * Reward animation is intentionally tiny:
 * one DOM node, transform + opacity only.
 */

#task-popup.cb-web-task-modal .cb-web-task-copy {
  margin: 0 0 12px;
  color: rgba(238,240,255,.78);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

#task-popup.cb-web-task-modal .cb-web-task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid rgba(190,198,255,.10);
  border-radius: 11px;
  background: rgba(12,16,42,.72);
}

#task-popup.cb-web-task-modal .cb-web-task-toolbar[hidden] {
  display: none !important;
}

#task-popup.cb-web-task-modal .cb-web-task-status {
  min-width: 0;
  overflow: hidden;
  color: #cfd4eb;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#task-popup.cb-web-task-modal .cb-web-task-status[data-state="success"] {
  color: #8fe1ae;
}

#task-popup.cb-web-task-modal .cb-web-task-status[data-state="error"] {
  color: #ff9d9d;
}

#task-popup.cb-web-task-modal .cb-web-task-timer {
  flex: 0 0 auto;
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

#task-popup.cb-web-task-modal .cb-web-task-challenge {
  flex: 0 0 auto;
  margin-bottom: 8px;
  text-align: center;
}

#task-popup.cb-web-task-modal .cb-web-task-frame {
  width: 100%;
  min-height: 300px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

/*
 * Website opens inside the SAME original modal.
 * Only expand it after Open website is pressed.
 */
#task-popup.cb-web-task-expanded {
  position: fixed !important;
  inset: 0 !important;

  width: 100vw !important;
  max-width: none !important;

  height: 100dvh !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  transform: none !important;
}

#task-popup.cb-web-task-expanded > .dialog-content {
  display: flex !important;
  flex-direction: column !important;

  width: 100% !important;
  height: 100% !important;

  max-width: none !important;
  max-height: none !important;

  box-sizing: border-box !important;

  padding:
    max(12px, env(safe-area-inset-top))
    12px
    max(12px, env(safe-area-inset-bottom)) !important;
}

#task-popup.cb-web-task-expanded .task-focus-panel {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

#task-popup.cb-web-task-expanded .task-content {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

#task-popup.cb-web-task-expanded .cb-web-task-copy {
  flex: 0 0 auto;
  margin-bottom: 8px;
  text-align: left;
}

#task-popup.cb-web-task-expanded .cb-web-task-frame {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 10px;
}

#task-popup.cb-web-task-expanded .d-flex.g-2.mt-2 {
  flex: 0 0 auto;
  margin-top: 8px !important;
}

/*
 * Ultra-light reward float.
 * GPU-friendly transform + opacity only.
 * Exists for ~1 second, then JS removes it.
 */
.cb-reward-float {
  position: fixed;
  z-index: 2147483000;

  pointer-events: none;

  padding: 6px 10px;

  border: 1px solid rgba(111,232,164,.18);
  border-radius: 999px;

  background: rgba(13,25,29,.90);

  color: #94efb7;

  box-shadow: 0 5px 16px rgba(0,0,0,.18);

  font-size: 12px;
  font-weight: 750;
  line-height: 1;

  white-space: nowrap;

  transform: translate3d(-50%,0,0);
  opacity: 0;

  will-change: transform, opacity;

  animation:
    cbRewardFloat 1050ms
    cubic-bezier(.18,.72,.22,1)
    forwards;
}

@keyframes cbRewardFloat {
  0% {
    opacity: 0;
    transform:
      translate3d(-50%,8px,0)
      scale(.96);
  }

  18% {
    opacity: 1;
  }

  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform:
      translate3d(-50%,-38px,0)
      scale(1);
  }
}

/*
 * Header pause button:
 * turn off cosmetic movement only.
 * Task timers/verification continue.
 */
.cb-motion-paused .cb-reward-float {
  display: none !important;
}

.cb-motion-paused .cb-live-task {
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .cb-reward-float {
    display: none !important;
  }

  .cb-live-task {
    animation: none !important;
    transition: none !important;
  }
}


/* Release 262 — lightweight landing confirmation after a website visit. */
.cb-task-complete-popup {
  position: fixed;
  left: 50%;
  bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px));
  z-index: 2147483001;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(92vw, 420px);
  padding: 11px 14px;
  border: 1px solid rgba(126,234,168,.18);
  border-radius: 14px;
  background: rgba(12,24,28,.96);
  color: #f5fff8;
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
  opacity: 0;
  transform: translate3d(-50%,10px,0);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}

.cb-task-complete-popup.is-visible {
  opacity: 1;
  transform: translate3d(-50%,0,0);
}

.cb-task-complete-popup__check {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: #77e69f;
  color: #07130b;
  font-size: 18px;
  font-weight: 900;
}

.cb-task-complete-popup__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cb-task-complete-popup__copy strong {
  font-size: 13px;
  line-height: 1.2;
}

.cb-task-complete-popup__copy span {
  color: rgba(244,255,248,.76);
  font-size: 12px;
  line-height: 1.25;
}

@media (prefers-reduced-motion: reduce) {
  .cb-task-complete-popup { transition: none; }
}
