/* Elefair Apps Builder - editor widgets only. The page shell (sidebar, header, footer, .ab-* components) comes from
   elefair.app's /apps-shell.css, loaded before this file; nothing here restyles those classes. */
:root {
  --brand: var(--ink); --amz-hover: var(--amz-h); --soft: #FFF8D6; --danger: #b91c1c; --radius: var(--r);
}
[hidden] { display: none !important; }
.notice { background: var(--soft); border: 1px solid var(--amz-h); border-radius: 10px; padding: 10px 12px; margin-top: 14px; font-size: 14px; }
p.sub { color: var(--muted); margin: 0 0 18px; }
.ab-card h2 { margin-bottom: 12px; }
.ab-head h2, .ab-empty h2 { margin: 0; }
.ab-empty p { margin: 6px 0 16px; }
.top-actions { display: flex; gap: 8px; }
.row.end { justify-content: flex-end; flex-wrap: nowrap; }
.guides .ab-card p, .guides .ab-card ol { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.guides .ab-card ol { padding-left: 20px; }
.help.note { max-width: 320px; }
pre.log.tall { max-height: 460px; }
@media (max-width: 700px) { .ab-top .who, .ab-top .top-dash { display: none; } .ab-top h1 { font-size: 17px; } }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

button:not(.ab-btn) { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 9px 16px; border-radius: 12px; cursor: pointer; display: inline-block; }
button:not(.ab-btn):hover { border-color: var(--line-2); }
button.primary:not(.ab-btn) { background: var(--amz); border-color: var(--amz-hover); color: var(--amz-ink); font-weight: 700; }
button.primary:not(.ab-btn):hover:not(:disabled) { background: var(--amz-hover); border-color: var(--amz-hover); }
button.danger:not(.ab-btn) { color: var(--danger); }
button:not(.ab-btn):disabled { opacity: .55; cursor: not-allowed; }
button.link { border: 0; background: none; padding: 0; color: var(--brand); text-decoration: underline; }

label { display: block; font-weight: 600; margin: 14px 0 5px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 2px solid var(--amz-hover); outline-offset: 1px; }
textarea { min-height: 90px; resize: vertical; }
input[type=color] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.help { color: var(--muted); font-size: 13px; margin-top: 4px; }
.error { color: var(--danger); margin-top: 12px; min-height: 1.4em; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }

.auth { max-width: 400px; margin: 40px auto; }
.tpl h3 { margin: 8px 0 4px; font-size: 16px; }
.tpl p { color: var(--muted); margin: 0 0 14px; min-height: 44px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--soft); color: var(--amz-ink); }
.tag.soon { background: #eef0f4; color: var(--muted); }
.tpl.off { opacity: .7; }
.status { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #eef0f4; color: var(--muted); text-transform: capitalize; }
.status.queued, .status.building { background: #fff3dc; color: var(--warn); }
.status.ready, .status.built, .status.published { background: #dff5e8; color: var(--ok); }
.status.failed { background: #fde4e4; color: var(--danger); }

.ab-editor .side { position: sticky; top: 84px; }
@media (max-width: 1100px) { .ab-editor .side { position: static; } }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-size: 17px; font-weight: 700; padding: 0; margin: 22px 0 0; }
fieldset:first-of-type legend { margin-top: 0; }
fieldset + fieldset { margin-top: 22px; }

/* editor tabs and design controls */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: -4px 0 20px; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 9px 14px; color: var(--muted); }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--amz-hover); }
.field { margin-top: 14px; }
.flabel { display: block; font-weight: 600; margin-bottom: 5px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { margin: 0; font-weight: 600; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.seg input:checked + span { background: var(--soft); border-color: var(--amz-hover); color: var(--amz-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.seg.small { justify-content: center; margin-top: 12px; }
.seg.small span { padding: 4px 11px; font-size: 13px; }
.colors { gap: 16px; align-items: flex-end; }
.colors label { margin-top: 12px; font-size: 13px; }
.pane .check { margin-top: 14px; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 10px; }
.theme { padding: 6px; font-size: 13px; font-weight: 600; text-align: center; }
.theme .sw { display: block; height: 46px; border-radius: 6px; margin-bottom: 5px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.theme .sw i { position: absolute; left: 0; right: 0; top: 0; height: 13px; }
.theme .sw b { position: absolute; left: 7px; right: 7px; top: 19px; height: 19px; border-radius: 3px; }
.theme .sw u { position: absolute; right: 11px; top: 24px; width: 9px; height: 9px; border-radius: 50%; }
.link-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 8px; margin-top: 8px; }
.link-row button { padding: 6px 12px; font-size: 18px; line-height: 1; }
#addLink { margin-top: 10px; }

/* screen builder */
.strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.strip button[aria-selected=true] { background: var(--soft); border-color: var(--amz-hover); color: var(--amz-ink); }
.row3 { display: grid; grid-template-columns: 2fr 1.3fr 2fr; gap: 12px; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr; } }
.block { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; background: #fff; }
.block.open { border-color: var(--brand); }
.block.dragging { opacity: .4; }
.block.drop-before { box-shadow: 0 -3px 0 var(--brand); }
.block.drop-after { box-shadow: 0 3px 0 var(--brand); }
.block-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.block-head .grip { cursor: grab; color: var(--muted); letter-spacing: -3px; padding: 0 6px 0 2px; user-select: none; }
.block-head button { padding: 5px 10px; }
.block-head .block-title { flex: 1; min-width: 0; text-align: left; border: 0; background: none; font-weight: 400; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.block-title span { color: var(--muted); }
.block-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.palette button { padding: 6px 11px; font-size: 13px; }

/* phone preview: colors, font and corner sizes come from the customer's design (CSS variables set inline) */
.phone { width: 290px; height: 590px; margin: 0 auto; border: 10px solid #151922; border-radius: 38px; background: var(--p-bg, #fff); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 14px 34px rgba(19,26,43,.18);
  font-family: var(--p-font, inherit); color: var(--p-text, #131a2b); }
.ph-bar { background: var(--p-head); color: var(--p-head-text); padding: 14px 12px 12px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: calc(15px * var(--p-scale, 1)); }
.ph-bar.plain { border-bottom: 1px solid var(--p-line); }
.ph-title { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ph-bar.center .ph-title { text-align: center; }
.ph-bar.center .ph-side { width: 30px; flex: none; display: flex; justify-content: center; }
.ph-side:empty { display: none; }
.ph-bar.center .ph-side:empty { display: flex; }
.ph-icon { font-size: 20px; line-height: 1; }
.ph-logo { width: 30px; height: 30px; border-radius: min(var(--p-radius, 8px), 8px); background: color-mix(in srgb, var(--p-head-text) 22%, transparent); object-fit: cover; display: grid; place-items: center; flex: none; }
.ph-body { flex: 1; overflow: hidden; padding: 10px; background: var(--p-bg); }
.ph-body.ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; align-content: start; }
.ph-item { background: var(--p-surface); border-radius: var(--p-radius); margin-bottom: 9px; overflow: hidden; }
.ph-grid .ph-item { margin-bottom: 0; }
.ph-item.rowitem { display: flex; }
.ph-thumb { height: 92px; background: var(--p-ph); position: relative; }
.ph-item.rowitem .ph-thumb { width: 84px; height: auto; min-height: 58px; flex: none; }
.ph-item.tile .ph-thumb { height: 66px; }
.ph-play { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--p-accent); color: var(--p-on-accent); font-size: 12px; }
.ph-item.rowitem .ph-play, .ph-item.tile .ph-play { width: 22px; height: 22px; font-size: 9px; right: 5px; bottom: 5px; }
.ph-txt { padding: 9px 11px; font-size: calc(13px * var(--p-scale, 1)); font-weight: 700; line-height: 1.3; }
.ph-item.rowitem .ph-txt, .ph-item.tile .ph-txt { font-size: calc(12px * var(--p-scale, 1)); padding: 8px 9px; }
.ph-txt small { display: block; font-weight: 400; color: var(--p-muted); margin-top: 3px; }
.ph-menu { background: var(--p-surface); padding: 4px 14px; }
.ph-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--p-line); font-size: calc(13.5px * var(--p-scale, 1)); }
.ph-mark { color: var(--p-muted); font-size: 16px; }
.ph-tv { flex: 1; background: #05070c; color: #fff; display: grid; place-items: center; position: relative; text-align: center; padding: 0 16px; }
.ph-tv .live { position: absolute; top: 14px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--p-accent); color: var(--p-on-accent); }
.ph-tvmenu { position: absolute; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: 16px; }
.ph-tv .hint { font-size: 12px; opacity: .65; margin-top: 8px; }
.ph-page { overflow-y: auto; scrollbar-width: none; }
.ph-page .ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 9px; }
.pb { margin-bottom: 9px; cursor: pointer; border-radius: 4px; }
.pb:hover { outline: 2px dashed color-mix(in srgb, var(--p-text) 35%, transparent); outline-offset: 2px; }
.pb-title { font-weight: 700; font-size: calc(14px * var(--p-scale, 1)); margin-bottom: 7px; }
.pb-heading { font-weight: 700; font-size: calc(17px * var(--p-scale, 1)); line-height: 1.25; }
.pb-text { font-size: calc(12.5px * var(--p-scale, 1)); line-height: 1.5; white-space: pre-wrap; max-height: 120px; overflow: hidden; }
.pb-image { border-radius: var(--p-radius); background: var(--p-ph); overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--p-muted); font-size: 12px; }
.pb-image.banner { aspect-ratio: 3 / 1; } .pb-image.square { aspect-ratio: 1; } .pb-image.tall { aspect-ratio: 4 / 5; }
.pb-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-button { text-align: center; font-weight: 700; padding: 10px; border-radius: min(var(--p-radius), 14px); background: var(--p-primary); color: var(--p-on-primary); border: 1.5px solid var(--p-primary); font-size: calc(13.5px * var(--p-scale, 1)); }
.pb-button.outline { background: none; color: var(--p-link); border-color: var(--p-link); }
.pb-tv, .pb-web { border-radius: var(--p-radius); aspect-ratio: 16 / 9; display: grid; place-items: center; align-content: center; gap: 4px; font-size: 22px; text-align: center; }
.pb-tv { background: #05070c; color: #fff; }
.pb-web { background: var(--p-surface); border: 1px dashed var(--p-line); aspect-ratio: auto; height: 120px; } .pb-web.small { height: 80px; } .pb-web.large { height: 170px; }
.pb-tv small, .pb-web small { font-size: 11px; opacity: .7; max-width: 90%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pb-card { background: var(--p-surface); border-radius: var(--p-radius); padding: 2px 11px; font-size: calc(12.5px * var(--p-scale, 1)); }
.pb-card div { padding: 7px 0; border-bottom: 1px solid var(--p-line); overflow: hidden; text-overflow: ellipsis; } .pb-card div:last-child { border-bottom: 0; }
.pb-card small { display: block; color: var(--p-muted); font-size: 10px; text-transform: uppercase; }
.pb-line { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pb-line b { font-weight: 600; } .pb-line small { text-transform: none; font-size: 11px; }
.pb-line em { font-style: normal; font-weight: 700; color: var(--p-link); white-space: nowrap; }
.pb-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .pb-gallery.c3 { grid-template-columns: 1fr 1fr 1fr; }
.pb-gallery img, .pb-gallery span { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: min(var(--p-radius), 10px); background: var(--p-ph); display: block; }
.pb-form { background: var(--p-surface); border-radius: var(--p-radius); padding: 11px; display: grid; gap: 8px; }
.pb-form label { margin: 0; font-size: calc(11.5px * var(--p-scale, 1)); font-weight: 600; color: var(--p-text); }
.pb-form i { display: block; height: 26px; margin-top: 3px; border: 1px solid var(--p-line); border-radius: min(var(--p-radius), 8px); background: var(--p-bg); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.thumbs span { position: relative; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--line); }
.thumbs button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0; border-radius: 50%; line-height: 1; font-size: 14px; }
.pb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-chips span { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: min(var(--p-radius), 16px); padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--p-link); }
.pb-divider { height: 1px; background: var(--p-line); margin: 4px 0; }
.pb-note { font-size: 12px; color: var(--p-muted); border: 1px dashed var(--p-line); border-radius: 8px; padding: 9px; text-align: center; }
.ph-tabs { display: flex; background: var(--p-surface); border-top: 1px solid var(--p-line); }
.ph-tabs button { flex: 1; min-width: 0; border: 0; border-radius: 0; background: none; padding: 6px 2px 8px; font-family: inherit; font-size: 10.5px; font-weight: 400; color: var(--p-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ph-tabs button span { display: block; font-size: 16px; opacity: .45; }
.ph-tabs button.on { color: var(--p-link); font-weight: 700; } .ph-tabs button.on span { opacity: 1; }
.ph-status { height: 26px; background: var(--p-head); }
.ps-site { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 999px; padding: 5px 12px; font-size: 11px; color: var(--p-muted); margin-bottom: 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ps-banner { border-radius: var(--p-radius); background: var(--p-ph); height: 86px; display: grid; place-items: center; font-size: 11.5px; color: var(--p-muted); margin-bottom: 9px; text-align: center; padding: 0 10px; }
/* fonts that ship inside the apps, loaded for the preview */
@font-face { font-family: 'EAB inter'; src: url('fonts/inter-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB inter'; src: url('fonts/inter-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EAB poppins'; src: url('fonts/poppins-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB poppins'; src: url('fonts/poppins-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EAB montserrat'; src: url('fonts/montserrat-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB montserrat'; src: url('fonts/montserrat-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EAB nunito'; src: url('fonts/nunito-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB nunito'; src: url('fonts/nunito-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EAB robotoslab'; src: url('fonts/robotoslab-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB robotoslab'; src: url('fonts/robotoslab-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EAB playfairdisplay'; src: url('fonts/playfairdisplay-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB playfairdisplay'; src: url('fonts/playfairdisplay-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EAB hindsiliguri'; src: url('fonts/hindsiliguri-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB hindsiliguri'; src: url('fonts/hindsiliguri-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EAB notosansbengali'; src: url('fonts/notosansbengali-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB notosansbengali'; src: url('fonts/notosansbengali-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EAB notoserifbengali'; src: url('fonts/notoserifbengali-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB notoserifbengali'; src: url('fonts/notoserifbengali-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'EAB balooda2'; src: url('fonts/balooda2-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EAB balooda2'; src: url('fonts/balooda2-Bold.ttf'); font-weight: 700; font-display: swap; }
.ph-splash { flex: 1; display: grid; place-items: center; }
.ph-splash img { display: block; height: auto; }
.ph-splash span { display: grid; place-items: center; border-radius: 22%; font-weight: 700; }
.ph-caption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }

.table-wrap { overflow-x: auto; }
pre.log { background: #10141d; color: #d8deea; padding: 10px; border-radius: 8px; font-size: 12px; white-space: pre-wrap; max-height: 180px; overflow: auto; margin: 6px 0 0; }


/* notifications */
.sent { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sent:last-child { border-bottom: 0; }
.sent p { margin: 4px 0 0; white-space: pre-wrap; }
.ph-notice { flex: 1; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.55); height: 100%; }
.ph-notice-card { background: #fff; color: #131a2b; border-radius: 12px; padding: 16px; width: 100%; font-size: 13px; }
.ph-notice-card b { font-size: 15px; display: block; overflow-wrap: anywhere; }
.ph-notice-card p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ph-notice-card div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ph-notice-card span { padding: 6px 12px; border-radius: 9px; border: 1px solid #dfe4ee; font-weight: 700; }
.ph-notice-card span.go { background: #131a2b; color: #fff; border-color: #131a2b; }
