/* bagd.css - responsive Joomla booking layout
 * Updated 2026-08-22
 * Scope: BAGD booking form + booking calendar only.
 */

.button_buchung {
    color: #fff;
    background-image: none;
    border-color: #76120c;
    background: #d22116;
    display: inline-block;
    padding: 6px 15px;
    line-height: 1.7em;
    font-size: 0.8em;
    border-radius: 3px;
    text-transform: uppercase;
    position: relative;
    border: 0;
    box-sizing: border-box;
    text-decoration: none;
}

/* --- Formular --------------------------------------------------------- */
.bagd-booking-form,
.bagd-booking-form form,
.bagd-form-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.bagd-form-table {
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: auto;
}

.bagd-form-table > tbody > tr > td,
.bagd-form-table > tr > td {
    box-sizing: border-box;
    min-width: 0;
    padding: 5px 8px;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: normal;
}

.bagd-form-table .label_draisine,
.bagd-form-table td.label {
    width: 34%;
    max-width: 34%;
    text-align: left;
}

.bagd-form-table .bagd-form-value {
    width: 66%;
    max-width: 66%;
    text-align: left;
}

.bagd-form-table input,
.bagd-form-table select,
.bagd-form-table textarea,
.bagd-form-table button {
    max-width: 100%;
    box-sizing: border-box;
}

.bagd-form-table input.volle_breite,
.bagd-form-table textarea.volle_breite,
.bagd-form-table select.volle_breite,
.bagd-form-table .bagd-form-value select,
.bagd-form-table .bagd-form-value textarea {
    width: 100%;
}

.bagd-form-table input[type="checkbox"],
.bagd-form-table input[type="radio"] {
    width: auto;
    max-width: none;
}

.bagd-form-info,
.bagd-form-line,
.bagd-form-buttons {
    width: 100%;
}

/* --- Kalender --------------------------------------------------------- */
.bagd-calendar-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.buchung_table {
    color: #333;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
}

.buchung_table > tbody > tr,
.buchung_table > tr {
    width: 100%;
}

.buchung_table > tbody > tr > td.buchung_td,
.buchung_table > tr > td.buchung_td {
    width: 33.333%;
    max-width: 33.333%;
    min-width: 0;
    padding: 5px;
    vertical-align: top;
    background: transparent;
    box-sizing: border-box;
}

.buchung_table_inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
}

.buchung_table_inner td,
.buchung_table_inner th {
    width: 14.2857%;
    min-width: 0;
    height: 30px;
    padding: 3px 2px;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
}

.buchung_table_inner td {
    background: #fafafa;
}

.buchung_table_inner td[colspan] {
    width: auto;
}

.buchung_table_inner td.buchung_th_inner[colspan="7"] {
    width: 100%;
}

.buchung_table_inner tr.buchung_tr_inner th,
.buchung_table_inner .buchung_th_inner {
    background: #dfdfdf;
    font-weight: bold;
    text-align: center;
}

.buchung_table_inner tr.buchung_tr_inner:nth-child(even) td {
    background: #f1f1f1;
}

.buchung_table_inner .text_decoration {
    cursor: pointer;
}

.buchung_table_inner .text_decoration:hover {
    background: #666 !important;
    color: #fff;
}

.buchung_table_inner .text_decoration:hover a {
    color: #fff;
}

.buchung_table_inner .text_decoration a {
    display: block;
    width: 100%;
    text-align: center;
}

.bagd-calendar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* --- Smartphone / schmale Joomla-Contentbereiche -------------------- */
@media (max-width: 767px) {
    .bagd-booking-form,
    .bagd-booking-form form,
    .bagd-form-table,
    .bagd-calendar-wrap,
    .buchung_table,
    .buchung_table_inner {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .bagd-form-table,
    .bagd-form-table > tbody,
    .bagd-form-table > tbody > tr,
    .bagd-form-table > tbody > tr > td,
    .bagd-form-table > tr,
    .bagd-form-table > tr > td {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .bagd-form-table .label_draisine,
    .bagd-form-table td.label {
        width: 100% !important;
        max-width: 100% !important;
        padding-bottom: 2px;
        font-weight: 600;
    }

    .bagd-form-table .bagd-form-value {
        width: 100% !important;
        max-width: 100% !important;
        padding-top: 2px;
        padding-bottom: 10px;
    }

    .bagd-form-table input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
    .bagd-form-table select,
    .bagd-form-table textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        font-size: 16px;
    }

    /* Die drei Monatskalender werden auf Mobilgeraeten untereinander dargestellt. */
    .buchung_table,
    .buchung_table > tbody,
    .buchung_table > tbody > tr,
    .buchung_table > tr {
        display: block;
    }

    .buchung_table > tbody > tr > td.buchung_td,
    .buchung_table > tr > td.buchung_td {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0 0 14px 0;
    }

    .buchung_table_inner {
        display: table;
        table-layout: fixed;
    }

    .buchung_table_inner tbody {
        display: table-row-group;
    }

    .buchung_table_inner tr {
        display: table-row;
    }

    .buchung_table_inner td,
    .buchung_table_inner th {
        display: table-cell;
        width: 14.2857% !important;
        max-width: 14.2857% !important;
        padding: 6px 1px;
        font-size: 0.95rem;
    }

    .button_buchung {
        flex: 1 1 auto;
        text-align: center;
        white-space: normal;
    }
}
