/**
 * [cottage_preisliste] – Preisliste
 *
 * Kopf, „Gut zu wissen“, Kategorie-Tabs, Abschnitte als weiße Karten mit
 * Tabellen; am Handy werden Tabellenzeilen zu Karten (data-label). Farben und
 * Radien wie die Kategorie-Liste (#495E77 / #769cc1, 15/12/10 px). Die Liste
 * liegt auf dem Divi-Sektionshintergrund (#e5eaee).
 *
 * Divi 5 setzt inline .entry-content table:not(.variations) (0,2,1),
 * .entry-content tr td / thead th (0,1,2), h1–h6 { padding-bottom:10px;
 * line-height:1em; color:#333 } und a { color:#2ea3f2 } – daher Dreifach-Klasse
 * für die Tabelle, Überschriften-Resets und !important auf Link-/Button-Farben.
 */

.cottage-pricelist {
    --cpl-lead: #495E77;
    --cpl-secondary: #769cc1;
    --cpl-text: #2f3a47;
    --cpl-muted: #6b7a8c;
    --cpl-line: rgba(73, 94, 119, 0.14);
    --cpl-card: #ffffff;
    --cpl-tint: #f1f4f7;
    --cpl-tint-2: #f7f9fb;
    --cpl-shadow: 0 4px 15px rgba(0, 0, 0, 0.10);
    --cpl-r: 15px;
    --cpl-r-m: 12px;
    --cpl-r-s: 10px;

    font-family: 'Montserrat', sans-serif;
    color: var(--cpl-text);
    line-height: 1.5;
    padding: 4px 0;
}

.cottage-pricelist *,
.cottage-pricelist *::before,
.cottage-pricelist *::after {
    box-sizing: border-box;
}

/* Divi-Grundregeln (p { padding-bottom: 1em }, .entry-content ul { padding … }) neutralisieren */
.cottage-pricelist p {
    padding: 0;
}

.cpl-print-title {
    display: none;
}

.cottage-pricelist-notice {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #8a5a00;
    background: #fcf0d8;
    border-radius: 10px;
    padding: 12px 16px;
}

/* ---------------------------------------------------------------- Kopf */

.cpl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin: 0 0 24px;
}

.cpl-header-text {
    min-width: 0;
}

.cpl-subtitle {
    margin: 0 0 6px;
    font-size: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
    font-weight: 600;
    color: var(--cpl-lead);
}

.cpl-meta {
    margin: 0;
    font-size: 0.9rem;
    color: var(--cpl-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em 0.6em;
}

.cpl-meta time {
    font-weight: 600;
    color: var(--cpl-text);
}

/* ---------------------------------------------------------------- Buttons (Farben mit !important: Theme setzt Link-Farben global) */

.cottage-pricelist .cpl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7em 2.1em;
    border-radius: 10px;
    background: var(--cpl-lead) !important;
    color: #ffffff !important;
    border: 2px solid var(--cpl-lead);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cottage-pricelist .cpl-btn:hover,
.cottage-pricelist .cpl-btn:focus-visible {
    background: var(--cpl-secondary) !important;
    border-color: var(--cpl-secondary);
    color: #ffffff !important;
}

.cottage-pricelist .cpl-btn--ghost {
    background: transparent !important;
    color: var(--cpl-lead) !important;
}

.cottage-pricelist .cpl-btn--ghost:hover,
.cottage-pricelist .cpl-btn--ghost:focus-visible {
    background: var(--cpl-lead) !important;
    border-color: var(--cpl-lead);
    color: #ffffff !important;
}

.cottage-pricelist .cpl-btn:focus-visible,
.cottage-pricelist .cpl-tab:focus-visible {
    outline: 3px solid var(--cpl-secondary);
    outline-offset: 3px;
}

/* ---------------------------------------------------------------- Gut zu wissen */

.cpl-notes {
    background: var(--cpl-card);
    border-radius: var(--cpl-r);
    box-shadow: var(--cpl-shadow);
    padding: 18px 24px;
    margin: 0 0 28px;
}

.cpl-notes-title {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cpl-lead);
}

.cpl-notes-title::-webkit-details-marker {
    display: none;
}

.cpl-notes-title::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--cpl-secondary);
    border-bottom: 2px solid var(--cpl-secondary);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-right: 4px;
}

.cpl-notes[open] .cpl-notes-title::after {
    transform: rotate(-135deg);
}

.cottage-pricelist .cpl-notes-list {
    margin: 12px 0 0;
    padding: 0 0 0 1.2em;
    list-style: disc;
    font-size: 0.92rem;
    line-height: 1.55;
}

.cpl-notes-list li {
    margin: 0 0 6px;
}

/* ---------------------------------------------------------------- Tabs */

.cpl-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}

.cottage-pricelist .cpl-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55em 1.1em;
    border-radius: 10px;
    border: 2px solid var(--cpl-lead);
    background: transparent !important;
    color: var(--cpl-lead) !important;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cottage-pricelist .cpl-tab:hover {
    background: var(--cpl-secondary) !important;
    border-color: var(--cpl-secondary);
    color: #ffffff !important;
}

.cottage-pricelist .cpl-tab.is-active,
.cottage-pricelist .cpl-tab[aria-selected="true"] {
    background: var(--cpl-lead) !important;
    border-color: var(--cpl-lead);
    color: #ffffff !important;
}

/* ---------------------------------------------------------------- Panels */

.cottage-pricelist.cpl--js .cpl-panel[hidden] {
    display: none;
}

.cpl-panel {
    outline: none;
}

.cottage-pricelist .cpl-category-title {
    margin: 0 0 6px;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--cpl-lead);
}

.cottage-pricelist .cpl--tabs .cpl-category-title,
.cottage-pricelist.cpl--tabs .cpl-category-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.cpl-summary {
    margin: 0 0 20px;
    font-size: 0.95rem;
    color: var(--cpl-muted);
    max-width: 70ch;
}

/* ---------------------------------------------------------------- Abschnitt */

.cpl-section {
    background: var(--cpl-card);
    border-radius: var(--cpl-r);
    box-shadow: var(--cpl-shadow);
    padding: 24px 28px 8px;
    margin: 0 0 24px;
}

.cpl-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 0 0 16px;
}

.cpl-section-text {
    min-width: 0;
    flex: 1 1 320px;
}

.cottage-pricelist .cpl-section-title {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--cpl-lead);
}

.cpl-code {
    display: inline-grid;
    place-items: center;
    min-width: 2em;
    height: 2em;
    padding: 0 0.4em;
    border-radius: 8px;
    background: var(--cpl-tint);
    font-size: 0.7em;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.cpl-section-subtitle {
    margin: 4px 0 0;
    font-size: 0.92rem;
    color: var(--cpl-muted);
}

.cpl-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.cottage-pricelist .cpl-actions .cpl-btn {
    min-height: 40px;
    padding: 0.55em 1.4em;
    font-size: 13px;
}

/* ---------------------------------------------------------------- Tabelle */

.cpl-table-wrap {
    margin: 0 -28px;
    padding: 0 28px 20px;
    overflow-x: auto;
}

.cottage-pricelist .cpl-table-wrap .cpl-table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--cpl-r-m);
    overflow: hidden;
    font-size: 0.95rem;
    background: transparent;
}

.cottage-pricelist .cpl-table .cpl-th {
    background: var(--cpl-tint);
    color: var(--cpl-lead);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--cpl-line);
    white-space: nowrap;
}

.cottage-pricelist .cpl-table .cpl-th--price {
    text-align: right;
}

.cottage-pricelist .cpl-table .cpl-cell {
    padding: 12px 14px;
    border: 0;
    border-top: 1px solid var(--cpl-line);
    vertical-align: top;
    text-align: left;
    font-weight: 500;
    color: var(--cpl-text);
    background: transparent;
}

.cottage-pricelist .cpl-table tbody tr:first-child .cpl-cell {
    border-top: 0;
}

.cottage-pricelist .cpl-table .cpl-cell--code {
    width: 3.5em;
    color: var(--cpl-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cottage-pricelist .cpl-table .cpl-cell--name {
    font-weight: 600;
}

.cpl-name {
    display: block;
}

.cpl-desc {
    display: block;
    margin-top: 3px;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--cpl-muted);
    line-height: 1.45;
    max-width: 48ch;
}

.cottage-pricelist .cpl-table .cpl-cell--price {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--cpl-lead);
}

.cpl-prefix {
    font-weight: 500;
    color: var(--cpl-muted);
    font-size: 0.85em;
    margin-right: 0.2em;
}

.cottage-pricelist .cpl-table .cpl-cell--text {
    font-size: 0.9rem;
}

.cottage-pricelist .cpl-table .cpl-cell--empty {
    color: var(--cpl-muted);
    font-weight: 400;
}

.cottage-pricelist .cpl-table .cpl-row--note .cpl-cell {
    background: var(--cpl-tint-2);
    font-size: 0.88rem;
    color: var(--cpl-muted);
}

.cottage-pricelist .cpl-table .cpl-row--note .cpl-name {
    font-weight: 600;
    color: var(--cpl-text);
}

@media (hover: hover) {
    .cottage-pricelist .cpl-table .cpl-row:hover .cpl-cell {
        background: var(--cpl-tint-2);
    }
}

.cpl-footnote {
    margin: -8px 0 28px;
    font-size: 0.85rem;
    color: var(--cpl-muted);
}

.cpl-footer {
    margin: 24px 0 0;
    font-size: 0.8rem;
    color: var(--cpl-muted);
    text-align: center;
}

.cpl-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------------------------------------------------------------- Einbettung (section= / service=, z. B. auf Leistungsseiten) */

/* Divi-5-Flex-Spalten (min-width: auto) würden die Tabelle sonst über die Spalte hinaus schieben */
.cottage-pricelist.cpl--embed {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.cottage-pricelist.cpl--embed > .cpl-section {
    margin: 0 0 20px;
}

.cottage-pricelist.cpl--embed > .cpl-section:last-of-type {
    margin-bottom: 0;
}

/* Fußnote einer zugeordneten Kategorie (service=) direkt nach ihren Abschnitten */
.cottage-pricelist.cpl--embed > .cpl-footnote {
    margin: -8px 0 20px;
}

.cottage-pricelist.cpl--embed > .cpl-section:last-of-type + .cpl-footnote {
    margin-top: 12px;
}

.cottage-pricelist.cpl--embed > .cpl-footnote:last-child {
    margin-bottom: 0;
}

.cottage-pricelist.cpl--embed .cpl-embed-more {
    margin: 14px 0 0;
    font-size: 0.9rem;
}

/* Divi 5: a, .et-db #et-boc .et-l a { color } (1,3,1) – nur !important greift */
.cottage-pricelist .cpl-embed-link {
    color: var(--cpl-lead) !important;
    font-weight: 600;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.cottage-pricelist .cpl-embed-link:hover,
.cottage-pricelist .cpl-embed-link:focus-visible {
    color: var(--cpl-secondary) !important;
}

.cottage-pricelist .cpl-embed-link:focus-visible {
    outline: 3px solid var(--cpl-secondary);
    outline-offset: 3px;
}

@media print {
    .cottage-pricelist .cpl-embed-more {
        display: none;
    }
}

/* ---------------------------------------------------------------- Tablet */

@media (max-width: 980px) {
    .cpl-section {
        padding: 20px 22px 4px;
    }

    .cpl-table-wrap {
        margin: 0 -22px;
        padding: 0 22px 18px;
    }

    .cottage-pricelist .cpl-table .cpl-th,
    .cottage-pricelist .cpl-table .cpl-cell {
        padding: 10px 12px;
    }
}

/* ---------------------------------------------------------------- Handy: Karten statt Tabellenzeilen */

@media (max-width: 767px) {
    .cpl-header {
        flex-direction: column;
    }

    .cottage-pricelist .cpl-btn--pdf {
        width: 100%;
    }

    .cpl-notes {
        padding: 14px 18px;
        margin-bottom: 20px;
    }

    .cpl-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        margin: 0 -1.5rem 20px;
        padding: 4px 1.5rem 12px;
    }

    .cpl-tabs::-webkit-scrollbar {
        display: none;
    }

    .cottage-pricelist .cpl-tab {
        scroll-snap-align: start;
    }

    .cpl-section {
        padding: 18px 16px 4px;
        border-radius: var(--cpl-r-m);
    }

    .cpl-section-head {
        margin-bottom: 14px;
    }

    .cpl-actions {
        width: 100%;
        flex-direction: column;
    }

    .cottage-pricelist .cpl-actions .cpl-btn {
        width: 100%;
    }

    .cpl-table-wrap {
        margin: 0;
        padding: 0 0 14px;
        overflow: visible;
    }

    .cottage-pricelist .cpl-table-wrap .cpl-table,
    .cottage-pricelist .cpl-table tbody {
        display: block;
        border-radius: 0;
        overflow: visible;
    }

    .cottage-pricelist .cpl-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .cottage-pricelist .cpl-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .cottage-pricelist .cpl-table .cpl-row {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        column-gap: 10px;
        align-items: baseline;
        border: 1px solid var(--cpl-line);
        border-radius: var(--cpl-r-s);
        background: #ffffff;
    }

    .cottage-pricelist .cpl-table .cpl-cell,
    .cottage-pricelist .cpl-table tbody tr:first-child .cpl-cell {
        border: 0;
    }

    .cottage-pricelist .cpl-table .cpl-cell--code,
    .cottage-pricelist .cpl-table .cpl-cell--name {
        display: block;
    }

    .cottage-pricelist .cpl-table .cpl-cell--code {
        width: auto;
        padding: 12px 0 6px 14px;
    }

    .cottage-pricelist .cpl-table .cpl-cell--code:empty {
        display: none;
    }

    .cottage-pricelist .cpl-table .cpl-cell--code:empty + .cpl-cell--name {
        grid-column: 1 / -1;
        padding-left: 14px;
    }

    .cottage-pricelist .cpl-table .cpl-cell--name {
        padding: 12px 14px 8px 0;
    }

    .cottage-pricelist .cpl-table .cpl-cell--price,
    .cottage-pricelist .cpl-table .cpl-cell--text,
    .cottage-pricelist .cpl-table .cpl-cell--note {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
        padding: 7px 14px;
        border-top: 1px dashed var(--cpl-line);
        white-space: normal;
        text-align: right;
    }

    /* die Desktop-Regel "erste Zeile ohne Oberkante" (0,4,2) darf die gestrichelte Linie nicht schlucken */
    .cottage-pricelist .cpl-table tbody tr:first-child .cpl-cell--price,
    .cottage-pricelist .cpl-table tbody tr:first-child .cpl-cell--text,
    .cottage-pricelist .cpl-table tbody tr:first-child .cpl-cell--note {
        border-top: 1px dashed var(--cpl-line);
    }

    .cottage-pricelist .cpl-table .cpl-cell[data-label]::before {
        content: attr(data-label);
        flex: 1 1 auto;
        text-align: left;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--cpl-muted);
    }

    .cottage-pricelist .cpl-table .cpl-row .cpl-cell--empty,
    .cottage-pricelist .cpl-table tbody tr:first-child .cpl-cell--empty {
        display: none;
    }

    .cottage-pricelist .cpl-table .cpl-row--note {
        display: block;
    }

    .cottage-pricelist .cpl-table .cpl-row--note .cpl-cell--code {
        display: none;
    }

    .cottage-pricelist .cpl-table .cpl-row--note .cpl-cell--note,
    .cottage-pricelist .cpl-table tbody tr:first-child.cpl-row--note .cpl-cell--note {
        display: block;
        border-top: 0;
        text-align: left;
        padding: 10px 14px;
    }
}

@media (max-width: 600px) {
    .cottage-pricelist {
        font-size: 0.95rem;
    }

    .cottage-pricelist .cpl-section-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 380px) {
    .cottage-pricelist .cpl-tab {
        padding: 0.5em 0.8em;
        font-size: 0.78rem;
    }

    .cottage-pricelist .cpl-table .cpl-cell--price,
    .cottage-pricelist .cpl-table .cpl-cell--text {
        padding: 6px 12px;
    }
}

/* ---------------------------------------------------------------- Druck */

@media print {
    .cpl-tabs,
    .cpl-actions,
    .cottage-pricelist .cpl-btn--pdf {
        display: none !important;
    }

    .cpl-print-title {
        display: block;
        margin: 0 0 8px;
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--cpl-lead);
    }

    .cottage-pricelist.cpl--js .cpl-panel[hidden] {
        display: block !important;
    }

    .cottage-pricelist.cpl--tabs .cpl-category-title {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }

    .cpl-panel + .cpl-panel {
        break-before: page;
    }

    .cottage-pricelist .cpl-table .cpl-row {
        break-inside: avoid;
    }

    .cottage-pricelist .cpl-table thead {
        display: table-header-group;
    }

    .cpl-section,
    .cpl-notes {
        box-shadow: none;
        border: 1px solid #cfd6de;
    }

    .cottage-pricelist .cpl-table .cpl-cell--price {
        color: #000;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cottage-pricelist .cpl-tab,
    .cottage-pricelist .cpl-btn,
    .cpl-notes-title::after {
        transition: none;
    }
}
