/* ============================================================
 * ongo-refine.css — Safe progressive UX refinement layer
 * ============================================================
 * Purpose: Mobile sticky CTA "오늘의 3분 루틴 시작" injection
 *          without touching existing layout / z-index stack.
 *
 * Loaded after: tailwind.min.css (in head.php)
 * Source advice: 2026-05-26 외부 UX 분석 보고서 권고 #5
 * Cycle: 2026-05-26 (#5 mobile sticky CTA only)
 *
 * Conflict map (pre-existing fixed-position elements):
 *   - Floating share button : bottom-6 right-6 (z-40)
 *   - Cookie consent banner : bottom:0 left:0 right:0 (z-9999)
 *   - XP toast              : bottom:80px center (z-99999)
 *
 * Strategy: Reserve a horizontal full-width strip at the very
 * bottom (z-50 — below cookie consent so consent always wins,
 * above share button only when consent is dismissed).
 * ============================================================ */

/* Default: hidden on all viewports — JS opts in per route */
.ongo-sticky-cta {
  display: none;
}

/* Mobile-only sticky bar (≤ 767px) */
@media (max-width: 767px) {
  .ongo-sticky-cta.is-active {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50; /* below cookie consent (9999), above share (40) */
    background: rgba(15, 23, 42, 0.96); /* slate-900 / paper-friendly dark */
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
    animation: ongo-sticky-cta-rise 320ms cubic-bezier(.2,.8,.2,1) both;
  }

  .ongo-sticky-cta__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%); /* amber brand */
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
  }
  .ongo-sticky-cta__btn:active { transform: scale(.98); }
  .ongo-sticky-cta__btn:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
  }

  .ongo-sticky-cta__label { letter-spacing: -.01em; }
  .ongo-sticky-cta__arrow { font-size: 18px; line-height: 1; }

  /* Variant: muted (used when today is already completed) */
  .ongo-sticky-cta.is-completed .ongo-sticky-cta__btn {
    background: linear-gradient(180deg, #475569 0%, #334155 100%);
    color: #e2e8f0;
  }

  /* Push global body padding so floating share button doesn't hide behind */
  body.has-ongo-sticky-cta { padding-bottom: 72px; }
}

@keyframes ongo-sticky-cta-rise {
  from { transform: translateY(110%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Print: never show */
@media print { .ongo-sticky-cta { display: none !important; } }

/* Reduced motion: no rise animation */
@media (prefers-reduced-motion: reduce) {
  .ongo-sticky-cta.is-active { animation: none; }
}
