.tx-td-vfc,
.td-vfc-plan-dialog {
    --vfc-accent: #005757;
    --vfc-surface: #e5f3f3;
    --vfc-text: #666;
}

.tx-td-vfc {
    min-width: 0;
}

/* Feldbeschriftungen bleiben für Screenreader verfügbar. */
.tx-td-vfc .td-vfc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Fluid erzeugt einen zusätzlichen Container für versteckte Formularwerte. */
.tx-td-vfc .td-vfc-form-hidden {
    display: none;
}

/* Fünf gemeinsame Spalten wie im ursprünglichen Formular. */
.tx-td-vfc #tdCheckForm,
.tx-td-vfc #tdCheckForm .td_Check__container {
    display: grid;
    gap: 16px;
}

.tx-td-vfc #tdCheckForm {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
}

.tx-td-vfc #tdCheckForm .td_Check__container {
    grid-column: span 4;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tx-td-vfc #tdCheckForm .td_Check__container > div {
    min-width: 0;
}

.tx-td-vfc #tdCheckForm :is(.td_Check__container, .tdCheck__submit) {
    width: auto;
    min-width: 0;
}

@media (max-width: 1200px) {
    .tx-td-vfc #tdCheckForm {
        grid-template-columns: 1fr;
    }

    .tx-td-vfc #tdCheckForm .td_Check__container {
        grid-column: auto;
        grid-template-columns: 1fr;
    }
}

/* Hinweise auch bei parallel eingebundenem CSS aus td_check anzeigen. */
.tx-td-vfc .tdCheck__infotext {
    display: block;
}

/* Adressauswahl (Tom Select). */
.tx-td-vfc .ts-control,
.tx-td-vfc .ts-control input {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: var(--vfc-text);
}

.tx-td-vfc .ts-control {
    min-height: 42px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid var(--vfc-text);
    border-radius: 8px;
    transition: border-color .2s ease-in-out;
}

.tx-td-vfc .ts-wrapper.focus .ts-control {
    border-color: var(--vfc-accent);
    outline: 2px solid var(--vfc-accent);
    outline-offset: 2px;
}

.tx-td-vfc .ts-control input {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    appearance: none;
}

.tx-td-vfc .ts-wrapper .ts-control .item {
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tx-td-vfc .ts-wrapper.input-active.dropdown-active .item {
    visibility: hidden;
}

.tx-td-vfc .has-items .ts-control {
    --ts-pr-min: 42px;
}

.tx-td-vfc .ts-wrapper .ts-control .item .remove {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.tx-td-vfc .ts-dropdown {
    font-size: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.tx-td-vfc .ts-dropdown .active {
    background: var(--vfc-accent);
    color: #fff;
}

/* https://stephanwagner.me/only-css-loading-spinner */
@keyframes td-vfc-spinner {
    to {
        transform: rotate(360deg);
    }
}

.tx-td-vfc .ts-wrapper.spinner::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    right: 14px;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border-radius: 50%;
    border-top: 2px solid var(--vfc-accent);
    border-right: 2px solid transparent;
    animation: td-vfc-spinner .4s linear infinite;
    z-index: 5;
}

/* Tarifdialog. */
.td-vfc-plan-dialog {
    box-sizing: border-box;
    width: min(850px, calc(100% - 32px));
    max-height: calc(100% - 48px);
    margin: auto;
    overflow: auto;
    border: 0;
    border-radius: 12px;
    padding: 32px;
    background: #fff;
    color: #333;
    box-shadow: 0 16px 64px rgb(0 0 0 / 20%);
    font: inherit;
}

.td-vfc-plan-dialog::backdrop {
    background: rgb(0 0 0 / 50%);
}

.td-vfc-plan-dialog > form {
    float: right;
    margin: 0 0 16px 24px;
}

.td-vfc-plan-dialog__close {
    display: block;
    margin: 0;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid var(--vfc-accent);
    border-radius: 24px;
    background: #fff;
    color: var(--vfc-accent);
    font: inherit;
    font-weight: 600;
}

.td-vfc-plan-dialog__close:hover {
    background: var(--vfc-surface);
}

.td-vfc-plan-dialog__close:focus-visible {
    outline: 2px solid var(--vfc-accent);
    outline-offset: 3px;
}

.td-vfc-plan-details {
    line-height: 1.5;
}

.td-vfc-plan-details h2 {
    min-height: 42px;
    margin: 0 0 24px;
    color: var(--vfc-accent);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.td-vfc-plan-details__section {
    overflow-x: auto;
}

.td-vfc-plan-details__section + .td-vfc-plan-details__section {
    margin-top: 24px;
}

.td-vfc-plan-details__section h3 {
    margin: 0 0 12px;
    color: var(--vfc-accent);
    font-size: 1.125rem;
}

.td-vfc-plan-details table {
    width: 100%;
    border-collapse: collapse;
}

.td-vfc-plan-details :is(th, td) {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.td-vfc-plan-details tr > :first-child {
    padding-left: 0;
}

.td-vfc-plan-details th {
    width: 44%;
    font-weight: 600;
    color: var(--vfc-accent);
}

.td-vfc-plan-details__price {
    margin-top: 24px;
    padding: 16px;
    border-radius: 8px;
    background: var(--vfc-surface);
    color: var(--vfc-accent);
}

.td-vfc-plan-details :is(td, th) p,
.td-vfc-plan-details__price p,
.tx-td-vfc .td-vfc-footnotes__text p {
    margin: 0;
}

.td-vfc-plan-details__price > p {
    margin-bottom: 8px;
    font-weight: 600;
}

@media (max-width: 575px) {
    .td-vfc-plan-dialog {
        padding: 20px;
    }

    .td-vfc-plan-details h2 {
        font-size: 1.5rem;
    }

    .td-vfc-plan-details :is(th, td) {
        padding: 8px 4px;
    }
}

/* Fußnotenausgabe wie bei td_check. */
.tx-td-vfc .td-vfc-footnotes {
    padding: 70px 0 15px;
    font-size: .8rem;
}

.tx-td-vfc .td-vfc-footnotes__row {
    display: flex;
    padding-bottom: 15px;
}

.tx-td-vfc .td-vfc-footnotes__number {
    flex: 0 0 max(20px, 2%);
}

.tx-td-vfc .td-vfc-footnotes__text {
    flex: 1;
    min-width: 0;
}

.td-vfc-plan-details .td-vfc-footnotes {
    margin-top: 24px;
    padding: 16px 0 0;
    border-top: 1px solid #ddd;
}

/* Tarifboxen bleiben standardmäßig innerhalb der Contentbreite. */
.tx-td-vfc .content-pricing--neu .content-pricing__container {
    margin-inline: 0;
    min-width: 0;
}

/* Swiper setzt Slides sonst auf 100 % Höhe. Kürzere Tarife bleiben kürzer. */
.tx-td-vfc .content-pricing--neu .content-pricing__item--wrapper {
    height: auto;
    align-self: start;
    min-width: 0;
    box-sizing: border-box;
}

.tx-td-vfc .td-vfc-plan-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tx-td-vfc .td-vfc-results-intro {
    margin-bottom: 32px;
}

.tx-td-vfc .td-vfc-results-intro > p {
    margin-bottom: 0;
}

.tx-td-vfc .td-vfc-business-link {
    color: #009b9f;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Nativen Input-Rand entfernen; Tastaturfokus bleibt deutlich sichtbar. */
.tx-td-vfc #tdCheckForm .checkSubmit {
    appearance: none;
    border: 1px solid transparent;
    box-shadow: none;
    width: 100%;
    min-height: 42px;
    padding: 8px 16px;
}

.tx-td-vfc #tdCheckForm .checkSubmit:focus-visible {
    outline: 2px solid var(--vfc-accent);
    outline-offset: 3px;
}

/* Weniger als drei Tarife zentrieren: gleiche Breite wie bei drei Boxen.
   Ab 1051 px zeigt auch das Theme drei Spalten ohne Slider an. */
@media (min-width: 1051px) {
    .tx-td-vfc .content-pricing--neu .content-pricing__items-swiper:is([data-tab-products="1"], [data-tab-products="2"]) .content-pricing__items-wrapper {
        display: grid;
        grid-template-columns: repeat(var(--vfc-visible-columns), minmax(0, calc((100% - 32px) / 3)));
        justify-content: center;
        gap: 16px;
    }

    .tx-td-vfc .content-pricing--neu .content-pricing__items-swiper[data-tab-products="1"] {
        --vfc-visible-columns: 1;
    }

    .tx-td-vfc .content-pricing--neu .content-pricing__items-swiper[data-tab-products="2"] {
        --vfc-visible-columns: 2;
    }

    .tx-td-vfc .content-pricing--neu .content-pricing__items-swiper:is([data-tab-products="1"], [data-tab-products="2"]) .content-pricing__item--wrapper {
        width: auto;
    }
}

.tx-td-vfc .content-pricing--neu .td-vfc-booking-pending:disabled {
    opacity: .65;
    cursor: not-allowed;
    border: 0;
    white-space: normal;
}

/* Nur die tatsächliche Vier-Spalten-Ansicht nutzt die breite Theme-Ansicht. */
@media (min-width: 1351px) {
    .tx-td-vfc .content-pricing--neu .td-vfc-four-columns {
        --vfc-wide-width: min(1380px, calc(100vw - 64px));
        margin-inline: calc((100% - var(--vfc-wide-width)) / 2);
    }
}

/* Leistungsdetails auch per Tastatur zugänglich machen. */
.tx-td-vfc .content-pricing__plan-info-i {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.tx-td-vfc .content-pricing__plan-info-i:focus-visible {
    outline: 2px solid var(--vfc-accent);
    outline-offset: 3px;
}

.tx-td-vfc .content-pricing__plan-info-item .tooltip:focus-within .content-pricing__plan-info-hover {
    opacity: 1;
    visibility: visible;
}

/* Bezeichnungen und ihre Fußnotenziffern zusammenhalten. */
.tx-td-vfc .content-pricing__item--wrapper .content-pricing__speed-download,
.tx-td-vfc :has(> sup),
.tx-td-vfc sup,
.tx-td-vfc .td-vfc-footnotes__number {
    white-space: nowrap;
}

/* Inklusive-Bullet (24 px) an der ersten Titelzeile ausrichten. */
.tx-td-vfc .content-pricing--neu .content-pricing__item--wrapper .content-pricing__inklusive-list {
    line-height: 24px;
}

.tx-td-vfc .content-pricing--neu .content-pricing__inklusive-list li > strong {
    display: block;
    white-space: normal;
}

/* Den Abstand zwischen Inklusivleistungen ausschließlich über die Liste steuern. */
.tx-td-vfc .content-pricing--neu .content-pricing__inklusive-list li > p:last-child {
    margin-bottom: 0;
}

/* Hochgestellte Fußnoten dürfen die erste Zeilenbox nicht vergrößern. */
.tx-td-vfc .content-pricing--neu .content-pricing__inklusive-list sup {
    line-height: 0;
}

/* Preis-Hinweis und Fußnoten am Seitenende als zusammenhängenden Block zeigen. */
.td-vfc-page-footnotes > p {
    font-size: .8rem;
    margin: 0 0 16px;
}

.tx-td-vfc.td-vfc-page-footnotes .td-vfc-footnotes {
    padding-top: 0;
}
