/* Goal Progress Ring in Header */
.goals-header {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem 1rem;
    gap: 1rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* IE and Edge */
}

.goals-header::-webkit-scrollbar {
    display: none;
}

.goal-item-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 60px;
    max-width: 80px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s;
    flex-shrink: 0;
    /* Prevent item shrinking */
}

.goal-ring-container {
    position: relative;
    width: 36px;
    height: 36px;
    min-width: 36px;
    /* Explicit min-width */
    min-height: 36px;
    border-radius: 50%;
    /* Conic Gradient will be set via JS inline style */
    background: conic-gradient(var(--accent-primary) 0%, var(--bg-element) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s;
    flex-shrink: 0;
    /* Important for mobile */
}

.goal-ring-inner {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    background: var(--bg-panel);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    /* Absolute pixel size for consistency */
    font-weight: 700;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
    z-index: 2;
}

.goal-info {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.goal-title {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Achieved State - Richer Look */
.goal-item-header.achieved .goal-ring-container {
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.6), inset 0 0 10px rgba(251, 191, 36, 0.4);
    animation: pulse-glow 3s infinite;
}

.goal-item-header.achieved .goal-title {
    color: #fbbf24;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.goal-item-header.achieved .goal-ring-inner {
    color: #fbbf24;
    background: var(--bg-panel);
    /* Restore dark background for contrast */
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
    }

    50% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
    }

    100% {
        box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
    }
}