/* ========================================
   DICED MEAL FILTERS - Menu Page
   ======================================== */

#diced-filtered-menu {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Search */
.diced-search-bar {
    position: relative;
    margin-bottom: 20px;
}
.diced-search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    color: #111827;
    background: #FFFFFF;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.diced-search-input:focus {
    border-color: #1B4332;
    outline: none;
    box-shadow: 0 0 0 3px rgba(27,67,50,0.1);
}
.diced-search-input::placeholder {
    color: #9CA3AF;
}
.diced-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* Filter Section */
.diced-filter-section {
    margin-bottom: 24px;
}
.diced-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.diced-filter-group-label {
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
    flex-shrink: 0;
}
.diced-filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.diced-calorie-range {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.diced-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.diced-filter-pill:hover {
    border-color: #2D6A4F;
    background: #F0FFF4;
}
.diced-filter-pill.diced-pill-active {
    background: #1B4332;
    color: #FFFFFF;
    border-color: #1B4332;
}
.diced-pill-icon {
    font-size: 14px;
}

/* Active Bar */
.diced-active-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 10px;
}
.diced-results-count {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}
.diced-results-count span {
    font-weight: 700;
    color: #1B4332;
}
.diced-sort-select {
    padding: 6px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    background: #FFFFFF;
    cursor: pointer;
}
.diced-sort-select:focus {
    border-color: #1B4332;
    outline: none;
}
.diced-clear-btn {
    padding: 6px 14px;
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.diced-clear-btn:hover {
    background: #FCA5A5;
}

/* Menu Grid */
.diced-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}
.diced-menu-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #6B7280;
    font-size: 16px;
}
.diced-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6B7280;
}
.diced-no-results-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.diced-no-results-text {
    font-size: 16px;
    font-weight: 500;
}

/* Meal Card */
.diced-menu-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}
.diced-menu-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.diced-menu-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.diced-menu-card-body {
    padding: 14px 16px;
}
.diced-menu-card-name {
    font-weight: 700;
    font-size: 15px;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 6px;
}
.diced-menu-card-name a {
    color: inherit;
    text-decoration: none;
}
.diced-menu-card-name a:hover {
    color: #2D6A4F;
}
.diced-menu-card-desc {
    font-size: 12px;
    color: #6B7280;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.diced-menu-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.diced-menu-card-cal {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}
.diced-menu-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #1B4332;
}
.diced-menu-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.diced-menu-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #F3F4F6;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    color: #6B7280;
}
.diced-menu-tag-diet {
    background: #D8F3DC;
    color: #1B4332;
}
.diced-menu-add-btn {
    width: 100%;
    padding: 10px;
    background: #1B4332;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.diced-menu-add-btn:hover {
    background: #2D6A4F;
}
.diced-menu-add-btn.diced-added {
    background: #2E7D32;
}

/* Fade in animation */
.diced-menu-card {
    animation: dicedFadeIn 0.3s ease;
}
@keyframes dicedFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 768px) {
    .diced-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .diced-menu-card-image {
        height: 150px;
    }
    .diced-menu-card-body {
        padding: 10px 12px;
    }
    .diced-menu-card-name {
        font-size: 13px;
    }
    .diced-menu-card-desc {
        display: none;
    }
    .diced-filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .diced-filter-pills,
    .diced-calorie-range {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
}

@media (max-width: 480px) {
    .diced-menu-grid {
        grid-template-columns: 1fr;
    }
    .diced-active-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}
