/**
 * Streak Widget Styles
 * Compact badge integrated into header
 */

#streak-widget {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #DB9507 0%, #d48637 100%);
    border-radius: 20px;
    padding: 8px 14px;
    box-shadow: 0 2px 8px rgba(219, 149, 7, 0.3);
    color: #FEF9EB;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: all 0.3s ease;
    cursor: default;
    border: 2px solid rgba(254, 249, 235, 0.15);
    position: relative;
}

#streak-widget:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(219, 149, 7, 0.5);
    border-color: rgba(254, 249, 235, 0.3);
}

.streak-widget-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.streak-icon {
    font-size: 20px;
    line-height: 1;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.streak-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.streak-current {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.streak-number {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.streak-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.95;
    text-transform: lowercase;
}

.streak-best {
    display: none; /* Hidden in compact mode, shown on hover tooltip */
}

.streak-status {
    display: none; /* Hidden in compact header badge */
}

/* Tooltip on hover */
#streak-widget::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(31, 48, 56, 0.95);
    color: #FEF9EB;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

#streak-widget:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Toast notifications for achievements */
.streak-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    color: #333;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    font-size: 18px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    text-align: center;
}

.streak-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.streak-toast-success {
    background: linear-gradient(135deg, #32ADD8 0%, #5084A3 100%);
    color: #FEF9EB;
}

.streak-toast-info {
    background: linear-gradient(135deg, #DB9507 0%, #d48637 100%);
    color: #FEF9EB;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #streak-widget {
        padding: 6px 10px;
        gap: 5px;
    }

    .streak-icon {
        font-size: 18px;
    }

    .streak-number {
        font-size: 16px;
    }

    .streak-label {
        font-size: 10px;
    }

    #streak-widget::after {
        font-size: 10px;
        bottom: -28px;
    }
}

/* Small screens - ultra compact */
@media (max-width: 480px) {
    #streak-widget {
        padding: 5px 8px;
        gap: 4px;
    }

    .streak-icon {
        font-size: 16px;
    }

    .streak-number {
        font-size: 14px;
    }

    .streak-label {
        display: none; /* Hide "days" text on very small screens */
    }

    .streak-widget-content {
        gap: 4px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #streak-widget {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    #streak-widget:hover {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    }
}
