/* xx_plugin_011 – Kontaktformular als OPC-Portlet. All rules are scoped to .xxcf / .xxcf-slot */
.xxcf-slot {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.xxcf-slot:empty {
    display: none;
}

/* Editor: without a picture of the form the box would collapse and could not be selected. */
.xxcf-slot--preview {
    min-height: 3rem;
}

.xxcf {
    --xxcf-bg: transparent;
    --xxcf-color: inherit;
    --xxcf-field-bg: #ffffff;
    --xxcf-field-color: #333333;
    --xxcf-field-border: #707070;
    --xxcf-btn-bg: #525252;
    --xxcf-btn-color: #ffffff;
    --xxcf-radius: 2px;
    --xxcf-pad-y: 0px;
    --xxcf-pad-x: 0px;
    --xxcf-max-width: 1200px;
    box-sizing: border-box;
    container-type: inline-size;
    width: 100%;
    margin: 0;
    padding: var(--xxcf-pad-y) var(--xxcf-pad-x);
    background: var(--xxcf-bg);
    color: var(--xxcf-color);
    text-align: left;
}

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

.xxcf__inner {
    max-width: var(--xxcf-max-width);
    margin: 0 auto;
}

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

.xxcf__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;
}

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

.xxcf__form {
    margin: 0;
}

.xxcf__trap {
    display: none;
}

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

.xxcf__field {
    min-width: 0;
}

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

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

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

.xxcf__control:focus-visible,
.xxcf__submit:focus-visible,
.xxcf a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

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

.xxcf__status[hidden] {
    display: none;
}

.xxcf__status:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

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

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

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

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

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

.xxcf__form--sent .xxcf__fields,
.xxcf__form--sent .xxcf__captcha,
.xxcf__form--sent .xxcf__consent,
.xxcf__form--sent .xxcf__actions {
    display: none;
}

.xxcf__form--sent .xxcf__status {
    margin-bottom: 0;
}

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

.xxcf__captcha:empty {
    display: none;
}

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

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

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

.xxcf__hint,
.xxcf__privacy {
    margin: 0;
    color: inherit;
}

.xxcf .xxcf__privacy a,
.xxcf .xxcf__privacy a:visited,
.xxcf__link {
    color: inherit;
    text-decoration: underline;
}

.xxcf .xxcf__privacy a:hover,
.xxcf .xxcf__privacy a:focus {
    color: inherit;
    text-decoration: none;
}

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

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

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

/* Centred single column */
.xxcf--stacked .xxcf__grid {
    max-width: 45rem;
    margin-right: auto;
    margin-left: auto;
}

.xxcf--stacked .xxcf__intro {
    text-align: center;
}

.xxcf--stacked .xxcf__text {
    margin-right: auto;
    margin-left: auto;
}

/* Static picture in the OnPage Composer: looks like the form, cannot be used. */
.xxcf--preview .xxcf__control,
.xxcf--preview .xxcf__submit {
    opacity: 1;
    pointer-events: none;
}

.xxcf--preview .xxcf__control:disabled {
    background-color: var(--xxcf-field-bg);
    color: var(--xxcf-field-color);
}

/*
 * The portlet can sit in a narrow column, so the layout follows the width of the form itself,
 * not the width of the window. Browsers without container queries keep the single column.
 */
@container (min-width: 30rem) {
    .xxcf__fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@container (min-width: 56rem) {
    .xxcf--split .xxcf__grid,
    .xxcf--split-reverse .xxcf__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
        align-items: start;
        gap: 3rem;
    }

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

    .xxcf--split-reverse .xxcf__intro {
        order: 2;
    }

    /* Without heading and intro text the form takes the full width. */
    .xxcf.xxcf--form-only .xxcf__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

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