/* Groceries Page - Uses recipes.css classes for consistent styling */

#boodschappenlijst-view {
    height: 100%;
}

#boodschappenlijst-view > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#boodschappenlijst-view .main-content-wrapper {
    display: grid;
    grid-template-columns: 25% 75%;
    gap: 0;
    flex: 1;
    min-height: 0;
}

/* Sidebar and Main Panel */
#boodschappenlijst-view .sidebar {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

#boodschappenlijst-view .sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#boodschappenlijst-view .recipe-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

#boodschappenlijst-view .main-panel {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

#boodschappenlijst-view .main-panel-header {
    flex-shrink: 0;
}

#boodschappenlijst-view .main-panel-content {
    flex: 1;
    overflow-y: auto;
    height: 100%;
}

#boodschappenlijst-view .main-panel-content::-webkit-scrollbar {
    width: 8px;
}

#boodschappenlijst-view .main-panel-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

#boodschappenlijst-view .main-panel-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

#boodschappenlijst-view .main-panel-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Alert messages for groceries */
.groceries-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    min-width: 300px;
    text-align: center;
}

#boodschappenlijst-view .alert-error {
    background: #ffe0e0;
    color: #c92a2a;
    border-left: 3px solid #ff6b6b;
}

#boodschappenlijst-view .alert-success {
    background: #e6f9e6;
    color: #2f7f2f;
    border-left: 3px solid #51cf66;
}

#boodschappenlijst-view .alert-info {
    background: #e0e7ff;
    color: #4c6ef5;
    border-left: 3px solid var(--accent);
}

/* Empty state styling */
.groceries-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.groceries-empty-state-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

/* New list form */
.groceries-new-list-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.groceries-new-list-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.groceries-new-list-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.1);
}

/* Edit list name form */
.groceries-edit-list-form {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: #fff3e0;
    border-radius: var(--border-radius);
    border: 1px solid #ffe0b2;
    margin-bottom: 1rem;
}

.groceries-edit-list-form input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Form groups and inputs */
.groceries-form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .groceries-form-row {
        grid-template-columns: 1fr;
    }
}

.groceries-form-group {
    margin-bottom: 0.5rem;
}

.groceries-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.groceries-form-group input,
.groceries-form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
}

.groceries-form-group input:focus,
.groceries-form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.1);
}

/* Button styles */
#boodschappenlijst-view .btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

#boodschappenlijst-view .btn-primary {
    background: var(--accent);
    color: white;
}

#boodschappenlijst-view .btn-primary:hover:not(:disabled) {
    background: var(--accent-orange);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

#boodschappenlijst-view .btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

#boodschappenlijst-view .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

#boodschappenlijst-view .btn-secondary:hover {
    background: var(--bg-fourth);
}

#boodschappenlijst-view .btn-danger {
    background: var(--accent-red);
    color: white;
}

#boodschappenlijst-view .btn-danger:hover:not(:disabled) {
    background: #ff5252;
    opacity: 0.9;
}

#boodschappenlijst-view .btn-success {
    background: #51cf66;
    color: white;
}

#boodschappenlijst-view .btn-success:hover:not(:disabled) {
    background: #40c057;
    opacity: 0.9;
}

#boodschappenlijst-view .btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Icon buttons */
#boodschappenlijst-view .icon-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

#boodschappenlijst-view .icon-button svg {
    width: 20px;
    height: 20px;
    fill: var(--accent);
}

#boodschappenlijst-view .icon-button:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

#boodschappenlijst-view .icon-button.delete-button.accent-red svg {
    fill: var(--accent-red);
}

#boodschappenlijst-view .icon-button.delete-button.accent-red:hover {
    background: rgba(255, 77, 77, 0.1);
}

/* Removed scoped round-button styles to use global styles from main.css */

/* Ingredient card styles for groceries */
#boodschappenlijst-view .ingredients-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#boodschappenlijst-view .ingredient-card {
    border-radius: var(--content-border-radius);
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#boodschappenlijst-view .ingredient-card:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

#boodschappenlijst-view .ingredient-card.purchased {
    opacity: 0.6;
    background: var(--bg-secondary);
}

#boodschappenlijst-view .ingredient-card.purchased .ingredient-name {
    text-decoration: line-through;
    color: var(--text-secondary);
}

#boodschappenlijst-view .ingredient-card .ingredient-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#boodschappenlijst-view .ingredient-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#boodschappenlijst-view .ingredient-card .ingredient-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

#boodschappenlijst-view .ingredient-card .ingredient-amount {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.625rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Mobile responsive */
@media (max-width: 1024px) {
    #boodschappenlijst-view .main-content-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    #boodschappenlijst-view .sidebar {
        max-height: 250px;
        border-bottom: 1px solid var(--border);
    }

    #boodschappenlijst-view .main-panel {
        min-height: 400px;
    }
}
