/* The new preset is deliberately isolated from the unchanged classic footer. */
.site-footer.footer-preset-minimal[data-footer-preset="minimal_four_column"] {
    background: var(--footer-bg);
    color: var(--footer-text);
    border: 0;
}
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-shell {
    container: rosepat-footer / inline-size;
    box-sizing: border-box;
    width: 100%;
    max-width: var(--footer-max-width);
    margin-inline: auto;
    padding: var(--footer-padding-y) clamp(16px, 3vw, 40px);
    text-align: var(--footer-align);
}
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--footer-gap);
}
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-column { min-width: 0; }
.site-footer[data-footer-preset="minimal_four_column"] h2 {
    color: var(--footer-heading);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 12px;
    overflow-wrap: anywhere;
}
.site-footer[data-footer-preset="minimal_four_column"] p {
    color: var(--footer-text);
    font-size: .9375rem;
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
    margin: 0;
}
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-text { white-space: pre-line; margin-bottom: 12px; }
.site-footer[data-footer-preset="minimal_four_column"] ul { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.site-footer[data-footer-preset="minimal_four_column"] li { min-width: 0; margin: 0; padding: 0; }
.site-footer[data-footer-preset="minimal_four_column"] a {
    color: var(--footer-link);
    font-size: .9375rem;
    line-height: 1.6;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.site-footer[data-footer-preset="minimal_four_column"] a:hover { color: var(--footer-link-hover); text-decoration: underline; text-underline-offset: .15em; }
.site-footer[data-footer-preset="minimal_four_column"] a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-logo {
    display: flex;
    justify-content: flex-start;
    max-width: 100%;
    margin-bottom: 16px;
}
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-logo[data-logo-align="center"] { justify-content: center; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-logo[data-logo-align="right"] { justify-content: flex-end; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-logo picture { display: block; max-width: min(100%, var(--footer-logo-width)); }
.site-footer[data-footer-preset="minimal_four_column"] [data-footer-logo] {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: scale-down;
    transform: none;
    border-radius: 0;
}
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: var(--footer-gap);
    padding-top: 20px;
}
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-bottom:first-child { margin-top: 0; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-bottom[data-divider="true"] { border-top: 1px solid currentColor; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-central { margin-top: 20px; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-central ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-social { margin-top: var(--footer-gap); }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-social:first-child { margin-top: 0; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-social ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--share-gap, 10px); }
.site-footer[data-footer-preset="minimal_four_column"] .footer-preset-social li { max-width: 100%; }
.site-footer[data-footer-preset="minimal_four_column"] [data-footer-social-link] {
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    width: max(44px, var(--portal-share-size, 44px));
    height: max(44px, var(--portal-share-size, 44px));
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--footer-link) 22%, var(--footer-bg));
    border-radius: 999px;
    background: color-mix(in srgb, var(--footer-link) 9%, var(--footer-bg));
    color: var(--footer-link);
    text-decoration: none;
}
.portal-appearance-surface[data-portal-share-shape="rounded"] .site-footer[data-footer-preset="minimal_four_column"] [data-footer-social-link] { border-radius: 8px; }
.portal-appearance-surface[data-portal-share-shape="square"] .site-footer[data-footer-preset="minimal_four_column"] [data-footer-social-link] { border-radius: 0; }
.site-footer[data-footer-preset="minimal_four_column"] [data-footer-social-link]:is(:hover, :focus-visible) {
    border-color: color-mix(in srgb, var(--footer-link-hover) 34%, var(--footer-bg));
    background: color-mix(in srgb, var(--footer-link-hover) 14%, var(--footer-bg));
    color: var(--footer-link-hover);
    text-decoration: none;
}
.site-footer[data-footer-preset="minimal_four_column"] [data-footer-social-link]:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 999px; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-social-icon,
[data-footer-editor] .footer-social-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; width: 20px; height: 20px; color: inherit; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-social-icon svg,
[data-footer-editor] .footer-social-icon svg { display: block; width: 20px; height: 20px; max-width: 100%; }
.site-footer[data-footer-preset="minimal_four_column"] .footer-social-icon img,
[data-footer-editor] .footer-social-icon img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: scale-down; transform: none; border-radius: 0; }
.site-footer[data-footer-preset="minimal_four_column"] [data-footer-social-link] .footer-social-icon { width: 21px; height: 21px; flex-basis: 21px; }
.site-footer[data-footer-preset="minimal_four_column"] [data-footer-social-link] .footer-social-icon svg { width: 21px; height: 21px; }
[data-footer-editor] .footer-social-upload-preview { position: absolute; inset: 0; margin: auto; }
[data-footer-editor] .footer-social-icon.has-upload-preview > svg { visibility: hidden; }
@container rosepat-footer (min-width: 340px) {
    .site-footer[data-footer-preset="minimal_four_column"] [data-footer-columns]:not([data-column-count="1"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container rosepat-footer (min-width: 960px) {
    .site-footer[data-footer-preset="minimal_four_column"] [data-footer-columns][data-column-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .site-footer[data-footer-preset="minimal_four_column"] [data-footer-columns][data-column-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Settings-only controls never change the public footer or other forms. */
[data-footer-editor] { min-width: 0; }
[data-footer-editor] .footer-editor-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
[data-footer-editor] .footer-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
[data-footer-editor] .footer-editor-controls { min-width: 0; }
[data-footer-editor] fieldset { min-width: 0; border: 1px solid #d1d5db; border-radius: 8px; padding: 16px; margin: 0 0 16px; }
[data-footer-editor] legend { font-weight: 600; padding-inline: 6px; }
[data-footer-editor] details { border: 1px solid #d1d5db; border-radius: 8px; padding: 16px; margin-block: 12px; }
[data-footer-editor] summary { cursor: pointer; font-weight: 600; }
[data-footer-editor] details > div { margin-top: 16px; }
[data-footer-editor] .footer-editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
[data-footer-editor] .footer-editor-fields .wide { grid-column: 1 / -1; }
[data-footer-editor] .footer-editor-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; margin-bottom: 10px; }
[data-footer-editor] .footer-editor-link .wide { grid-column: 1 / -1; }
[data-footer-editor] input, [data-footer-editor] select, [data-footer-editor] textarea { box-sizing: border-box; max-width: 100%; min-width: 0; }
[data-footer-editor] .footer-editor-actions, [data-footer-editor] .footer-device-controls { display: flex; flex-wrap: wrap; gap: 8px; }
[data-footer-editor] .footer-preview-viewport { max-width: 100%; overflow: auto; border: 1px solid #d1d5db; margin-top: 12px; background: #f8fafc; }
[data-footer-editor] [data-footer-preview] { display: block; width: 100%; height: 620px; border: 0; background: #fff; }
[data-footer-editor] [data-footer-preview][data-device="mobile"] { width: 390px; max-width: 100%; }
[data-footer-editor] [data-footer-preview][data-device="tablet"] { width: 768px; }
[data-footer-editor] [data-footer-preview][data-device="desktop"] { width: 1200px; }
[data-footer-editor] [data-footer-feedback] { min-height: 1.6em; }
[data-footer-editor] [hidden] { display: none !important; }
[data-footer-editor] .footer-social-picker { position: relative; margin-block: 16px; }
[data-footer-editor] .footer-social-options { position: absolute; top: 100%; inset-inline: 0; z-index: 5; max-height: 280px; overflow: auto; padding: 4px; border: 1px solid #64748b; border-radius: 8px; background: var(--surface, #fff); box-shadow: 0 8px 24px #0002; }
[data-footer-editor] [data-footer-social-platform] { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px; cursor: pointer; overflow-wrap: anywhere; }
[data-footer-editor] [data-footer-social-platform][aria-selected="true"],
[data-footer-editor] [data-footer-social-platform]:hover { background: #e8edf3; color: #17202a; outline: 2px solid currentColor; outline-offset: -2px; }
[data-footer-editor] [data-footer-social-item] > summary { display: flex; align-items: center; gap: 10px; list-style: none; min-height: 32px; }
[data-footer-editor] [data-footer-social-item] > summary::-webkit-details-marker { display: none; }
[data-footer-editor] [data-footer-social-item] > summary::marker { content: ""; }
[data-footer-editor] [data-footer-social-summary-icon] { display: inline-flex; flex: 0 0 20px; }
[data-footer-editor] [data-footer-social-summary-label] { min-width: 0; overflow-wrap: anywhere; }
[data-footer-editor] .footer-social-chevron { flex: 0 0 auto; margin-inline-start: auto; font-size: 1.25rem; line-height: 1; }
[data-footer-editor] [data-footer-social-item][open] > summary .footer-social-chevron { transform: rotate(180deg); }
[data-footer-editor] [data-footer-social-item] summary:focus-visible,
[data-footer-editor] [data-footer-social-search]:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
[data-footer-editor] [data-footer-social-status] { min-height: 1.6em; }
[data-footer-editor] .footer-social-help { overflow-wrap: anywhere; }
@media (max-width: 1000px) { [data-footer-editor] .footer-editor-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
    [data-footer-editor] .footer-editor-fields, [data-footer-editor] .footer-editor-link { grid-template-columns: minmax(0, 1fr); }
}
