/* =================== Allgemein =================== */
#fmf-form {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

#fmf-form .fmf-step {
    display: none;
    margin: 16px 0 0 0;
    padding: 24px 16px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 0;
}

#fmf-form .fmf-step.active {
    display: block;
}

#fmf-form .fmf-step p {
    font-size: clamp(.85rem, .9vw, 1.1rem) !important;
    margin-bottom: 0;
    padding: 16px 0 20px 0;
    line-height: 1.25;
}

#fmf-form .fmf-step-progress {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
}

#fmf-form .fmf-step[data-step="START"] h2 {
    margin-bottom: 10px;
    font-size: clamp(1.8rem, 3vw, 3.5rem) !important;
    line-height: 1.1 !important;
}

#fmf-form .fmf-step[data-step="START"] p {
    margin-bottom: 16px;
    font-size: clamp(1rem, 1.15vw, 1.3rem) !important;
}

#fmf-form h2,
#fmf-form h3,
#fmf-form p,
#fmf-form label,
#fmf-form input,
#fmf-form select,
#fmf-form button,
#fmf-form a {
    box-sizing: border-box;
}

/* =================== Fortschrittsbalken =================== */
#fmf-progress-container {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

#fmf-progress {
    width: 0%;
    height: 100%;
    background: #1c1c1c;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* =================== Buttons =================== */
#fmf-form .fmf-btn {
    display: inline-block;
    background: #1c1c1c;
    color: #fff;
    padding: 16px 32px;
    border: none;
    margin-top: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    text-align: center;
    letter-spacing: 0.5px;
    font-weight: normal;
    border-radius: 0 !important;
}

#fmf-form .fmf-btn:hover:not([disabled]) {
    background: #333;
}

#fmf-form .fmf-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.fmf-back {
    background-color: #f1f1f1 !important;
    border: 1px solid #e0e0e0 !important;
    color: #1c1c1c !important;
}

.fmf-back:hover {
    background: #e9e9e9 !important;
    color: #1c1c1c !important;
}

.fmf-btn-secondary {
    background: #fff !important;
    color: #1c1c1c !important;
    border: 1px solid #1c1c1c !important;
}

.fmf-btn-secondary:hover {
    background: #1c1c1c !important;
    color: #fff !important;
}

/* =================== Step Actions =================== */
.fmf-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.fmf-step-actions__left,
.fmf-step-actions__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fmf-step-actions__right {
    margin-left: auto;
}

.fmf-step-actions .fmf-btn {
    margin-top: 0 !important;
}

.fmf-step-actions--finish {
    margin-top: 18px;
}
/* =================== Auswahlkarten =================== */
.fmf-choice-grid {
    display: grid;
    gap: 18px;
    margin: 12px 0 10px;
}

.fmf-choice-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fmf-choice-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fmf-choice-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fmf-choice-grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

#fmf-form .fmf-choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 250px;
    width: 100%;
    padding: 28px 18px 22px;
    margin-top: 0;
    background: #fff;
    color: #1c1c1c;
    border: 1px solid #d8d8d8;
    box-sizing: border-box;
    opacity: 1;

    transition: 
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

#fmf-form .fmf-choice-card:hover:not([disabled]) {
    background: #fff;
    border-color: #1c1c1c;
    box-shadow: 0 0 0 1px #1c1c1c inset;
    transform: scale(1.03);
}

/* Sobald innerhalb des Steps etwas ausgewählt wurde, dimmen wir alle Karten */
#fmf-form .fmf-step.has-selection .fmf-choice-card {
    opacity: 0.5;
}

/* Hover leicht hervorheben */
#fmf-form .fmf-step.has-selection .fmf-choice-card:hover:not([disabled]) {
    opacity: 1;
}

/* Die ausgewählte Karte bleibt immer voll sichtbar */
#fmf-form .fmf-step.has-selection .fmf-choice-card.is-selected,
#fmf-form .fmf-choice-card.is-selected {
    border-color: #1c1c1c !important;
    box-shadow: 0 0 0 2px #1c1c1c inset;
    opacity: 1 !important;
}
#fmf-form .fmf-choice-card.is-selected {
    transform: scale(1.03);
    opacity: 1 !important;
}

.fmf-choice-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 128px;
    margin-bottom: 18px;
}

.fmf-choice-card__icon img {
    display: block;
    width: 128px;
    height: 128px;
    object-fit: contain;
}

.fmf-choice-card__label {
    display: block;
    width: 100%;
    text-align: center;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.3;
    letter-spacing: 0;
    color: #1c1c1c;
    word-break: break-word;
}

/* =================== Inputs =================== */
#fmf-form .fmf-input,
#fmf-form .fmf-email {
    display: block;
    height: 48px;
    width: 100%;
    padding: 4px 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 0;
    box-sizing: border-box;
    font-size: 18px;
    background: #fff;
    transition: border-color .2s;
}

#fmf-form .fmf-input:focus,
#fmf-form .fmf-email:focus {
    outline: none;
    border-color: #1c1c1c;
    background: #fff;
}

.fmf-input::placeholder {
    opacity: 0.4;
}

.fmf-step.active label {
    display: block;
    margin-bottom: 6px;
    font-weight: 400;
    color: #1c1c1c;
    font-size: 1.15rem;
}

.input-wrapper {
    position: relative;
}

/* =================== Select =================== */
.fmf-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-color: #fff !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'><path d='M2 2l5 5 5-5' fill='none' stroke='%231c1c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px 10px !important;

    padding-right: 42px !important;
    cursor: pointer;
}
#fmf-form select.fmf-input.fmf-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
/* =================== Vorschläge / Suggestions =================== */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 9999;
    max-height: 180px;
    overflow-y: auto;
    display: none;
}

.suggestions > div:hover {
    background: #f3f3f3;
}

/* =================== Kontaktlayout =================== */
.fmf-contact-warnings {
    margin-top: 10px;
}

.fmf-contact-warnings .fmf-inline-warning {
    margin-top: 6px;
    margin-bottom: 0;
}
.fmf-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 8px;
}

.fmf-contact-column {
    min-width: 0;
}

.fmf-contact-heading {
    margin: 8px 0 16px;
    font-size: 1.15rem;
    font-weight: 500;
    color: #1c1c1c;
}

.fmf-optional {
    font-weight: 400;
    opacity: 0.75;
    padding: 0 0 3px 0;

}

.fmf-inline-fields {
    display: grid;
    gap: 12px;
}

.fmf-inline-fields--street {
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 12px;
}

.fmf-inline-fields--street > div {
    min-width: 0;
}

.fmf-inline-fields--company {
    grid-template-columns: 1fr 1fr;
}

.fmf-input-small {
    text-align: center;
}

.fmf-inline-warning {
    display: inline-block;
    padding: 8px 12px;
    margin-top: 8px;
    margin-bottom: 0;
    color: #fff;
    background-color: #c62828;
    font-size: 0.95rem;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;

}
.fmf-inline-warning:not([style*="display: none"]) {
    opacity: 1;
    transform: translateY(0);
}

/* =================== Größe Slider =================== */
.fmf-size-slider-wrap {
    position: relative;
    padding: 120px 18px 10px;
}

.fmf-size-slider-track-wrap {
    position: relative;
    width: 100%;
    padding-top: 10px;
}

.fmf-size-slider-value {
    position: absolute;
    top: -86px;
    left: 0;
    transform: none;
    min-width: 150px;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #1c1c1c;
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 500;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
}

.fmf-size-slider-value::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-right: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
    transform: translateX(-50%) rotate(45deg);

}

.fmf-size-slider {
    --fmf-slider-fill: 0%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    outline: none;
    background: linear-gradient(
        to right,
        #1c1c1c 0%,
        #1c1c1c var(--fmf-slider-fill),
        #d9dee7 var(--fmf-slider-fill),
        #d9dee7 100%
    );
}

.fmf-size-slider::-webkit-slider-runnable-track {
    height: 8px;
    background: transparent;
    border-radius: 999px;
}

.fmf-size-slider::-moz-range-track {
    height: 8px;
    background: transparent;
    border-radius: 999px;
}

.fmf-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 5px solid #1c1c1c;
    box-shadow: 0 0 0 5px rgba(28, 28, 28, 0.12);
    cursor: pointer;
    margin-top: -13px;
}

.fmf-size-slider::-moz-range-thumb {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 5px solid #1c1c1c;
    box-shadow: 0 0 0 5px rgba(28, 28, 28, 0.12);
    cursor: pointer;
}

.fmf-size-slider-labels {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 28px;
    color: #646b75;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.fmf-size-slider-labels span {
    position: relative;
    display: inline-block;
    text-align: center;
}

.fmf-size-slider-labels span::before {
    content: '';
    position: absolute;
    top: -26px;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #1c1c1c;
    border-radius: 50%;
    transform: translateX(-50%);
}

@media (max-width: 767px) {
    .fmf-size-slider-wrap {
        padding-top: 96px;
    }

    .fmf-size-slider-value {
        min-width: 140px;
        font-size: 1.8rem;
        top: -74px;
        right: auto;
    }

    .fmf-size-slider-labels {
        font-size: 1rem;
    }
}

/* =================== Upload / Abschluss =================== */
[data-step="UPLOAD"] input[type="file"] {
    display: none !important;
}

.upload-btn {
    display: none !important;
}

.fmf-finish-divider {
    height: 1px;
    background: #e3e3e3;
    margin: 28px 0 34px;
}

.fmf-finish-upload-block h3 {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 500;
    color: #1c1c1c;
}

.fmf-finish-upload-block p {
    padding: 8px 0 18px 0 !important;
}

.fmf-upload-ui {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.fmf-upload-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 2px solid #4a4a4a;
    background: #fff;
    color: #1c1c1c;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fmf-upload-trigger:hover {
    background: #f7f7f7;
    border-color: #1c1c1c;
}

.file-list {
    width: 100%;
}

.fmf-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    background: #fff;
}

.fmf-file-name {
    font-size: 0.98rem;
    color: #1c1c1c;
    word-break: break-word;
}

.fmf-file-remove {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: #1c1c1c;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
}

.upload-error {
    color: #c62828;
    margin-top: 2px;
    font-size: 0.95rem;
}

.fmf-privacy-check {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
    cursor: pointer;
}

.fmf-privacy-check input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    accent-color: #4a86c5;
}

.fmf-privacy-check span {
    display: inline !important;
    font-size: clamp(1rem, 1.3vw, 1.2rem) !important;
    line-height: 1.5;
    padding-top: 0 !important;
    position: static !important;
}

.fmf-privacy-check a {
    color: #4a86c5;
    text-decoration: underline;
}

/* =================== Karte =================== */
#fmf-map {
    height: 520px;
    margin-top: 0;
    border: 1px solid #ccc;
}

.fmf-map-hint {
    margin: 0 0 14px 0;
    padding: 14px 16px;
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #1c1c1c;
    line-height: 1.45;
    font-size: 0.98rem;
}

.fmf-map-hint strong {
    display: inline-block;
    margin-bottom: 4px;
}

#fmf-map .leaflet-pm-toolbar {
    margin-top: 10px;
    margin-left: 10px;
}

#fmf-map .leaflet-control-layers {
    margin-top: 10px;
    margin-right: 10px;
}

#fmf-map .leaflet-pm-toolbar .button-container {
    box-shadow: none;
}

#fmf-map .leaflet-pm-toolbar .leaflet-pm-icon-marker,
#fmf-map .leaflet-pm-toolbar .leaflet-pm-icon-polygon,
#fmf-map .leaflet-pm-toolbar .leaflet-pm-icon-edit,
#fmf-map .leaflet-pm-toolbar .leaflet-pm-icon-delete {
    filter: saturate(0.2);
}

#fmf-map .leaflet-pm-toolbar .active {
    background: #1c1c1c !important;
    color: #fff !important;
}

#fmf-map .leaflet-bar a,
#fmf-map .leaflet-control-layers-toggle,
#fmf-map .leaflet-control-zoom a {
    border-radius: 0 !important;
}

/* =================== Success =================== */
#fmf-form .fmf-step[data-step="SUCCESS"] {
    padding: 0;
    border: none;
    background: transparent;
}

.fmf-success-wrap {
    position: relative;
    max-width: 100%;
    margin: 40px auto 0;
    padding: 72px 28px 38px;
    background: #fff;
    border: 1px solid #e4e4e4;
    text-align: center;
}

.fmf-success-check {
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: #eef4ea;
    color: #4b7544;
    font-size: 4rem;
    line-height: 108px;
    font-weight: 700;
}

.fmf-success-wrap h2 {
    margin: 0 0 12px;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 500;
    color: #1c1c1c;
}

.fmf-success-wrap p {
    padding: 10px 0 !important;
    font-size: clamp(1rem, 1.4vw, 1.35rem) !important;
    color: #2b2b2b;
}

.fmf-success-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 28px 0 26px;
}

.fmf-success-wrap h3 {
    margin: 0 0 18px;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 600;
    text-align: left;
    color: #1c1c1c;
}

.fmf-success-summary {
    border: 1px solid #e2e2e2;
    background: #fff;
    padding: 18px 20px;
    text-align: left;
}

.fmf-success-summary-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

.fmf-success-summary-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fmf-success-summary-icon img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.fmf-success-summary-text {
    font-size: clamp(1rem, 1.3vw, 1.3rem);
    line-height: 1.45;
    color: #1c1c1c;
}

.fmf-success-summary-text strong {
    font-weight: 700;
}

.fmf-success-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.fmf-success-link-btn,
.fmf-success-primary-btn {
    min-width: 240px;
    min-height: 56px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.fmf-success-link-btn {
    background: #fff;
    color: #587957;
    border: 2px solid #6e8e6c;
}

.fmf-success-link-btn:hover {
    background: #f7faf6;
}

.fmf-success-primary-btn {
    border: none;
    background: #648160;
    color: #fff;
}

.fmf-success-primary-btn:hover {
    background: #587356;
}

/* =================== Exit =================== */
#fmf-form .fmf-exit {
    border: 2px solid red;
    padding: 20px;
    background: #ffe6e6;
    text-align: center;
}

#fmf-reset {
    margin-top: 20px;
    background: #c0392b;
}

#fmf-reset:hover {
    background: #e74c3c;
}

/* =================== Datenschutz Global Reset =================== */
label span {
    display: inline;
    font-size: clamp(12px, 2vw, 18px);
    vertical-align: middle;
    margin: 0;
    position: relative;
    padding-top: 32px;
}

/* =================== Responsive =================== */
@media (max-width: 980px) {
    .fmf-choice-grid--5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fmf-choice-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fmf-contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .fmf-choice-grid--2,
    .fmf-choice-grid--3,
    .fmf-choice-grid--4,
    .fmf-choice-grid--5 {
        grid-template-columns: 1fr;
    }

    #fmf-form .fmf-choice-card {
        min-height: auto;
        padding: 22px 16px 18px;
        transform-origin: center;
    }

    .fmf-choice-card__icon {
        min-height: auto;
        margin-bottom: 14px;
    }

    .fmf-choice-card__icon img {
        width: 96px;
        height: 96px;
    }

    .fmf-step-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .fmf-step-actions__left,
    .fmf-step-actions__right {
        width: 100%;
    }

    .fmf-step-actions__left .fmf-btn,
    .fmf-step-actions__right .fmf-btn {
        width: 100%;
    }

    .fmf-step-actions__right {
        margin-left: 0;
    }

    .fmf-inline-fields--street,
    .fmf-inline-fields--company {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #fmf-map {
        height: 420px;
    }

    .fmf-upload-trigger {
        width: 100%;
        max-width: 320px;
    }

    .fmf-file-item {
        max-width: 100%;
    }

    .fmf-success-wrap {
        padding: 68px 18px 28px;
    }

    .fmf-success-check {
        width: 88px;
        height: 88px;
        top: -32px;
        font-size: 3rem;
        line-height: 88px;
    }

    .fmf-success-summary-item {
        align-items: flex-start;
    }

    .fmf-success-actions {
        flex-direction: column;
    }

    .fmf-success-link-btn,
    .fmf-success-primary-btn {
        width: 100%;
        min-width: 0;
    }

    .fmf-size-slider-wrap {
        padding-top: 96px;
    }

    .fmf-size-slider-value {
        min-width: 140px;
        font-size: 1.8rem;
        top: -74px;
        right: auto;
    }

    .fmf-size-slider-labels {
        font-size: 1rem;
    }
}
#fmf-success-reset, .fmf-success-link-btn {
  border-radius: 0 !important;
}