/* essen.css – Essen-View (aus style.css ausgelagert, unveraendert) */

.essen-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.essen-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.essen-form input[type="text"]:focus {
    border-color: #667eea;
}

.essen-form select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    min-width: 150px;
}

.essen-form select:focus {
    border-color: #667eea;
}

.essen-list {
    margin-top: 20px;
    overflow-x: auto;
}

.essen-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.essen-table th,
.essen-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.essen-table th:last-child,
.essen-table td:last-child {
    text-align: right;
}

.essen-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.essen-table tr:hover {
    background: #f8f9fa;
}

.essen-table td button {
    margin-right: 5px;
}

/* Responsive für Essen-Tabelle */
@media (max-width: 768px) {
    .essen-form {
        flex-direction: column;
        align-items: stretch;
    }

    .essen-form input[type="text"],
    .essen-form select {
        width: 100%;
    }

    .essen-table th,
    .essen-table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .essen-table td button {
        display: block;
        width: 100%;
        margin-bottom: 5px;
        margin-right: 0;
    }
}

/* iPad (bis 1024px): Aktions-Buttons untereinander */
@media (max-width: 1024px) {
    .essen-table td:last-child .btn-small {
        display: block;
        width: 100%;
        margin: 0 0 6px 0;
    }

    .essen-table td:last-child .btn-small:last-child {
        margin-bottom: 0;
    }
}

/* Essen Modal Styles */
#essen-modal .modal-content {
    max-width: 500px;
}

/* Grosses Modal für ALDI-Auswahl */
#essen-modal .essen-modal-large {
    max-width: 900px;
    width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
}

.essen-quelle-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.quelle-tab {
    flex: 1;
    padding: 11px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: pointer;
}

.quelle-tab-aktiv {
    border-color: #0000a0;
    background: #eef0ff;
}

.essen-aldi-hinweis {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.essen-aldi-suche {
    margin-bottom: 12px;
}

.essen-aldi-suche input {
    width: 100%;
    padding: 14px 16px;
    font-size: 17px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    outline: none;
}

.essen-aldi-suche input:focus {
    border-color: #0000a0;
}

.aldi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 50vh;
    overflow-y: auto;
}

.aldi-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.aldi-card:hover {
    border-color: #0000a0;
}

.aldi-card img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    background: #fff;
}

.aldi-card-name {
    font-weight: 600;
}

.aldi-card-info.muted,
.aldi-grid .muted {
    color: #666;
    font-size: 13px;
}

.aldi-card-preis {
    color: #0000a0;
    font-weight: 700;
}

.aldi-badge {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 700;
    background: #0000a0;
    color: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    margin-top: 4px;
}

.aldi-badge.edeka-badge {
    background: #ffcc00;
    color: #003399;
}

.quelle-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
}

.quelle-aldi {
    background: #0000a0;
    color: #fff;
}

.quelle-eigenes {
    background: #e9ecef;
    color: #333;
}

.quelle-edeka {
    background: #ffcc00;
    color: #003399;
}

.essen-icon-cell {
    width: 56px;
}

.essen-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.essen-icon-zoom {
    cursor: zoom-in;
}

.essen-bild-lightbox {
    cursor: zoom-out;
}

.essen-bild-lightbox img {
    max-width: 88vw;
    max-height: 86vh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    background: #fff;
}

#essen-modal .muted {
    color: #666;
    font-size: 13px;
}

#essen-modal form:not(.hidden) {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#essen-modal input[type="text"],
#essen-modal select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#essen-modal input[type="text"]:focus,
#essen-modal select:focus {
    border-color: #667eea;
}

#essen-modal .form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
