/**
 * 작업 플로우(신청·인증 제출) — 하단 Primary CTA + FAB 숨김
 * body.pu-task-flow
 */

body.pu-task-flow {
  padding-bottom: calc(var(--pu-nav-chrome-h, 88px) + 118px) !important;
}

body.pu-task-flow .nav-fab {
  display: none !important;
}

@media (max-width: 1023px) {
  body.pu-task-flow .nav-bottom-wrap {
    gap: 0;
  }

  body.pu-task-flow .mobile-bottom-nav {
    flex: 1 1 0 !important;
    max-width: none !important;
    width: 100% !important;
  }
}

/* ── 고정 Primary CTA (네비 바로 위) ── */
.flow-sticky-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--pu-nav-chrome-h, 88px) + 8px);
  z-index: 75;
  pointer-events: none;
  display: grid;
  gap: 8px;
}

.flow-sticky-cta__inner,
.flow-sticky-cta__btn,
.flow-sticky-cta__back {
  pointer-events: auto;
}

.flow-sticky-cta__inner {
  margin: 0;
}

.flow-sticky-cta__back {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid rgba(17, 19, 23, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: #111317;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(17, 19, 23, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.15s ease, background 0.15s ease;
}

.flow-sticky-cta__back:active {
  transform: scale(0.98);
  background: rgba(245, 245, 247, 0.98);
}

.flow-sticky-cta__btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #a8e635 0%, #7ed321 52%, #6bc41a 100%);
  color: #101216;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(126, 211, 33, 0.42);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.flow-sticky-cta__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 48px rgba(126, 211, 33, 0.48);
}

.flow-sticky-cta__btn:active {
  transform: scale(0.98);
}

.flow-sticky-cta__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.flow-sticky-cta__btn--dark {
  background: linear-gradient(145deg, #2a2d35 0%, #111317 100%);
  color: #fff;
  box-shadow: 0 14px 36px rgba(17, 19, 23, 0.28);
}

/* 챌린지 무료 체험 전환 */
.trial-price {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  vertical-align: middle;
}

.trial-price--block {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.trial-price__old {
  position: relative;
  display: inline-block;
  color: #8b949e;
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
}

.trial-price__old::before,
.trial-price__old::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 43%;
  height: 2px;
  border-radius: 999px;
  background: #111317;
  opacity: 0.62;
  transform: rotate(-7deg);
}

.trial-price__old::after {
  top: 61%;
  transform: rotate(-7deg);
}

.trial-price__free {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c9ff19, #94e814);
  color: #101216;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 8px 20px rgba(148, 232, 20, 0.28);
  white-space: nowrap;
}

.trial-price__note {
  color: var(--muted, #626b75);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.trial-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #111317;
  color: #c9ff19;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.trial-panel {
  border: 1px solid rgba(201, 255, 25, 0.5);
  background: linear-gradient(135deg, rgba(201,255,25,.16), rgba(255,255,255,.96));
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
}

.trial-panel strong {
  display: block;
  color: #111317;
  font-size: 14px;
  font-weight: 950;
}

.trial-panel p {
  margin: 4px 0 0;
  color: var(--muted, #626b75);
  font-size: 12px;
  line-height: 1.45;
}

/* join: 모바일에서 상단·카드 중복 CTA 숨김 */
@media (max-width: 767px) {
  body.pu-task-flow.join-flow .join-title-actions form,
  body.pu-task-flow.join-flow .join-title-actions .button:not(.secondary) {
    display: none !important;
  }

  body.pu-task-flow.join-flow .join-card-cta {
    display: none !important;
  }
}

/* 인증 업로드: 폼 안 제출 버튼은 모바일에서 숨기고 sticky만 */
@media (max-width: 899px) {
  body.pu-task-flow .record-upload-mobile .record-submit {
    display: none !important;
  }

  body.pu-task-flow .record-apple-wrap {
    padding-bottom: calc(146px + var(--pu-nav-chrome-h, 88px)) !important;
  }
}

/* 챌린지 상세: 기존 mobile-cta-bar를 flow 스타일에 맞춤 */
@media (max-width: 767px) {
  body.pu-task-flow .mobile-cta-bar {
    bottom: calc(var(--pu-nav-chrome-h, 88px) + 8px) !important;
    left: 12px !important;
    right: 12px !important;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(17, 19, 23, 0.14);
  }

  body.pu-task-flow .mobile-cta-bar .cta-btn .button {
    min-height: 48px;
    font-size: 15px;
    font-weight: 900;
    border-radius: 14px;
  }
}
