/* FILE: htdocs/css/embed.css */
/* Modernes, responsives und barrierefreies Design für extern eingebettete Tabellen. */

.price-table-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    color: #37474f;
    margin-bottom: 40px;
    overflow-x: auto;
}

h2.table-date-heading,
.price-table-container > h3 {
    font-size: 1.2em;
    font-weight: 600;
    text-transform: uppercase;
    color: #343a40;
    margin-bottom: 15px;
    margin-top: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
}

.price-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1em;
}

.price-table caption {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/* =================================================================== */
/* 1. ALLGEMEINE TABELLEN-STILE (Für Preislisten etc.)                 */
/* =================================================================== */

.price-table th,
.price-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.price-table th {
    background-color: #343a40;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-table tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

.price-table tbody tr:last-of-type td {
    border-bottom: 0;
}

/* Standard-Layout für Tabellen mit variablen Spalten */
.price-table th:first-child,
.price-table td:first-child {
    width: 45%;
    word-break: break-word;
}

.price-table th:last-child,
.price-table td:last-child {
    width: 15%;
    min-width: 120px;
    text-align: right;
    white-space: nowrap;
}


/* =================================================================== */
/* 2. SPEZIAL-STILE NUR FÜR SPERRMÜLL-KALENDER (#udg-table-sperrmuell_schwedt) */
/* =================================================================== */

/* Wir setzen die Breiten-Vorgaben für die Spalten zurück */
#udg-table-sperrmuell_schwedt .price-table th:first-child,
#udg-table-sperrmuell_schwedt .price-table td:first-child,
#udg-table-sperrmuell_schwedt .price-table th:last-child,
#udg-table-sperrmuell_schwedt .price-table td:last-child {
    width: auto;
    text-align: left;
    /* Links ausrichten statt rechts */
}

/* Erlaubt den Zeilenumbruch für die lange Liste der Termine */
#udg-table-sperrmuell_schwedt .price-table td {
    white-space: normal;
}


/* =================================================================== */
/* 3. MOBILE ANSICHT (Gilt wieder für alle Tabellen)                  */
/* =================================================================== */
@media screen and (max-width: 768px) {

    .price-table,
    .price-table tbody,
    .price-table tr,
    .price-table td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    .price-table {
        border: none;
        box-shadow: none;
    }

    .price-table thead {
        display: none;
    }

    .price-table tr {
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        padding: 10px;
    }

    .price-table td {
        border-bottom: 1px dotted #e9ecef;
        padding: 12px 5px;
        text-align: right;
    }

    .price-table tr td:last-child {
        border-bottom: none;
    }

    .price-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #343a40;
        padding-right: 15px;
    }
}
