/* xx_plugin_010 – Kontaktformular im Footer. All rules are scoped to .rsfc */
.rsfc {
    --rsfc-bg: #ffffff;
    --rsfc-color: #525252;
    --rsfc-field-bg: #ffffff;
    --rsfc-field-color: #333333;
    --rsfc-field-border: #707070;
    --rsfc-btn-bg: #525252;
    --rsfc-btn-color: #ffffff;
    --rsfc-radius: 2px;
    --rsfc-pad-y: 48px;
    --rsfc-max-width: 1200px;
    --rsfc-margin-top: 0px;
    --rsfc-margin-bottom: 0px;
    box-sizing: border-box;
    clear: both;
    width: 100%;
    margin: var(--rsfc-margin-top) 0 var(--rsfc-margin-bottom);
    padding: var(--rsfc-pad-y) 0;
    background: var(--rsfc-bg);
    color: var(--rsfc-color);
    text-align: left;
}

.rsfc *,
.rsfc *::before,
.rsfc *::after {
    box-sizing: border-box;
}

.rsfc__inner {
    max-width: var(--rsfc-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.rsfc__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.rsfc__title {
    margin: 0 0 0.75rem;
    padding: 0;
    color: inherit;
    font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
}

.rsfc__text {
    max-width: 34rem;
    margin: 0;
    color: inherit;
    font-size: 1rem;
    line-height: 1.6;
}

.rsfc__form {
    margin: 0;
}

.rsfc__trap {
    display: none;
}

.rsfc__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.rsfc__field {
    min-width: 0;
}

.rsfc__label {
    display: block;
    margin: 0 0 0.375rem;
    color: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}

.rsfc__control {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--rsfc-field-border);
    border-radius: var(--rsfc-radius);
    background-color: var(--rsfc-field-bg);
    color: var(--rsfc-field-color);
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    box-shadow: none;
}

.rsfc__control--area {
    min-height: 7.5rem;
    resize: vertical;
}

.rsfc__control:focus-visible,
.rsfc__submit:focus-visible,
.rsfc__summary:focus-visible,
.rsfc a:focus-visible {
    outline: 2px solid var(--rsfc-color);
    outline-offset: 2px;
}

/* Result of a background submit */
.rsfc__status {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid currentColor;
    border-left-width: 6px;
    border-radius: var(--rsfc-radius);
    color: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

.rsfc__status[hidden] {
    display: none;
}

.rsfc__status:focus {
    outline: 2px solid var(--rsfc-color);
    outline-offset: 2px;
}

.rsfc__status--success {
    font-weight: 600;
}

.rsfc__status-text {
    margin: 0;
    color: inherit;
}

.rsfc__status-text + .rsfc__status-text {
    margin-top: 0.375rem;
}

.rsfc__status--error .rsfc__status-text::before {
    content: "! ";
    font-weight: 700;
}

.rsfc__status--success .rsfc__status-text::before {
    content: "\2713\00a0";
}

.rsfc__form--sent .rsfc__fields,
.rsfc__form--sent .rsfc__captcha,
.rsfc__form--sent .rsfc__consent,
.rsfc__form--sent .rsfc__actions {
    display: none;
}

.rsfc__form--sent .rsfc__status {
    margin-bottom: 0;
}

.rsfc__form[aria-busy="true"] .rsfc__submit {
    opacity: 0.7;
    cursor: progress;
}

.rsfc__captcha:empty {
    display: none;
}

.rsfc__consent {
    margin-top: 1rem;
    font-size: 0.875rem;
}

.rsfc__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-top: 1.25rem;
}

.rsfc__meta {
    flex: 1 1 16rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.rsfc__hint,
.rsfc__privacy {
    margin: 0;
    color: inherit;
}

/* The id keeps link colours readable when the section sits inside #footer, where themes style links by id. */
#rs-footer-contact.rsfc a,
#rs-footer-contact.rsfc a:visited {
    color: inherit;
    text-decoration: underline;
}

#rs-footer-contact.rsfc a:hover,
#rs-footer-contact.rsfc a:focus {
    color: inherit;
    text-decoration: none;
}

.rsfc__submit {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0.625rem 1.75rem;
}

.rsfc__submit--custom {
    display: inline-block;
    border: 1px solid var(--rsfc-btn-bg);
    border-radius: var(--rsfc-radius);
    background-color: var(--rsfc-btn-bg);
    color: var(--rsfc-btn-color);
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
}

.rsfc__submit--custom:hover {
    filter: brightness(0.9);
}

/* Collapsible variant */
.rsfc__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 44px;
    list-style: none;
    cursor: pointer;
}

.rsfc__summary::-webkit-details-marker {
    display: none;
}

.rsfc__summary .rsfc__title {
    margin: 0;
}

.rsfc__chevron {
    flex: 0 0 auto;
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.25rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.rsfc__details[open] .rsfc__chevron {
    transform: rotate(-135deg);
}

.rsfc__details[open] .rsfc__grid {
    margin-top: 1.5rem;
}

/* Centered single column */
.rsfc--stacked .rsfc__grid {
    max-width: 45rem;
    margin-right: auto;
    margin-left: auto;
}

.rsfc--stacked .rsfc__summary {
    max-width: 45rem;
    margin-right: auto;
    margin-left: auto;
}

.rsfc--stacked .rsfc__intro {
    text-align: center;
}

.rsfc--stacked .rsfc__text {
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .rsfc__fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rsfc__field--wide {
        grid-column: 1 / -1;
    }
}

@media (min-width: 992px) {
    .rsfc--split .rsfc__grid,
    .rsfc--split-reverse .rsfc__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
        align-items: start;
        gap: 3rem;
    }

    .rsfc--split-reverse .rsfc__grid {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    }

    .rsfc--split-reverse .rsfc__intro {
        order: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rsfc__chevron {
        transition: none;
    }
}

@media print {
    .rsfc {
        display: none;
    }
}
