:root {
    --fd-yellow: #e3bf00;
    --fd-ink: #151515
}

/* Gelb bei Bedarf auf exakten Logo-Farbwert einstellen */
.fd-kontakt,
.fd-kontakt *,
.fd-modal,
.fd-modal * {
    box-sizing: border-box
}

.fd-kontakt {
    --fd-width: 430px;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9995;
    width: var(--fd-width);
    height: 365px;
    pointer-events: none;
    overflow: visible;
    color: var(--fd-ink);
    font-family: Arial, sans-serif
}

.fd-panel {
    position: absolute;
    right: -15px;
    top: 0;
    width: var(--fd-width);
    height: 100%;
    background: var(--fd-yellow);
    border: 2px solid white;
    border-radius: 10px 0 0 10px;
    box-shadow: 0 7px 17px #0004;
    transform: translateX(calc(100% - 60px));
    transition: transform .65s ease;
    pointer-events: none;
    overflow: hidden
}

.fd-kontakt[data-open="true"] .fd-panel {
    transform: translateX(0);
    pointer-events: auto
}

.fd-inner {
    padding: 65px 12px 28px 92px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: none
}

.fd-kontakt[data-visible="true"] .fd-inner {
    opacity: 1;
    visibility: visible
}

.fd-inner strong {
    font-size: 20px
}

.fd-inner>a {
    font-size: 17px;
    color: inherit;
    text-decoration: none
}

.fd-inner>a:hover {
    text-decoration: underline
}

.fd-actions {
    display: flex;
    gap: 17px;
    align-items: flex-start;
    margin-top: 7px
}

.fd-actions a,
.fd-actions button {
    font: inherit;
    font-weight: bold;
    color: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 72px;
    padding: 0
}

.fd-actions span {
    font-size: 28px;
    line-height: 1
}

.fd-actions small {
    font-size: 14px
}

.fd-tab {
    position: absolute;
    right: 0;
    left: auto;
    top: 0;
    height: 100%;
    width: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 19px;
    background: transparent;
    border: 0;
    color: var(--fd-ink);
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    pointer-events: auto;
    transition: transform .65s ease
}

.fd-tab>span:first-child {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 1px
}

.fd-arrow {
    font-size: 15px;
    transition: transform .3s
}

.fd-kontakt[data-open="true"] .fd-arrow {
    transform: rotate(180deg)
}

.fd-modal[hidden] {
    display: none
}

.fd-modal {
    position: fixed;
    inset: 0;
    background: #0009;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: Arial, sans-serif;
    color: #151515
}

.fd-dialog {
    position: relative;
    background: #fff;
    border-radius: 15px;
    padding: 24px;
    max-width: 510px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px #0005
}

.fd-dialog h2 {
    font-size: 24px;
    margin: 0 0 12px
}

.fd-dialog p {
    margin: 0 0 15px
}

.fd-dialog label {
    display: block;
    margin: 10px 0;
    font-weight: 600
}

.fd-dialog input:not([type=checkbox]),
.fd-dialog textarea {
    display: block;
    width: 100%;
    padding: 9px;
    border: 1px solid #777;
    border-radius: 5px;
    font: inherit
}

.fd-dialog fieldset {
    border: 1px solid #aaa;
    border-radius: 6px
}

.fd-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px
}

.fd-days label {
    font-weight: normal
}

.fd-hours {
    display: flex;
    gap: 14px
}

.fd-hours label {
    flex: 1
}

.fd-consent {
    font-weight: normal !important;
    font-size: 14px
}

.fd-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px
}

.fd-buttons button {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #555;
    cursor: pointer
}

.fd-buttons button[type=submit] {
    background: var(--fd-yellow);
    font-weight: bold
}

.fd-close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer
}

.fd-feedback {
    font-weight: bold
}

.fd-hp {
    position: absolute;
    left: -10000px
}

@media(max-width:600px) {
    .fd-kontakt {
        top: auto;
        bottom: 16px;
        transform: none;
        height: 345px;
        max-width: 100vw
    }

    .fd-panel {
        max-width: 100vw
    }

    .fd-kontakt {
        --fd-width: min(430px, 100vw)
    }

    .fd-inner {
        padding: 45px 10px 15px 73px;
        gap: 11px
    }

    .fd-inner strong {
        font-size: 17px
    }

    .fd-inner>a {
        font-size: clamp(12px, 3.2vw, 16px)
    }

    .fd-actions {
        gap: 8px
    }

    .fd-actions a,
    .fd-actions button {
        min-width: 60px
    }

    .fd-actions small {
        font-size: 12px
    }
}

@media(prefers-reduced-motion:reduce) {

    .fd-panel,
    .fd-arrow {
        transition: none
    }
}

/* Lasche bleibt im geschlossenen Zustand am sichtbaren rechten Rand. */
.fd-kontakt[data-open="true"] .fd-tab {
    transform: translateX(calc(60px - var(--fd-width)))
}

/* v1.0.3: kompakte, stabile Breite und inhaltsabhängige Höhe */
.fd-kontakt {
    --fd-width: 405px;
    height: 320px
}

.fd-inner {
    padding: 30px 12px 24px 76px;
    gap: 12px
}

@media(max-width:600px) {
    .fd-kontakt {
        --fd-width: min(405px, 100vw);
        height: 320px
    }

    .fd-inner {
        padding: 25px 8px 20px 69px;
        gap: 10px
    }
}

/* v1.0.4: kompakte Lasche im Ruhezustand, enge Innenraender beim Oeffnen */
.fd-kontakt {
    height: 155px;
    transition: height .35s ease
}

.fd-kontakt[data-open="true"] {
    height: var(--fd-expanded-height, 270px)
}

.fd-inner {
    padding: 14px 12px 14px 70px;
    gap: 10px
}

.fd-actions {
    margin-top: 2px;
    gap: 13px
}

.fd-tab {
    gap: 12px
}

@media(max-width:600px) {
    .fd-kontakt {
        height: 155px
    }

    .fd-kontakt[data-open="true"] {
        height: var(--fd-expanded-height, 270px)
    }

    .fd-inner {
        padding: 12px 8px 12px 66px;
        gap: 9px
    }
}

@media(prefers-reduced-motion:reduce) {
    .fd-kontakt {
        transition: none
    }
}

/* v1.0.5: 60px weniger Ausfahrbreite, mobile Darstellung */
.fd-kontakt {
    --fd-width: 345px
}

.fd-inner {
    padding-left: 65px;
    padding-right: 10px
}

.fd-inner>a {
    font-size: 15px
}

.fd-actions {
    gap: 10px
}

@media(max-width:600px) {
    .fd-kontakt {
        --fd-width: min(345px, 100vw)
    }

    .fd-inner {
        padding-left: 64px;
        padding-right: 8px
    }

    .fd-inner>a {
        font-size: clamp(12px, 3.6vw, 15px);
        white-space: normal;
        overflow-wrap: anywhere
    }

    .fd-inner strong {
        font-size: 17px
    }

    .fd-actions {
        gap: 5px;
        justify-content: flex-start
    }

    .fd-actions a,
    .fd-actions button {
        min-width: 60px
    }
}

/* v1.0.6: 40px schmaler; auf Smartphones ausblenden */
@media (min-width:768px) {
    .fd-kontakt {
        --fd-width: 305px
    }

    .fd-inner {
        padding-left: 62px;
        padding-right: 7px
    }

    .fd-inner>a {
        font-size: 14px;
        letter-spacing: -.25px
    }

    .fd-actions {
        gap: 5px
    }

    .fd-actions a,
    .fd-actions button {
        min-width: 65px
    }

    .fd-actions small {
        font-size: 13px
    }
}


/* @media (max-width:767px) {

    .fd-kontakt,
    .fd-modal {
        display: none !important
    }
} */

/* Eingeklappt: halbtransparent */
.fd-panel {
    opacity: 0.5;
    transition: transform .65s ease, opacity .65s ease;
}

/* Ausgeklappt: vollständig undurchsichtig */
.fd-kontakt[data-open="true"] .fd-panel {
    opacity: 1;
}

@media (max-width: 767px) {
    .fd-kontakt {
        position: fixed;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }
}
/* v1.0.7: Krankenfahrt-Testdialog; bestehende Kontaktlasche bleibt unverändert. */
.fd-trip-dialog { max-width: 560px; overscroll-behavior: contain; }
.fd-trip-dialog fieldset { margin: 0 0 14px; padding: 10px 14px 14px; min-width: 0; }
.fd-trip-dialog legend { font-weight: bold; padding: 0 5px; }
.fd-trip-dialog .fd-trip-note { font-size: 14px; line-height: 1.45; }
.fd-trip-dialog select { display:block; width:100%; padding: 10px; border: 1px solid #777; border-radius: 5px; font: inherit; background: #fff; }
.fd-trip-dialog .fd-trip-check { display: flex; align-items: flex-start; gap: 10px; font-weight: normal; }
.fd-trip-dialog .fd-trip-check input { flex: none; margin-top: 4px; width: 18px; height: 18px; }
.fd-trip-dialog input:not([type=checkbox]), .fd-trip-dialog select { min-height: 44px; font-size: 16px; }
@media(max-width:767px) {
  #fd-trip-modal { padding: 8px; align-items: center; }
  .fd-trip-dialog { width:100%; max-width:none; max-height:calc(100dvh - 16px); padding: 18px 14px 20px; border-radius: 12px; }
  .fd-trip-dialog h2 { font-size: 21px; padding-right: 25px; }
  .fd-trip-dialog fieldset { padding: 9px 10px 12px; }
  .fd-trip-dialog .fd-buttons { flex-wrap:wrap; }
  .fd-trip-dialog .fd-buttons button { min-height:44px; }
}

/* v1.0.9: Datums- und Zeitfelder 15 px schmaler, ohne Überstand. */
.fd-trip-dialog input[type="date"],
.fd-trip-dialog input[type="time"] {
    box-sizing: border-box;
    width: calc(100% - 15px);
    max-width: calc(100% - 15px);
    min-width: 0;
}

/* Kalender-Icon der Fahrtanfrage */
.fd-actions .fd-trip-icon { display: inline-flex; align-items: center; justify-content: center; height: 28px; }
.fd-actions .fd-trip-icon svg { display: block; width: 28px; height: 28px; }

/* v1.0.11: einheitliche schwarze Kontakt-Symbole, ohne Layoutänderung */
.fd-inner .fd-black-icon { display:inline-block; vertical-align:middle; color:#000; flex-shrink:0; }
.fd-actions .fd-black-icon { width:28px; height:28px; }


/* Schwarze Kontakt-Symbole */
.fd-inner .fd-black-icon {
    display: inline-block;
    vertical-align: middle;
    color: #000;
    flex-shrink: 0;
}

/* Allgemeine Icon-Größe */
.fd-actions .fd-black-icon {
    width: 28px;
    height: 28px;
}

/* Mobiltelefon */
.fd-actions .fd-mobile-icon {
    width: 28px;
    height: 28px;
    color: #000;
}
