/* Groceries Checklist Theme */

/* Stats Row */
.stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 99px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.stat-pill strong {
    color: var(--text-primary);
    font-weight: 700;
}

.stat-pill.stat-bought i {
    color: #10b981;
}

.stat-pill.stat-pending i {
    color: #f59e0b;
}

/* Quick Add Bar */
.quick-add-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    align-items: center;
}

.quick-add-input-wrap {
    flex: 1;
    position: relative;
}

.quick-add-input-wrap i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

.quick-add-input-wrap input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    transition: var(--transition);
}

.quick-add-input-wrap input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.quick-add-input-wrap input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Category styles removed */

/* Individual Grocery Item */
.grocery-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    transition: background 0.15s ease;
    position: relative;
}

.grocery-item:hover {
    background: rgba(255,255,255,0.02);
}

.grocery-item + .grocery-item {
    border-top: 1px solid rgba(255,255,255,0.03);
}

/* Custom Checkbox */
.grocery-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
}

.grocery-checkbox:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.grocery-checkbox.checked {
    background: #10b981;
    border-color: #10b981;
}

.grocery-checkbox.checked::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

/* Item Text */
.grocery-item-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.grocery-item.bought .grocery-item-text {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.6;
}

.grocery-item.bought .grocery-checkbox {
    background: #10b981;
    border-color: #10b981;
}

/* Item Category Tag */
.grocery-item-category {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: none; /* Hidden when grouped by category */
}

/* Delete Button */
.grocery-delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    font-size: 0.85rem;
    opacity: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.grocery-item:hover .grocery-delete-btn {
    opacity: 1;
}

.grocery-delete-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Bought animation */
@keyframes checkBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.grocery-checkbox.just-checked {
    animation: checkBounce 0.3s ease;
}

/* Empty State */
.empty-state-grocery {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
}

.empty-state-grocery i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
    color: var(--accent-primary);
}

.empty-state-grocery h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-state-grocery p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Item entrance animation */
@keyframes itemSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.grocery-item {
    animation: itemSlideIn 0.2s ease;
}

/* Progress bar below stats */
.month-progress {
    height: 4px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.month-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .quick-add-bar {
        flex-direction: column;
    }

    .stats-row {
        gap: 0.5rem;
    }

    .stat-pill {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .grocery-item {
        padding: 0.8rem 1rem;
    }

    .grocery-delete-btn {
        opacity: 1;
    }
}