.fzs-canvas { display: block; }

.fzs-container--full {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 24px;
    box-sizing: border-box;
}

.fzs-section__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.fzs-column {
    box-sizing: border-box;
    min-width: 0;
}

.fzs-w-image img {
    max-width: 100%;
    display: block;
}

.fzs-w-image__placeholder {
    display: block;
    padding: 32px;
    text-align: center;
    background: #eee;
    color: #888;
    border: 1px dashed #ccc;
}

.fzs-w-spacer {
    width: 100%;
}

/* Globale Bereiche (Header/Footer) werden in bestehende Theme-Container
   (.site-header__bar, .footer-grid) eingehaengt - die Struktur-Wrapper
   sollen dabei fuers Layout unsichtbar sein, damit die Widgets sich wie
   direkte Kinder dieser Theme-Container verhalten (Original-Optik bleibt
   exakt erhalten, kein doppeltes Grid/Flex). */
.fzs-canvas--global,
.fzs-canvas--global .fzs-section,
.fzs-canvas--global .fzs-section__grid,
.fzs-canvas--global .fzs-column,
.fzs-canvas--global .fzs-w-text {
    display: contents;
}

/* Theme-Regeln, die nur direkte Grid-Kinder treffen (z.B. .hero__figure
   { order:-1 } im Mobil-Layout), auf die umgebende Builder-Spalte uebertragen,
   damit die Reihenfolge wie im Original bleibt (Bild ueber dem Text). */
@media (max-width: 960px) {
    .hero__grid > .fzs-column:has(.hero__figure) { order: -1; }
}

@media (min-width: 769px) {
    .fzs-column--1  { flex-basis: calc(1  / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--2  { flex-basis: calc(2  / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--3  { flex-basis: calc(3  / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--4  { flex-basis: calc(4  / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--5  { flex-basis: calc(5  / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--6  { flex-basis: calc(6  / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--7  { flex-basis: calc(7  / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--8  { flex-basis: calc(8  / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--9  { flex-basis: calc(9  / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--10 { flex-basis: calc(10 / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--11 { flex-basis: calc(11 / 12 * 100% - 24px); flex-grow: 0; }
    .fzs-column--12 { flex-basis: 100%; flex-grow: 0; }
}

@media (max-width: 768px) {
    .fzs-column { flex-basis: 100%; }

    /* Mobil-Overrides fuer Spacer-Hoehe / Section-Padding: greifen nur, wenn
       die jeweilige CSS-Custom-Property im Inline-Style gesetzt ist (siehe
       class-widget-spacer.php / class-fzs-builder-renderer.php). */
    .fzs-w-spacer[style*="--mobile-h"] { height: var(--mobile-h) !important; }
    .fzs-section[style*="--mobile-pt"] { padding-top: var(--mobile-pt) !important; }
    .fzs-section[style*="--mobile-pb"] { padding-bottom: var(--mobile-pb) !important; }
}

/* Edit-Modus */
.fzs-widget-wrap {
    position: relative;
    outline: 1px dashed transparent;
}

.fzs-widget-wrap:hover {
    outline-color: #4a90d9;
}

.fzs-canvas--empty {
    padding: 64px 24px;
    text-align: center;
    color: #888;
    border: 2px dashed #ccc;
}

/* Kontaktformular (class-widget-contact-form.php) */
.fzs-contact {
    max-width: 680px;
}

.fzs-contact__row {
    margin: 0 0 16px;
}

.fzs-contact__row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--ink, #2b2a24);
}

.fzs-contact__row input[type="text"],
.fzs-contact__row input[type="email"],
.fzs-contact__row input[type="tel"],
.fzs-contact__row textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font: inherit;
    color: var(--ink, #2b2a24);
    background: #fff;
    border: 1px solid var(--border, #e6e0d2);
    border-radius: var(--radius-sm, 8px);
}

.fzs-contact__row input:focus,
.fzs-contact__row textarea:focus {
    outline: 2px solid var(--primary, #5e762e);
    outline-offset: 1px;
}

.fzs-contact__row--check label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 400;
}

.fzs-contact__row--check input {
    margin-top: 5px;
    flex-shrink: 0;
}

/* Honigtopf gegen Roboter: fuer Menschen unsichtbar, nicht per display:none (das umgehen manche Roboter) */
.fzs-contact__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.fzs-contact__notice {
    padding: 12px 16px;
    margin: 0 0 20px;
    border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--border, #e6e0d2);
    background: var(--bg-alt, #f1ebdf);
    color: var(--ink, #2b2a24);
}

.fzs-contact__notice--ok {
    border-color: var(--primary, #5e762e);
    background: var(--primary-soft, #f1f5ea);
}

.fzs-contact__notice--err {
    border-color: var(--accent, #c0504d);
    background: var(--accent-soft, #f7e4e3);
}
