/**
 * Widerrufsformular – Footer-Modal (FF-Stil, angelehnt an Consent-Gate + Kontakt).
 */

html body footer#ff-footer .ff-footer-widerruf-trigger {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #000 !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-style: normal !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 22px !important;
    text-decoration: none !important;
    -webkit-appearance: none;
    appearance: none;
}

html body footer#ff-footer .ff-footer-widerruf-trigger:hover,
html body footer#ff-footer .ff-footer-widerruf-trigger:focus-visible {
    color: #b43526 !important;
    outline: none;
}

.ff-widerruf {
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 24px);
    font-family: 'Barlow Semi Condensed', sans-serif;
}

.ff-widerruf[hidden] {
    display: none !important;
}

html.ff-widerruf-open,
body.ff-widerruf-open {
    overflow: hidden;
}

.ff-widerruf__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.ff-widerruf__dialog {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(640px, 100%);
    max-height: min(92vh, 860px);
    overflow: auto;
    padding: clamp(22px, 4vw, 28px) clamp(18px, 3.5vw, 28px) 24px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
}

.ff-widerruf__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #666;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.ff-widerruf__close:hover,
.ff-widerruf__close:focus-visible {
    color: #b43526;
    background: transparent !important;
    background-color: transparent !important;
    outline: none;
    box-shadow: none !important;
}

.ff-widerruf__title {
    margin: 0 36px 10px 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 4vw, 28px);
    line-height: 1.05;
    letter-spacing: 0;
    color: #000;
}

.ff-widerruf__intro {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.35;
    color: #333;
}

.ff-widerruf__notice {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 5px;
    font-size: 15px;
    line-height: 1.35;
    color: #000;
}

.ff-widerruf__notice.is-success {
    border-color: #b8d4b8;
    background: #f4faf4;
}

.ff-widerruf__notice.is-error {
    border-color: #e0b4b4;
    background: #fdf5f5;
}

.ff-widerruf__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ff-widerruf__row--2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ff-widerruf__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ff-widerruf__label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.1;
    color: #000;
}

.ff-widerruf__input,
.ff-widerruf__textarea {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #c8c8c8;
    border-radius: 5px;
    background: #f2f2f2;
    color: #000;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 22px;
    appearance: none;
    -webkit-appearance: none;
}

.ff-widerruf__input:focus,
.ff-widerruf__textarea:focus,
.ff-widerruf__input:not(:placeholder-shown),
.ff-widerruf__textarea:not(:placeholder-shown) {
    outline: none;
    border-color: #999;
    background: #fff;
}

.ff-widerruf__input:hover,
.ff-widerruf__textarea:hover {
    background: #fafafa;
    border-color: #bdbdbd;
}

.ff-widerruf__select-wrap {
    position: relative;
}

.ff-widerruf__select {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.ff-widerruf__dd-toggle {
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin: 0;
    padding: 11px 40px 11px 14px;
    min-height: 44px;
    border: 1px solid #c8c8c8;
    border-radius: 5px;
    background: #f2f2f2;
    color: #000;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 0;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.ff-widerruf__dd-toggle.is-placeholder {
    color: #666;
}

/* GP/Theme: button:hover setzt oft schwarzen Hintergrund → neutralisieren */
.ff-widerruf .ff-widerruf__dd-toggle:hover,
.ff-widerruf .ff-widerruf__dd-toggle:focus:not(:focus-visible),
.ff-widerruf .ff-widerruf__dd-toggle:active {
    background: #fafafa !important;
    background-color: #fafafa !important;
    background-image: none !important;
    color: #000 !important;
    border-color: #bdbdbd !important;
    box-shadow: none !important;
}

.ff-widerruf .ff-widerruf__dd-toggle.is-placeholder:hover,
.ff-widerruf .ff-widerruf__dd-toggle.is-placeholder:focus:not(:focus-visible) {
    color: #666 !important;
}

.ff-widerruf__select-wrap.is-open .ff-widerruf__dd-toggle,
.ff-widerruf__dd-toggle:focus,
.ff-widerruf__dd-toggle:focus-visible {
    outline: none;
    border-color: #999;
    background: #fff !important;
    background-color: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
}

.ff-widerruf__select-wrap.is-open .ff-widerruf__dd-toggle:hover {
    background: #fff !important;
    background-color: #fff !important;
    color: #000 !important;
}

.ff-widerruf__select-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
    transition: transform 0.18s ease;
}

.ff-widerruf__select-wrap.is-open::after {
    transform: translateY(-35%) rotate(-135deg);
}

.ff-widerruf__dd-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 3;
    max-height: min(260px, 42vh);
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding: 6px 0;
    border: 1px solid #c8c8c8;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.ff-widerruf__dd-panel[hidden] {
    display: none !important;
}

.ff-widerruf__dd-option {
    display: block;
    width: 100%;
    margin: 0;
    padding: 11px 14px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #000;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 0;
    text-align: left;
    cursor: pointer;
}

.ff-widerruf__dd-option:hover,
.ff-widerruf__dd-option:focus-visible {
    background: #f7f7f7 !important;
    background-color: #f7f7f7 !important;
    background-image: none !important;
    color: #b43526 !important;
    outline: none;
    box-shadow: none !important;
}

.ff-widerruf .ff-widerruf__dd-option:focus:not(:focus-visible),
.ff-widerruf .ff-widerruf__dd-option:active {
    background: #f3f3f3 !important;
    background-color: #f3f3f3 !important;
    color: #b43526 !important;
    box-shadow: none !important;
}

.ff-widerruf__dd-option.is-active {
    color: #b43526;
}

.ff-widerruf__textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.35;
}

.ff-widerruf__check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.35;
    color: #111;
    cursor: pointer;
}

.ff-widerruf__check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: #b43526;
}

.ff-widerruf__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ff-widerruf__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.ff-widerruf__submit {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    height: 36px;
    margin: 0;
    padding: 0 18px;
    border: none;
    border-radius: 5px;
    background: #b43526;
    color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.ff-widerruf__submit:hover,
.ff-widerruf__submit:focus-visible {
    background: #942c1f;
    outline: none;
}

.ff-widerruf__submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ff-widerruf__cancel {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: #666;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.ff-widerruf__cancel:hover,
.ff-widerruf__cancel:focus-visible {
    color: #b43526;
    background: transparent !important;
    background-color: transparent !important;
    outline: none;
    box-shadow: none !important;
}

@media (max-width: 560px) {
    .ff-widerruf__row--2 {
        grid-template-columns: 1fr;
    }
}
