/* Streak Card Widget - Compact single-row status bar */

.streak-card-placeholder {
    min-height: 64px;
}

.streak-card-loading {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s ease-in-out infinite;
}

.streak-card-loading .loading-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Main Card - single row: flame + label, week dots, claim button */
.streak-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-radius: 999px;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    margin: 0 auto 1rem auto;
}

.streak-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.streak-compact-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.streak-flame {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.6));
}

.streak-compact-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

/* Week Dots */
.streak-compact-dots {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
    /* Flex items default to min-width: auto, which means this row would
       refuse to shrink below the combined width of its 7 dots and push the
       Claim button out past the card's edge on narrow screens instead of
       compressing its own gap first. */
    min-width: 0;
    justify-content: center;
}

.streak-dot-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.streak-dot {
    position: relative;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(71, 85, 105, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 900;
    color: transparent;
    transition: all 0.3s ease;
}

.streak-dot-col.completed .streak-dot {
    background: #22c55e;
    color: white;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.streak-dot-col.today .streak-dot {
    outline: 2px solid rgba(59, 130, 246, 0.6);
    outline-offset: 2px;
}

/* Chain link between two consecutive completed days - only bridges days that
   are both actually completed, so the chain visibly breaks where a day was
   missed instead of running under future/empty dots. */
.streak-dot-col.completed:not(:last-child):has(+ .streak-dot-col.completed) .streak-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 0.45rem;
    height: 2px;
    background: rgba(34, 197, 94, 0.6);
}

.streak-dot-label {
    font-size: 0.55rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    line-height: 1;
}

.streak-dot-col.today .streak-dot-label {
    color: rgba(147, 197, 253, 0.9);
}

.streak-dot.today {
    outline: 2px solid rgba(59, 130, 246, 0.6);
    outline-offset: 2px;
}

/* Claim button / claimed check */
.claim-reward-btn-compact {
    flex-shrink: 0;
    padding: 0.4rem 0.9rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 999px;
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.claim-reward-btn-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.claim-reward-btn-compact:active {
    transform: translateY(0);
}

.claimed-check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Notification */
.streak-notification-card {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.streak-notification-card.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content-card {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(147, 197, 253, 0.3);
}

/* Responsive */
@media (max-width: 480px) {
    .streak-card {
        padding: 0.5rem 0.6rem 0.5rem 0.85rem;
        gap: 0.5rem;
    }

    .streak-compact-label {
        font-size: 0.78rem;
    }

    .streak-compact-dots {
        gap: 0.3rem;
    }

    .streak-dot {
        width: 13px;
        height: 13px;
        font-size: 0.5rem;
    }

    .streak-dot-col.completed:not(:last-child):has(+ .streak-dot-col.completed) .streak-dot::after {
        width: 0.3rem;
    }

    .claim-reward-btn-compact {
        padding: 0.35rem 0.7rem;
        font-size: 0.72rem;
    }
}
