/* Creation stays in the toolbox; management reuses the same authorized form store. */
html.fq-embedded{background:transparent!important}
.fq-embedded body{min-height:0;background:transparent!important}
.fq-embedded .fq-header,.fq-embedded .fq-hero,.fq-embedded .fq-coming{display:none!important}
.fq-embedded .fq-shell{width:100%;max-width:none;margin:0 auto;padding:0 4px 24px}
.fq-embedded body.ux-forms .fq-tabs{position:sticky;top:0;z-index:8;margin-top:0;display:grid!important;grid-template-columns:1fr 1fr auto;gap:8px}
.fq-embedded body.fd-editor-active .fq-tabs{display:none!important}
.fq-embedded .fq-tabs [hidden]{display:none!important}
.fq-embedded .fq-tabs button{min-height:44px;flex:0 0 auto}
.fq-embedded .fq-tabs button{white-space:normal;overflow-wrap:anywhere}
.fq-embedded .fq-shell,.fq-embedded .fq-grid>*{min-width:0}
.fq-embedded input,.fq-embedded textarea,.fq-embedded select{max-width:100%}
.fq-embedded .fq-section-heading small{display:none}
.fq-embedded .fq-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:600px){.fq-embedded .fq-grid{grid-template-columns:1fr}.fq-embedded .fq-shell{padding-inline:0}.fq-embedded .fq-record-tracking{grid-template-columns:1fr}}

/* Hide duplicate entry points, not their data or business actions. */
html:not(.fq-embedded) body.ux-forms .fq-tabs [data-tab="forms"],
html:not(.fq-embedded) body.ux-forms .fq-tabs [data-tab="notifications"],
html:not(.fq-embedded) body.ux-forms [data-view="dashboard"]>.fq-metrics,
html:not(.fq-embedded) body.ux-forms [data-view="dashboard"]>#fq-recent,
html:not(.fq-embedded) body.ux-forms [data-view="dashboard"]>.fq-section-heading:has(+ #fq-recent),
body.ux-forms #fq-activity-status,body.ux-forms #fq-activity-banner{display:none!important}
html:not(.fq-embedded) body.ux-forms .fq-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
html:not(.fq-embedded) body.ux-forms [data-view="dashboard"]:not([hidden]){display:block;max-width:880px;margin-inline:auto}
html:not(.fq-embedded) body.ux-forms .fq-tabs button{justify-content:center;white-space:normal}

html.fq-embedded body.ux-forms .fq-shell{width:100%;margin:0;padding:0 2px 24px;color:var(--ink)}
html.fq-embedded body.ux-forms #fq-form-grid{display:grid;grid-template-columns:1fr;gap:14px}
html.fq-embedded body.ux-forms #fq-form-grid article{min-width:0;padding:20px;border-radius:16px;box-shadow:none}
html.fq-embedded body.ux-forms #fq-form-grid h3{font-size:20px;line-height:1.45;overflow-wrap:anywhere;margin:12px 0 6px}
html.fq-embedded body.ux-forms #fq-form-grid p{overflow-wrap:anywhere;color:var(--muted)}
html.fq-embedded body.ux-forms #fq-form-grid .fq-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:16px}
html.fq-embedded body.ux-forms #fq-form-grid .fq-actions button{min-height:44px;font-size:14px;white-space:normal;padding:9px 8px;overflow-wrap:anywhere}
html.fq-embedded body.ux-forms #fq-form-grid [data-action="delete"]{color:var(--ink);border-style:dashed}
html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading{align-items:center;gap:14px;margin-top:18px}
html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading h2{font-size:22px}
html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading p{font-size:13px;color:var(--muted);margin-bottom:0}
html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading button{flex:none;white-space:nowrap}
.fq-manager-tools{display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:12px;margin:18px 0 8px}
.fq-manager-tools label{display:grid;gap:7px;font-size:13px;font-weight:600;color:var(--muted);min-width:0}
.fq-manager-tools input,.fq-manager-tools select{width:100%;min-width:0;min-height:46px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--surface);color:var(--ink);font:inherit;font-size:16px;box-sizing:border-box}
.fq-manager-tools :focus-visible{outline:2px solid var(--pink-deep);outline-offset:2px}
#fq-manager-count{color:var(--muted);font-size:12px;margin:8px 0 14px}
.fq-manager-empty{grid-column:1/-1;padding:30px 16px;border:1px dashed var(--line);border-radius:14px;color:var(--muted);text-align:center}
.fq-manager-security{margin-top:24px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink)}
.fq-manager-security>summary{cursor:pointer;min-height:48px;padding:13px 16px;box-sizing:border-box;font-size:14px}
.fq-manager-security>.fq-card{border:0;border-top:1px solid var(--line);border-radius:0 0 14px 14px;margin:0;box-shadow:none}
body.fq-detail-active .fq-manager-security{display:none}
@media(min-width:900px){html.fq-embedded body.ux-forms #fq-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 html.fq-embedded body.ux-forms #fq-form-grid article{padding:16px}
 html.fq-embedded body.ux-forms #fq-form-grid .fq-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
 html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading{flex-wrap:wrap}
 html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading button{width:100%;margin:0}
 .fq-manager-tools{grid-template-columns:minmax(0,1fr) 108px;gap:8px}
 .fq-manager-tools input,.fq-manager-tools select{padding-inline:10px}
}

/* Compact management surface; the full editor lives in the shared forms page. */
html.fq-embedded body.ux-forms .fq-tabs{padding:5px;border-radius:12px;gap:4px;box-shadow:none}
html.fq-embedded body.ux-forms .fq-tabs button{min-height:42px;padding:8px 12px;font-size:14px;border-radius:9px}
html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading{display:flex;flex-wrap:nowrap;margin:18px 0 12px;gap:12px}
html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading>div{min-width:0;flex:1}
html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading h2{font-size:17px;margin:0}
html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading p{display:none}
html.fq-embedded body.ux-forms [data-view="forms"]>.fq-section-heading button{width:auto;min-height:42px;padding:9px 14px;font-size:14px;border-radius:10px;margin:0}
html.fq-embedded body.ux-forms .fq-manager-tools{margin:0 0 8px;gap:10px;grid-template-columns:minmax(0,1fr) 120px}
html.fq-embedded body.ux-forms .fq-manager-tools label{gap:5px;font-size:12px}
html.fq-embedded body.ux-forms .fq-manager-tools input,html.fq-embedded body.ux-forms .fq-manager-tools select{min-height:44px;font-size:16px}
html.fq-embedded body.ux-forms .fq-manager-tools .ui-select-trigger{min-height:44px;font-size:13px;padding:8px 10px;gap:6px;border-radius:10px}
html.fq-embedded body.ux-forms #fq-manager-count{margin:8px 0 12px}
html.fq-embedded body.ux-forms #fq-form-grid article{padding:16px;border-radius:14px}
html.fq-embedded body.ux-forms #fq-form-grid .fq-tag{font-size:11px;padding:4px 9px;line-height:1.5}
html.fq-embedded body.ux-forms #fq-form-grid h3{font-size:18px;margin:8px 0 4px}
html.fq-embedded body.ux-forms #fq-form-grid p{font-size:13px;line-height:1.65;margin:4px 0}
html.fq-embedded body.ux-forms #fq-form-grid .fq-note{font-size:12px}
html.fq-embedded body.ux-forms #fq-form-grid .fq-actions{margin-top:12px}
html.fq-embedded body.ux-forms #fq-form-grid .fq-actions button{border-radius:9px;font-size:13px}
html.fq-embedded body.ux-forms #fq-form-grid [data-action="delete"]{color:var(--danger,#c7465b);border-style:solid;background:transparent}
@media(max-width:380px){html.fq-embedded body.ux-forms .fq-manager-tools{grid-template-columns:minmax(0,1fr) 116px;gap:8px}}

/* Form management: the closed row contains only its name. */
body.ux-forms #fq-form-grid,body.ux-forms #fq-recent{align-items:start}
body.ux-forms #fq-form-grid article.fq-form-collapsible,body.ux-forms #fq-recent article.fq-form-collapsible,
html.fq-embedded body.ux-forms #fq-form-grid article.fq-form-collapsible{padding:0;margin:0;overflow:hidden;transform:none;box-shadow:none}
.ux-forms .fq-form-card-summary{display:flex;align-items:center;gap:12px;min-height:56px;padding:14px 16px;box-sizing:border-box;cursor:pointer;list-style:none}
.ux-forms .fq-form-card-summary::-webkit-details-marker{display:none}
body.ux-forms #fq-form-grid .fq-form-card-summary h3,body.ux-forms #fq-recent .fq-form-card-summary h3,
html.fq-embedded body.ux-forms #fq-form-grid .fq-form-card-summary h3{flex:1;min-width:0;margin:0;font-size:17px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}
.ux-forms .fq-form-card-chevron{flex-shrink:0;font-size:21px;line-height:1;color:var(--muted);transform:rotate(0deg)}
.ux-forms details[open]>.fq-form-card-summary .fq-form-card-chevron{transform:rotate(180deg)}
.ux-forms .fq-form-card-body{padding:16px;border-top:1px solid var(--line,var(--fq-line))}
/* Explicit hiding also protects against global display overrides in embedded WebViews. */
.ux-forms .fq-form-collapsible details:not([open])>.fq-form-card-body{display:none!important}
.ux-forms .fq-form-card-summary:focus-visible{outline:2px solid var(--pink-deep,#d94d77);outline-offset:-3px}
html.fq-embedded body.ux-forms .fq-tabs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:center}
html.fq-embedded body.ux-forms .fq-tabs button,
html.fq-embedded body.ux-forms #fq-form-grid .fq-actions button{height:auto;aspect-ratio:auto;min-height:44px;line-height:1.4;align-self:center}
html.fq-embedded body.ux-forms .fq-tabs .fq-refresh-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid var(--pink-deep,#b33161);background:transparent;color:var(--pink-deep,#b33161);font-weight:700;min-width:76px}
html.fq-embedded body.ux-forms .fq-tabs .fq-refresh-button:hover{background:color-mix(in srgb,var(--pink-deep,#b33161) 10%,transparent)}
html.fq-embedded body.ux-forms .fq-tabs .fq-refresh-button:disabled{opacity:.5;cursor:wait}
html.fq-embedded body.ux-forms .fq-tabs .fq-refresh-button svg{flex:none}
html.fq-embedded body.ux-forms #fq-form-grid .fq-actions{display:grid;align-items:center;grid-auto-rows:auto}
/* Rename stays beside the title and is available only on an expanded card. */
.ux-forms .fq-form-card-summary .fq-form-name-edit{display:none}
.ux-forms .fq-form-collapsible details[open]>.fq-form-card-summary .fq-form-name-edit{
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  min-height:44px;min-width:44px;margin:0;padding:8px 4px;border:0;border-radius:6px;
  background:transparent;color:var(--fq-deep,#b33161);box-shadow:none;
  font-family:inherit;font-size:13px;font-weight:500;line-height:1.4;
  white-space:nowrap;cursor:pointer;transform:none
}
body.ux-forms #fq-form-grid details[open]>.fq-form-card-summary h3,
body.ux-forms #fq-recent details[open]>.fq-form-card-summary h3,
html.fq-embedded body.ux-forms #fq-form-grid details[open]>.fq-form-card-summary h3{flex:0 1 auto}
.ux-forms details[open]>.fq-form-card-summary .fq-form-card-chevron{margin-left:auto}
.ux-forms .fq-form-name-editor{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;padding:0 0 16px;margin:0 0 16px;border-bottom:1px solid var(--line,var(--fq-line))}
.ux-forms .fq-form-name-editor>label{display:grid;gap:8px;min-width:0;margin:0;font-size:14px;font-weight:500}
.ux-forms .fq-form-name-editor input{width:100%;min-width:0;box-sizing:border-box;min-height:44px;margin:0;padding:10px 12px;font-family:inherit;font-size:16px;line-height:1.5;border:1px solid var(--line,var(--fq-line));border-radius:10px;background:var(--surface,var(--fq-card,#fff));color:var(--ink,inherit)}
.ux-forms .fq-form-name-actions{display:flex;gap:8px}
.ux-forms .fq-form-name-actions button{min-height:44px;margin:0;padding:10px 16px;border-radius:10px;font-size:14px;line-height:1.5}
.ux-forms .fq-form-name-editor>.fq-note{grid-column:1/-1;margin:0;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
@media(max-width:600px){.ux-forms .fq-form-name-editor{grid-template-columns:minmax(0,1fr)}.ux-forms .fq-form-name-actions{justify-content:flex-end}.ux-forms .fq-form-card-summary{gap:8px}}
