/* endoo Forms – embedded n8n forms (/{locale}/forms/{slug}). Tokens come from the endoo template (endoo.css). */

.endoo-n8n .endoo-card { overflow: hidden; }
.endoo-n8n .endoo-card-header { flex-wrap: wrap; row-gap: .5rem; }
.endoo-n8n-actions { display: inline-flex; align-items: center; gap: .9rem; }

.endoo-n8n-newtab {
    display: inline-flex; align-items: center; gap: .35rem;
    color: var(--endoo-gray-500, #8a929a);
    text-decoration: none;
    white-space: nowrap;
}
.endoo-n8n-newtab:hover { color: var(--endoo-primary, #006f3d); }

.endoo-n8n-frame {
    position: relative;
    /* configured height, but never taller than the viewport minus the header area (like the old standalone pages) */
    height: min(var(--endoo-n8n-height, 900px), max(560px, calc(100dvh - 180px)));
    background: #fff; /* n8n forms are light-only */
}
.endoo-n8n-frame iframe {
    position: relative; z-index: 1; /* above the loading hint – covers it as soon as n8n paints */
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.endoo-n8n-loading {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    font-size: .85rem;
    color: #8a929a;
    pointer-events: none;
}

@media (max-width: 640px) {
    .endoo-n8n-actions { margin-left: 0; width: 100%; justify-content: space-between; }
    .endoo-n8n-frame { height: max(560px, calc(100dvh - 140px)); }
}
