/* ============================================================================
   v0.4.12 - Streak freeze shield, milestone celebration badge, static chip,
   pet placeholder. Inline-with-streak-num indicators that surface FOMO state
   without taking space (shield is 1 char wide).
   ============================================================================ */
.freeze-shield {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 14px;
    border-radius: 50%;
    margin-left: 4px;
    cursor: default;
    user-select: none;
}
.freeze-shield.armed {
    color: var(--chronos-violet);
    background: color-mix(in srgb, var(--chronos-violet) 14%, transparent);
    /* Subtle pulse to indicate "ready to save you". Matches main-task ambient
       cadence so the eye reads them as the same priority class. */
    animation: freeze-pulse 2.4s ease-in-out infinite;
}
.freeze-shield.empty {
    color: var(--chronos-muted);
    background: transparent;
    opacity: 0.55;
}
@keyframes freeze-pulse {
    0%, 100% { transform: scale(1);     opacity: 1.0; }
    50%      { transform: scale(1.08);  opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) {
    .freeze-shield.armed { animation: none; }
}

/* Static chip variant - chip-shaped but non-clickable (current-state badges
   like "★ Главная" on the detail modal of an already-main task). */
.chip-static {
    background: color-mix(in srgb, var(--chronos-violet) 16%, transparent);
    color: var(--chronos-violet);
    border: 1px solid color-mix(in srgb, var(--chronos-violet) 30%, transparent);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
    user-select: none;
}

/* Milestone celebration modal - bigger than the rest of the modal-card stack,
   centered, big badge placeholder. Badge image lives at /badges/streak-N.png;
   if missing the background falls through to the violet gradient + the number
   we render on top (so it works out of the box without art assets). */
.modal-milestone {
    max-width: 440px;
    text-align: center;
    align-items: center;
}
.milestone-badge {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background:
        linear-gradient(135deg, var(--chronos-violet) 0%, var(--chronos-lavender, #A855F7) 100%),
        var(--chronos-violet);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow:
        0 12px 32px rgba(124, 58, 237, 0.45),
        inset 0 0 0 4px rgba(255, 255, 255, 0.15);
    margin: 4px auto 0;
}
.milestone-badge-num {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.0;
    font-variant-numeric: tabular-nums;
}
.milestone-badge-label {
    font-size: 12px;
    letter-spacing: 3px;
    margin-top: 4px;
    opacity: 0.85;
}
.milestone-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}
.milestone-body {
    margin: 0;
    color: var(--chronos-muted);
    line-height: 1.5;
    max-width: 320px;
}
.milestone-actions {
    justify-content: center;
    width: 100%;
}

/* v0.4.68: "a freeze saved your streak" dialog - milestone-style centered card
   with an icy accent. Reuses .milestone-title / .milestone-body / .milestone-actions. */
.modal-freeze-used {
    max-width: 420px;
    text-align: center;
    align-items: center;
}
.freeze-used-icon {
    width: 96px;
    height: 96px;
    margin: 4px auto 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    line-height: 1;
    background: radial-gradient(circle at 50% 38%, rgba(96, 165, 250, 0.30), rgba(29, 78, 216, 0.12));
    border: 1px solid rgba(96, 165, 250, 0.45);
    box-shadow: 0 10px 28px rgba(59, 130, 246, 0.35), inset 0 0 0 3px rgba(255, 255, 255, 0.12);
}

/* v0.5.4: pet day-recap modal - milestone-style card with the pet up top + the AI body. */
.modal-recap {
    max-width: 440px;
    text-align: center;
    align-items: center;
}
.recap-pet {
    font-size: 52px;
    line-height: 1;
    margin: 2px auto 0;
    filter: drop-shadow(0 6px 14px rgba(124, 58, 237, 0.35));
}
.recap-body {
    margin: 0;
    color: var(--chronos-fg-secondary);
    line-height: 1.55;
    max-width: 360px;
    white-space: pre-line;
}

/* Onboarding modal - first-visit explainer. Numbered loss-framed list. */
.modal-onboarding {
    max-width: 560px;
}
.onboarding-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}
.onboarding-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.onboarding-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}
.onboarding-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--chronos-violet);
    color: white;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Pet placeholder - small companion next to the streak. v0.4.12 stub: visible
   only on Plus/Pro tiers (Free users see "Upgrade to claim"). Real sprites
   ship later. */
/* Fixed box: the emoji glyph's advance width varies per platform font, which let
   it lean into the freeze badge on one side and the flame on the other. A centered
   fixed-size slot keeps the whole streak cluster stable. */
.pet-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    margin-left: 6px;
    cursor: pointer;
    user-select: none;
}
.pet-emoji {
    font-size: 28px;
    line-height: 1;
    display: inline-block;
}
/* v0.4.33: locked pet - an MMO-style "locked premium slot": a dimmed egg sealed
   behind crossed chains and a padlock, framed in a Plus-violet capsule that
   pulses to draw the eye. Clicking opens the upgrade dialog. The chains are
   pure CSS (no asset files) - two repeating-gradient bars rotated into an X. */
.pet-locked-egg {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    line-height: 1;
    cursor: pointer;
    border-radius: 11px;
    background: radial-gradient(circle at 50% 38%, rgba(124, 58, 237, 0.22), rgba(8, 6, 16, 0.45));
    border: 1.5px solid rgba(168, 85, 247, 0.55);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 9px rgba(124, 58, 237, 0.35);
    animation: pet-lock-glow 2.6s ease-in-out infinite;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pet-locked-egg:hover,
.pet-locked-egg:focus-visible {
    transform: translateY(-1px) scale(1.06);
    border-color: #e7c64a;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 18px rgba(231, 198, 74, 0.6);
    outline: none;
}
.pet-egg-dim {
    font-size: 26px;
    opacity: 0.5;
    filter: grayscale(0.45) brightness(0.85);
}
/* Crossed chains over the egg - two metallic bars with link-like banding. */
.pet-chains {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.pet-chains::before,
.pet-chains::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 150%;
    height: 6px;
    border-radius: 3px;
    background: repeating-linear-gradient(90deg,
        #e8d7a0 0, #cdb267 3px, #7d6326 5px, #cdb267 7px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.pet-chains::before { transform: translate(-50%, -50%) rotate(38deg); }
.pet-chains::after  { transform: translate(-50%, -50%) rotate(-38deg); }
.pet-lock {
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}
.pet-locked-egg:hover .pet-lock,
.pet-locked-egg:focus-visible .pet-lock {
    animation: pet-lock-wiggle 0.5s ease-in-out;
}
@keyframes pet-lock-glow {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 7px rgba(124, 58, 237, 0.3); }
    50%      { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 17px rgba(168, 85, 247, 0.6); }
}
@keyframes pet-lock-wiggle {
    0%, 100% { transform: translate(-50%, -50%) rotate(0); }
    25%      { transform: translate(-50%, -50%) rotate(-13deg); }
    75%      { transform: translate(-50%, -50%) rotate(13deg); }
}
@media (prefers-reduced-motion: reduce) {
    .pet-locked-egg { animation: none; }
    .pet-locked-egg:hover .pet-lock,
    .pet-locked-egg:focus-visible .pet-lock { animation: none; }
}

