/* --- GRUNDEINSTELLUNGEN & FARBPALETTE --- */
:root {
    --background-color: #F5F5DC;
    --primary-color: #4A5D23;
    --secondary-color: #8B4513;
    --text-color: #3D402D;
    --light-text-color: #F5F5F5;
    --container-bg: rgba(245, 245, 220, 0.45);
    --container-bg-solid: rgb(245, 245, 220);
    --danger-color: #D22B2B;
    --disabled-color: #999;
    --success-color: #28a745;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-image: url('./img/sizilianische_landschaft.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--background-color);
    padding: 1rem;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--container-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 1rem 2rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.button-group-left, .button-group-right { display: flex; flex-wrap: wrap; gap: 8px; }

.main-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 992px) { .main-layout { grid-template-columns: 2fr 1fr; } }

header {
    position: relative;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1.5rem;
}

header h1 {
    font-family: 'Satisfy', cursive;
    font-size: 3.5rem;
    color: var(--primary-color);
}

#vacation-banner {
    background-color: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.header-info {
    position: absolute; top: 0; right: 0; text-align: right;
    display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
}

.datetime-display {
    font-size: 0.9em; color: var(--text-color); background: rgba(255, 255, 255, 0.5);
    padding: 5px 10px; border-radius: 5px;
}

.status-display { font-size: 0.9em; font-weight: bold; padding: 5px 10px; border-radius: 5px; }
.status-open { background: #d4edda; color: #155724; }
.status-closed { background: #f8d7da; color: #721c24; }

.info-btn {
    background: var(--secondary-color); color: var(--light-text-color); border: none;
    padding: 8px 12px; border-radius: 5px; cursor: pointer; font-weight: bold;
    text-decoration: none; display: inline-block; font-family: 'Roboto', sans-serif; font-size: 1em;
}

#order-summary-container {
    background-color: var(--container-bg-solid); padding: 1.5rem; border-radius: 8px;
    border: 1px solid var(--primary-color); position: sticky; top: 1rem; height: fit-content;
}

h2 {
    font-family: 'Satisfy', cursive; font-size: 2.8rem; color: var(--secondary-color);
    display: flex; align-items: center; gap: 1rem; margin-top: 2rem; margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--secondary-color); padding-bottom: 0.5rem;
}
h2:first-of-type { margin-top: 0; }

.material-symbols-outlined { font-size: 2.8rem; }
sup { font-size: 0.7em; vertical-align: super; margin-left: 1px; }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }

.menu-item {
    background: #fff; padding: 1rem; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; border: 1px solid transparent; transition: border 0.3s, transform 0.3s;
}
.menu-item:hover { transform: translateY(-5px); border-color: var(--primary-color); }

.item-header { display: flex; justify-content: space-between; align-items: flex-start; font-weight: bold; margin-bottom: 0.5rem; }
.item-name { font-size: 1.2rem; color: var(--primary-color); }
.item-number { font-style: italic; color: var(--secondary-color); }
.item-description { font-size: 0.9rem; margin-bottom: 1rem; flex-grow: 1; }

.item-options { border-top: 1px dashed var(--secondary-color); padding-top: 1rem; margin-top: auto; }
.item-options h4 { margin-bottom: 0.5rem; }
.item-options label { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; }
.item-options input[type="text"], .item-options select {
    width: 100%; padding: 0.5rem; border: 1px solid #ccc;
    border-radius: 4px; margin-top: 0.2rem; margin-bottom: 0.5rem;
}

.item-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.item-actions .price { font-size: 1.3rem; font-weight: bold; color: var(--secondary-color); }

.print-btn, .notice-btn {
    color: var(--light-text-color);
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}
.add-to-cart-btn:hover {
    background-color: var(--secondary-color);
}
.add-to-cart-btn:disabled {
    background-color: var(--disabled-color);
    cursor: not-allowed;
}
.add-to-cart-btn.added-to-cart:disabled {
    background-color: var(--success-color);
    transform: scale(1.05);
}

.print-btn { width: 100%; margin-top: 1rem; background-color: var(--secondary-color); }
.print-btn:hover { background-color: var(--primary-color); }

#order-items-list { list-style: none; margin-bottom: 1rem; max-height: 30vh; overflow-y: auto; }
.order-item-li {
    padding: 0.5rem 0; border-bottom: 1px solid #ddd; display: flex;
    justify-content: space-between; align-items: center;
}
.order-item-details .item-name { font-weight: bold; font-size: 1rem; color: var(--text-color); }
.order-item-details .item-options-list { font-size: 0.8rem; color: #555; margin-left: 1rem; font-style: italic; }
.remove-item-btn {
    background: var(--danger-color); color: white; border: none; border-radius: 50%;
    width: 24px; height: 24px; cursor: pointer; font-weight: bold; margin-left: 1rem; flex-shrink: 0;
}

#delivery-selection { margin: 1.5rem 0; }
#delivery-selection label { display: block; margin-bottom: 0.5rem; font-weight: bold; }
#delivery-location { width: 100%; padding: 0.5rem; border-radius: 4px; }

#order-total {
    margin-top: 1rem; border-top: 2px solid var(--primary-color); padding-top: 1rem; font-size: 1.2rem;
}
#order-total p { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
#order-total #final-price { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); }

#order-summary-text-container { margin-top: 1.5rem; }
#order-summary-text-container label { font-weight: bold; display: block; margin-bottom: 0.5rem; }
#order-summary-text {
    width: 100%; height: 150px; padding: 0.5rem; font-family: monospace;
    background: #fdfdfd; border: 1px solid #ccc;
}

#closed-notice-btn {
    background-color: var(--disabled-color); color: var(--light-text-color);
    width: 100%; border: none; padding: 1rem; border-radius: 8px;
    font-size: 1.2rem; font-weight: bold; margin-top: 1rem;
}

.hidden { display: none !important; }

#call-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--light-text-color);
    background-color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin: 2rem auto 0 auto;
    width: fit-content;
    max-width: 100%;
}
#call-button:hover {
    background-color: var(--secondary-color);
}
#call-button .material-symbols-outlined { font-size: 1.5rem; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5);
    display: flex; justify-content: center; align-items: center; z-index: 2000;
    visibility: hidden; opacity: 0; transition: visibility 0s 0.3s, opacity 0.3s;
}
.modal-overlay.visible { visibility: visible; opacity: 1; transition: visibility 0s, opacity 0.3s; }
.modal-content {
    background: var(--container-bg-solid); padding: 2rem; border-radius: 10px; position: relative;
    max-width: 500px; max-height: 80vh; display: flex; flex-direction: column;
}
.modal-close {
    position: absolute; top: 10px; right: 15px; font-size: 2rem;
    font-weight: bold; cursor: pointer; color: var(--danger-color);
}
.opening-times-table { width: 100%; margin-top: 1rem; }
.opening-times-table td { padding: 0.3rem 0.5rem; }
#delivery-locations-list {
    list-style-type: none; padding: 0; margin-top: 1rem;
    overflow-y: auto; columns: 2; column-gap: 2rem;
}
#delivery-locations-list li { padding: 2px 0; }

footer {
    border-top: 2px solid var(--primary-color); margin-top: 3rem;
    padding-top: 2rem; text-align: center; font-size: 0.9rem; color: var(--text-color);
}
footer h3 {
    font-family: 'Satisfy', cursive; color: var(--secondary-color);
    font-size: 1.8rem; margin-bottom: 1rem;
}
footer p { line-height: 1.6; margin-bottom: 1rem; }
footer a { color: var(--primary-color); }
.additives-legend {
    background-color: var(--container-bg-solid); padding: 1rem; border-radius: 8px;
    margin-bottom: 2rem; text-align: left; font-size: 0.8rem; line-height: 1.5;
}
.hidden-on-screen { display: none; }

@media (max-width: 768px) {
    body { padding: 0.5rem; padding-bottom: 2rem; }
    .page-container { padding: 1rem; }
    header h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .header-info { display: none; }
}

@media print {
    body, .page-container, .main-layout {
        display: block !important; background: none !important; padding: 0 !important;
        margin: 0 !important; box-shadow: none !important; border: none !important; color: #000 !important;
    }
    .top-nav-bar, header, main, #call-button, .modal-overlay, footer .additives-legend, footer h3, footer .impressum-text, #welcome-section {
        display: none !important;
    }
    footer { border-top: none !important; margin-top: 1rem !important; padding-top: 1rem !important; }
    footer .additives-legend { display: block !important; text-align: left !important; font-size: 8pt !important; }
    #order-summary-container {
        display: block !important; position: static !important; box-shadow: none !important;
        border: none !important; width: 100% !important;
    }
    #print-header {
        display: block !important; text-align: center; border-bottom: 2px solid #000;
        padding-bottom: 1rem; margin-bottom: 2rem;
    }
    #print-header h3 { font-family: 'Satisfy', cursive; font-size: 22pt; color: #000 !important; }
    #print-header p { font-size: 12pt; color: #000 !important; }
    #order-summary-container .remove-item-btn, #order-summary-container #delivery-selection,
    #order-summary-container #order-summary-text-container, #order-summary-container #order-button-container,
    #order-summary-container .print-btn, #order-summary-container h2 .material-symbols-outlined {
        display: none !important;
    }
}