#app-shell #view:has(> #facebook-entity-editor-host) { display: flex; flex-direction: column; height: calc(100dvh - 56px); min-height: 0; overflow: hidden; }
#facebook-entity-editor-host { display: flex; flex: 1; height: 100%; min-height: 0; }
.fbem-editor { --fbem-line: var(--ar-line,#dfe3eb); --fbem-surface: var(--ar-surface,#fff); --fbem-canvas: var(--ar-canvas,#f5f5f8); --fbem-muted: var(--ar-secondary,#626a78); --fbem-link: var(--ar-link,#0068da); display: flex; flex: 1; flex-direction: column; height: 100%; min-height: 0; min-width: 0; font: inherit; color: var(--ar-text,#202734); background: var(--fbem-canvas); border: 1px solid var(--fbem-line); border-radius: 14px; overflow: hidden; }
.fbem-editor :is(button,input,select,textarea) { font-family: inherit; }
.fbem-editor [hidden] { display: none!important; }
.fbem-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; min-height: 60px; flex: none; background: var(--fbem-surface); border-bottom: 1px solid var(--fbem-line); }
.fbem-header .fbem-back { display: inline-flex; align-items: center; justify-content: center; width: 36px; min-width: 36px; height: 36px; padding: 0; }
.fbem-breadcrumb { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; }
.fbem-breadcrumb button { display: inline-flex; align-items: center; gap: 6px; max-width: 230px; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.fbem-breadcrumb button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fbem-breadcrumb button[aria-current] { background: color-mix(in srgb,var(--fbem-link) 9%,var(--fbem-surface)); color: var(--fbem-link); font-weight: 600; }
.fbem-crumb-divider { color: var(--fbem-muted); }
.fbem-platform { color: var(--fbem-muted); font-size: 12px; white-space: nowrap; }
.fbem-toolbar { display: flex; justify-content: center; flex: none; min-height: 40px; padding: 2px 16px 6px; border-bottom: 1px solid var(--fbem-line); background: var(--fbem-surface); }
.fbem-modes { display: flex; gap: 4px; }
.fbem-modes button { min-width: 64px; padding: 6px 12px; border: 0; border-radius: 6px; background: transparent; color: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fbem-modes button[aria-pressed=true] { color: var(--fbem-link); background: color-mix(in srgb,var(--fbem-link) 9%,var(--fbem-surface)); }
.fbem-body { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(172px,15vw,250px) minmax(0,1fr); }
.fbem-tree { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow: auto; padding: 12px 8px; border-right: 1px solid var(--fbem-line); background: var(--fbem-surface); }
.fbem-tree-item { display: grid; grid-template-columns: 16px minmax(0,1fr) 5px; align-items: center; gap: 7px; width: 100%; min-height: 38px; flex: none; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fbem-tree-item[data-fbem-entity-type=adset] { padding-left: 26px; }
.fbem-tree-item[data-fbem-entity-type=ad] { padding-left: 42px; }
.fbem-tree-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.fbem-tree-item[aria-current=page] { border-color: color-mix(in srgb,var(--fbem-link) 22%,var(--fbem-surface)); background: color-mix(in srgb,var(--fbem-link) 8%,var(--fbem-surface)); color: var(--fbem-link); }
.fbem-tree-item:hover { background: color-mix(in srgb,var(--fbem-link) 5%,var(--fbem-surface)); }
.fbem-tree-paused { width: 5px; height: 5px; border-radius: 50%; background: var(--fbem-muted); }
.fbem-tree-heading { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: 13px; }
.fbem-tree-note { margin: 10px 8px; color: var(--fbem-muted); font-size: 12px; line-height: 1.6; }
.fbem-tree-more { margin: 4px 8px; padding: 6px 10px; background: transparent; color: var(--fbem-link); border: 1px solid var(--fbem-line); border-radius: 7px; font-size: 12px; cursor: pointer; }
.fbem-scroll { overflow: auto; min-height: 0; padding: 16px clamp(12px,2vw,32px) 24px; overflow-anchor: none; }
.fbem-columns { display: grid; grid-template-columns: minmax(0,2fr) minmax(232px,1fr); align-items: start; gap: 14px; max-width: 980px; margin-inline: auto; }
.fbem-main,.fbem-main form { display: grid; gap: 12px; min-width: 0; margin: 0; }
.fbem-aside { position: sticky; top: 0; display: grid; gap: 12px; min-width: 0; }
.fbem-card { display: grid; gap: 14px; margin: 0; padding: 18px 22px; border: 1px solid var(--fbem-line); border-radius: 12px; background: var(--fbem-surface); min-width: 0; box-shadow: none; }
.fbem-editor .fbem-card h2 { margin: 0; font-size: 14px; font-weight: 600; line-height: 20px; }
.fbem-card p { margin: 0; font-size: 13px; line-height: 1.6; }
.fbem-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--fbem-line); border-radius: 9px; background: var(--fbem-surface); }
.fbem-tabs button { flex: 1; min-height: 32px; min-width: max-content; padding: 5px 10px; color: var(--fbem-muted); background: transparent; border: 1px solid transparent; border-radius: 6px; font-size: 13px; cursor: pointer; }
.fbem-tabs button[aria-current=page] { color: var(--fbem-link); background: color-mix(in srgb,var(--fbem-link) 8%,var(--fbem-surface)); border-color: color-mix(in srgb,var(--fbem-link) 18%,var(--fbem-surface)); font-weight: 600; }
.fbem-field { display: grid; gap: 7px; min-width: 0; align-content: start; }
.fbem-editor .fbem-field > label { display: block; margin: 0; color: inherit; font-size: 13px; font-weight: 400; line-height: 20px; }
.fbem-editor .fbem-field input[type=text], .fbem-editor .fbem-field textarea, .fbem-editor .fbem-field select { display: block; width: 100%; min-width: 0; margin: 0; border: 1px solid var(--ar-border,#9eacc1); border-radius: 9px; padding: 8px 11px; background: var(--fbem-surface); color: inherit; font: inherit; font-size: 13px; line-height: 20px; box-sizing: border-box; }
.fbem-field input[type=text],.fbem-field select { height: 36px; }
.fbem-field textarea { resize: vertical; }
.fbem-field input:focus,.fbem-field textarea:focus { outline: 2px solid color-mix(in srgb,var(--fbem-link) 24%,transparent); outline-offset: 1px; border-color: var(--fbem-link); }
.fbem-field.is-invalid :is(input,textarea,.custom-select-trigger) { border-color: #c51a32!important; }
.fbem-field-error { color: #c51a32; font-size: 12px; }
.fbem-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.fbem-checkboxes { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.fbem-checkboxes label,.fbem-check { display: flex!important; align-items: center; gap: 8px; margin: 0; font-size: 13px; line-height: 1.6; }
.fbem-checkboxes input,.fbem-check input { flex: none; margin: 0; }
.fbem-countries { border: 1px solid var(--ar-border,#9eacc1); border-radius: 9px; overflow: hidden; }
.fbem-countries > summary { padding: 8px 11px; font-size: 13px; cursor: pointer; }
.fbem-countries > input { width: calc(100% - 20px); margin: 6px 10px 10px; padding: 8px 10px; border: 1px solid var(--fbem-line); border-radius: 7px; font: inherit; }
.fbem-country-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 260px; overflow: auto; padding: 0 10px 10px; gap: 5px 8px; }
.fbem-country-options > label { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 30px; margin: 0; font-size: 13px; cursor: pointer; }
.fbem-country-options > label input { flex: none; margin: 0; }
.fbem-country-options > label span { min-width: 0; overflow-wrap: anywhere; }
.fbem-muted { color: var(--fbem-muted); font-size: 12px; line-height: 1.6; }
.fbem-readonly { display: grid; gap: 4px; min-width: 0; font-size: 13px; line-height: 1.6; }
.fbem-readonly > span,.fbem-readonly small { color: var(--fbem-muted); }
.fbem-readonly > strong { font-weight: 500; overflow-wrap: anywhere; }
.fbem-readonly small { font-size: 12px; }
.fbem-summary { display: grid; gap: 12px; margin: 0; font-size: 13px; }
.fbem-summary > div { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 10px; align-items: start; }
.fbem-summary dt { color: var(--fbem-muted); }
.fbem-summary dd { margin: 0; text-align: right; line-height: 1.5; overflow-wrap: anywhere; }
.fbem-identity { display: grid; gap: 4px; font-size: 13px; min-width: 0; }
.fbem-identity strong { font-weight: 600; overflow-wrap: anywhere; }
.fbem-identity span { color: var(--fbem-muted); font-size: 12px; }
.fbem-footer { display: flex; flex: none; gap: 8px; align-items: center; padding: 10px 16px; background: var(--fbem-surface); border-top: 1px solid var(--fbem-line); }
.fbem-footer > [role=status] { flex: 1; min-width: 0; font-size: 12px; color: var(--fbem-muted); }
.fbem-error { padding: 12px 14px; border: 1px solid #efb5bd; border-radius: 10px; background: #fff4f5; color: #b52035; font-size: 13px; line-height: 1.6; }
.fbem-review { display: grid; gap: 12px; margin: 0; }
.fbem-review > div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--fbem-line); font-size: 13px; }
.fbem-review dt { font-weight: 500; }
.fbem-review dd { display: grid; grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr); align-items: center; gap: 10px; margin: 0; overflow-wrap: anywhere; line-height: 1.6; }
.fbem-review dd strong { font-weight: 600; }
.fbem-before,.fbem-change-arrow { color: var(--fbem-muted); }
.fbem-safe-status { color: var(--ar-success,#13794e); }
.fbem-dialog-backdrop { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; padding: 20px; background: #1c253a55; }
.fbem-dialog { display: grid; gap: 16px; padding: 24px; width: min(440px,100%); background: var(--fbem-surface); border-radius: 16px; box-shadow: 0 16px 60px #1c253a30; }
.fbem-dialog h2 { margin: 0; font-size: 18px; }
.fbem-dialog p { margin: 0; font-size: 13px; }
.fbem-dialog footer { display: flex; justify-content: flex-end; gap: 8px; }
.fbem-dialog .danger { color: #c9253a; background: #fff; border: 1px solid #efb5bd; }
.fbem-datetime { display: grid; grid-template-columns: minmax(0,1fr) 110px; align-items: center; gap: 0; height: 36px; border: 1px solid var(--ar-border,#9eacc1); border-radius: 9px; background: var(--fbem-surface); overflow: hidden; }
.fbem-datetime:focus-within { border-color: var(--fbem-link); box-shadow: 0 0 0 2px color-mix(in srgb,var(--fbem-link) 20%,transparent); }
.fbem-editor .fbem-datetime .date-picker-trigger { min-width: 0; width: 100%; height: 34px!important; min-height: 34px!important; padding: 7px 10px; border: 0!important; border-radius: 0!important; box-shadow: none!important; background: transparent!important; }
.fbem-datetime .date-picker-trigger strong { font-size: 13px; font-weight: 400; }
.fbem-editor .fbem-datetime .ad-publishing-time { height: 34px; min-height: 34px; border: 0; border-left: 1px solid var(--fbem-line); border-radius: 0; padding: 0 8px; box-shadow: none; }
.fbem-editor .ad-publishing-time .ad-publishing-time-part { width: 2.5ch!important; min-width: 0; height: 30px!important; min-height: 30px!important; padding: 0!important; border: 0!important; border-radius: 2px; background: transparent; text-align: center; box-shadow: none!important; outline: 0!important; }
.fbem-calendar { position: fixed; inset: auto; box-sizing: border-box; display: grid; grid-template-columns: minmax(0,1fr); width: min(275px,calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: hidden auto; margin: 0; padding: 10px; }
.fbem-calendar .calendar-week,.fbem-calendar .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); width: 100%; gap: 2px; }
.fbem-calendar .calendar-day { width: 100%; min-width: 0; }
.fbem-more { border-top: 1px solid var(--fbem-line); padding-top: 12px; min-width: 0; }
.fbem-more summary { cursor: pointer; font-size: 13px; }
.fbem-more[open] > :not(summary) { margin-top: 14px; }
.fbem-media { display: block; width: 100%; max-height: 230px; object-fit: contain; background: var(--fbem-canvas); border-radius: 8px; }
.fbem-media.is-preview { max-height: 310px; border-radius: 0; }
.fbem-media-empty { display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 150px; padding: 20px; background: var(--fbem-canvas); color: var(--fbem-muted); font-size: 12px; border-radius: 8px; }
.fbem-media-empty svg { width: 24px; height: 24px; }
.fbem-ad-preview { border: 1px solid var(--fbem-line); border-radius: 8px; overflow: hidden; min-width: 0; }
.fbem-ad-preview > header { display: flex; align-items: center; gap: 8px; padding: 12px; }
.fbem-ad-preview > header > div { display: grid; gap: 3px; }
.fbem-ad-preview strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.fbem-ad-preview small { font-size: 11px; color: var(--fbem-muted); overflow-wrap: anywhere; }
.fbem-ad-preview > p { padding: 0 12px 12px; font-size: 13px; white-space: pre-wrap; }
.fbem-preview-caption { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 12px; background: var(--fbem-canvas); }
.fbem-preview-caption > div { display: grid; gap: 4px; min-width: 0; }
.fbem-preview-caption > span { flex: none; max-width: 100px; padding: 5px 7px; border: 1px solid var(--fbem-line); border-radius: 5px; font-size: 11px; }
.fbem-ad-preview > footer { display: flex; justify-content: space-around; padding: 10px; border-top: 1px solid var(--fbem-line); color: var(--fbem-muted); font-size: 12px; }
@media(max-width:1250px) { .fbem-platform { display: none; } .fbem-columns { grid-template-columns: minmax(0,1fr) 250px; } .fbem-card { padding: 17px; } .fbem-breadcrumb button { max-width: 180px; } }
@media(max-width:1050px) { .fbem-columns { grid-template-columns: minmax(0,1fr); max-width: 720px; } .fbem-aside { position: static; } .fbem-aside:has(.fbem-ad-preview) { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .fbem-header { padding: 10px; } .fbem-header > .button:not(.fbem-back) { font-size: 12px; } .fbem-breadcrumb button { max-width: 90px; } .fbem-breadcrumb button svg { display: none; } .fbem-body { grid-template-columns: 135px minmax(0,1fr); } .fbem-tree-item[data-fbem-entity-type=adset] { padding-left: 10px; } .fbem-tree-item[data-fbem-entity-type=ad] { padding-left: 18px; } .fbem-scroll { padding: 12px; } .fbem-card { padding: 14px; } .fbem-two,.fbem-checkboxes,.fbem-aside:has(.fbem-ad-preview) { grid-template-columns: minmax(0,1fr); } .fbem-review > div { grid-template-columns: minmax(0,1fr); } .fbem-tabs button { font-size: 12px; } }
