/* --- Grocery App Styles --- */

.grocery-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.grocery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.grocery-card .card-title {
    color: #212529;
}

/* Shopping list items */
.grocery-items .grocery-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease;
}

.grocery-items .grocery-item:last-child {
    border-bottom: none;
}

.grocery-items .grocery-item.checked {
    background-color: #f8f9fa;
}

.grocery-items .list-group {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.grocery-items .item-name {
    font-weight: 500;
}

.check-btn:hover i {
    color: #198754 !important;
}

.delete-btn {
    opacity: 0.3;
    transition: opacity 0.2s;
}

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

/* Search dropdown */
.search-dropdown {
    border-radius: 10px;
    overflow: hidden;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1050;
}

.search-dropdown .list-group-item {
    font-size: 0.9rem;
    cursor: pointer;
}

/* Progress bars */
.progress {
    border-radius: 100px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 100px;
    background-color: var(--grocery-primary);
    transition: width 0.4s ease;
}

/* Category filter pills */
.overflow-auto::-webkit-scrollbar {
    display: none;
}

.overflow-auto {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Product cards */
.list-group-item {
    border-color: #f0f0f0;
}

/* Price chart card */
#priceChart {
    min-height: 200px;
}

/* Cards */
.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    h4 {
        font-size: 1.2rem;
    }

    .grocery-item .item-name {
        font-size: 0.95rem;
    }

    .btn {
        font-size: 0.9rem;
    }
}

/* PWA standalone mode */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* [x-cloak] hides Alpine elements until initialized */
[x-cloak] {
    display: none !important;
}
