/**
 * CM Speisekarte - Frontend Styles
 *
 * @package CM_Speisekarte
 * @version 1.0.0
 */



/* ========================================
   Main Colors
   ======================================== */

:root {
    --primary-color: #14255e;
}


/* ========================================
   Menu Container
   ======================================== */

.cm-speisekarte {
    max-width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

.cm-no-dishes {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* ========================================
   Groups
   ======================================== */

.cm-speisekarte-group {
    margin-bottom: 40px;
}

.cm-speisekarte-group:last-child {
    margin-bottom: 20px;
}

.cm-group-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.cm-group-description {
    font-style: italic;
    color: #666;
    margin: 0 0 20px;
}

/* ========================================
   Dishes
   ======================================== */

.cm-dishes {
    /* Container for dishes */
}

.cm-dish {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dotted #ccc;
}

.cm-dish:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cm-dish-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.cm-dish-info {
    flex: 1;
}

.cm-dish-name {
    font-weight: 600;
    color: #333;
    margin-bottom: : 0px;
}

.cm-dish-codes {
    font-size: 0.6em;
    color: #333;
    font-weight: normal;
    margin-left: 3px;
    top: -6px;
}

.cm-dish-prices {
    white-space: nowrap;
    font-weight: 600;
    color: #333;
    text-align: right;
}

.cm-dish-price-line {
    display: block;
}

.cm-dish-description {
    font-size: 0.9em;
    color: #333;
    margin: 0;
    font-style: italic;
}

/* ========================================
   Legend
   ======================================== */

.cm-speisekarte-legende {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--primary-color);
}

.cm-legende-title {
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--primary-color);
}

.cm-legende-section {
    margin-bottom: 20px;
}

.cm-legende-section:last-child {
    margin-bottom: 0;
}

.cm-legende-section h4 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--primary-color);
}

.cm-legende-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.cm-legende-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9em;
    color: #555;
}

.cm-legende-code {
    display: inline-block;
    min-width: 24px;
    padding: 2px 6px;
    background: #f5f5f5;
    border-radius: 3px;
    font-weight: 600;
    text-align: center;
    font-size: 0.85em;
    color: #333;
}

.cm-legende-name {
    flex: 1;
}

/* ========================================
   Responsive
   ======================================== */

@media screen and (max-width: 600px) {
    .cm-dish-header {
        flex-direction: column;
        gap: 5px;
    }

    .cm-dish-prices {
        align-self: flex-end;
    }

    .cm-legende-list {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .cm-speisekarte {
        max-width: 100%;
    }

    .cm-group-title {
        page-break-after: avoid;
    }

    .cm-dish {
        page-break-inside: avoid;
    }

    .cm-speisekarte-legende {
        page-break-before: always;
    }
}
