.site-popup-layer { width:var(--popup-layer-width,915px); max-width:100%; min-width:0; position:absolute; z-index:1900; top:var(--popup-layer-y,0); left:var(--popup-layer-x,0); display:flex; flex-wrap:wrap; align-items:flex-start; align-content:flex-start; justify-content:var(--popup-layer-justify,flex-start); column-gap:5px; row-gap:3px; box-sizing:border-box; pointer-events:none; }
.site-popup { width:min(var(--popup-width,300px),100%); max-width:100%; position:relative; flex:0 0 min(var(--popup-width,300px),100%); box-sizing:border-box; overflow:hidden; pointer-events:auto; border:0; border-radius:0; background:#fff; box-shadow:none; }
.site-popup.is-dismissed { visibility:hidden; pointer-events:none; }
.site-popup__media { width:100%; aspect-ratio:var(--popup-aspect,300 / 393); overflow:hidden; background:#f2f5f7; }
.site-popup__link,.site-popup__image { width:100%; height:100%; display:block; }
.site-popup__image { object-fit:contain; }
.site-popup__footer { height:39px; padding:0; display:flex; align-items:center; justify-content:flex-end; background:#080808; }
.site-popup__footer button { min-height:39px; padding:0 10px; border-radius:0; color:#fff; font-size:10px; font-weight:700; }
.site-popup__today-option { min-width:0; height:39px; margin-left:auto; padding:0 10px; display:inline-flex; align-items:center; justify-content:flex-end; gap:6px; border-right:1px solid rgba(255,255,255,.18); color:#fff; font-size:10px; font-weight:700; line-height:1; text-align:right; white-space:nowrap; cursor:pointer; }
.site-popup__today-checkbox { width:14px; height:14px; margin:0; flex:0 0 14px; accent-color:#fff; cursor:pointer; }
.site-popup__today-option span { min-width:0; text-align:right; }
.site-popup__footer button:hover { background:#242424; color:#fff; }
.site-popup__close { width:52px; flex:0 0 52px; background:#393939; text-align:center; }
.site-popup-flow-break { width:100%; height:0; flex:0 0 100%; pointer-events:none; }
@media (max-width:600px) {
  .site-popup-layer { max-width:calc(100vw - 16px); justify-content:center; }
  .site-popup.is-dismissed { display:none; }
  .site-popup[data-mobile-primary="false"] { display:none; }
  .site-popup-flow-break { display:none; }
}

.popup-layout-settings { margin-bottom:14px; padding:14px 16px; display:grid; grid-template-columns:minmax(245px,1.25fr) minmax(210px,.75fr) 120px minmax(210px,.7fr) minmax(130px,.45fr) 110px; gap:10px; align-items:end; border:1px solid #bdd7e8; border-radius:14px; background:linear-gradient(135deg,#f8fcff,#eaf5fc); box-shadow:0 10px 28px rgba(20,78,119,.06); }
.popup-layout-settings > div { display:grid; gap:3px; }
.popup-layout-settings > div small { color:#1475bc; font-size:8px; font-weight:900; letter-spacing:.13em; }
.popup-layout-settings > div strong { color:#173b5c; font-size:15px; }
.popup-layout-settings > div span { color:#6e8495; font-size:10px; line-height:1.5; }
.popup-layout-settings > label { display:grid; grid-template-columns:auto minmax(54px,1fr) auto; gap:6px; align-items:center; }
.popup-layout-settings > label span,.popup-layout-settings > label b { color:#385b74; font-size:10px; font-weight:900; }
.popup-layout-settings > label input { width:100%; min-width:0; height:40px; padding:7px 8px; border:1px solid #bdd1df; border-radius:8px; background:#fff; color:#153b59; font-size:14px; font-weight:900; text-align:center; }
.popup-layout-settings fieldset { min-width:0; margin:0; padding:0; border:0; }
.popup-layout-settings legend { margin-bottom:6px; color:#385b74; font-size:9px; font-weight:900; }
.popup-layout-align-options { min-height:40px; padding:3px; display:grid; grid-template-columns:repeat(3,1fr); gap:3px; border:1px solid #bdd1df; border-radius:9px; background:#fff; }
.popup-layout-align-options label { min-width:0; position:relative; cursor:pointer; }
.popup-layout-align-options input { position:absolute; opacity:0; pointer-events:none; }
.popup-layout-align-options span { height:32px; display:grid; place-items:center; border-radius:6px; color:#607b8e; font-size:9px; font-weight:900; }
.popup-layout-align-options input:checked + span { background:#1475bc; color:#fff; box-shadow:0 5px 12px rgba(20,117,188,.2); }
.popup-layout-vertical { min-height:40px; display:grid; grid-template-columns:auto 34px minmax(68px,1fr) 34px; gap:5px; align-items:center; }
.popup-layout-vertical > span { color:#385b74; font-size:10px; font-weight:900; }
.popup-layout-vertical button { width:34px; height:34px; display:grid; place-items:center; border:1px solid #bdd1df; border-radius:7px; background:#fff; color:#1475bc; font-size:14px; font-weight:900; }
.popup-layout-vertical button:disabled { opacity:.3; cursor:not-allowed; }
.popup-layout-vertical output { min-width:0; min-height:34px; padding:4px 7px; justify-content:center; color:#31566f; font-size:10px; font-weight:900; white-space:nowrap; }
.popup-layout-settings output { min-height:40px; padding:6px 11px; display:flex; align-items:center; justify-content:space-between; gap:9px; border:1px solid #c8dce9; border-radius:8px; background:#fff; }
.popup-layout-settings output span { color:#6e8495; font-size:9px; font-weight:800; }
.popup-layout-settings output strong { color:#126fae; font-size:18px; white-space:nowrap; }
.popup-layout-settings > button { min-height:40px; border-radius:8px; }
.popup-layout-save { min-width:110px; background:linear-gradient(135deg,#167bc0,#075f9e); box-shadow:0 8px 18px rgba(12,103,166,.2); transition:opacity .15s ease,transform .15s ease,box-shadow .15s ease; }
.popup-layout-save:not(:disabled):hover { transform:translateY(-1px); box-shadow:0 11px 22px rgba(12,103,166,.27); }
.popup-layout-save:disabled { background:#dce7ee; color:#8296a5; box-shadow:none; cursor:not-allowed; opacity:.82; }
.popup-layout-settings.is-dirty { border-color:#5ca4d5; box-shadow:0 0 0 2px rgba(37,133,204,.08),0 12px 30px rgba(20,78,119,.08); }
.popup-layout-settings > p { min-height:0; grid-column:2 / -1; color:#28704e; font-size:10px; font-weight:800; text-align:right; }
.popup-layout-settings > p.is-error { color:#b52c38; }
.popup-preview-workspace { margin-bottom:18px; min-width:0; display:grid; gap:12px; }
.popup-admin-layout { display:grid; grid-template-columns:minmax(260px,330px) minmax(0,1fr); gap:18px; align-items:start; }
.popup-admin-list-panel,.popup-editor { min-width:0; border:1px solid #cbdbe7; border-radius:16px; background:#fff; box-shadow:0 12px 34px rgba(21,58,86,.07); }
.popup-admin-list-panel { width:100%; display:grid; grid-template-columns:210px minmax(0,1fr); overflow:hidden; }
.popup-admin-list-heading { padding:12px 14px; display:grid; gap:9px; align-content:center; border-right:1px solid #dce6ee; background:linear-gradient(145deg,#f8fbfe,#edf5fa); }
.popup-admin-list-heading > div { display:grid; gap:4px; }
.popup-admin-list-heading strong { color:#173b5c; font-size:14px; }
.popup-admin-list-heading span { color:#73879a; font-size:10px; line-height:1.5; }
.popup-admin-list-heading button { width:100%; min-height:36px; border-radius:9px; }
.popup-admin-list { min-height:116px; max-height:none; padding:10px; display:flex; gap:8px; overflow-x:auto; overflow-y:hidden; scrollbar-gutter:stable; }
.popup-admin-list.is-updating { opacity:.56; pointer-events:none; }
.popup-admin-empty { padding:30px 12px; color:#75889a; font-size:12px; line-height:1.6; text-align:center; }
.popup-admin-card { width:268px; min-width:268px; padding:8px; display:grid; grid-template-columns:minmax(0,1fr) 30px; gap:7px; align-items:center; border:1px solid #d8e4ec; border-radius:11px; background:#f9fbfd; text-align:left; }
.popup-admin-card:hover,.popup-admin-card.is-active { border-color:#4b94ca; background:#edf7ff; box-shadow:0 0 0 2px rgba(37,133,204,.09); }
.popup-admin-card__open { min-width:0; padding:2px; display:grid; grid-template-columns:64px minmax(0,1fr); gap:10px; align-items:center; text-align:left; }
.popup-admin-card img { width:64px; height:64px; display:block; border-radius:8px; background:#eaf0f4; object-fit:contain; }
.popup-admin-card__open > span { min-width:0; display:grid; gap:4px; }
.popup-admin-card strong { overflow:hidden; color:#173b5c; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.popup-admin-card small { color:#718496; font-size:9px; }
.popup-admin-card em { width:max-content; padding:3px 6px; border-radius:999px; background:#e4f5eb; color:#18734a; font-size:8px; font-style:normal; font-weight:900; }
.popup-admin-card.is-disabled em { background:#eef1f4; color:#7a8995; }
.popup-admin-card.is-draft { border-style:dashed; border-color:#1683d0; background:#edf8ff; }
.popup-admin-card.is-draft em { background:#dceeff; color:#126da9; }
.popup-admin-card.is-pending { border-color:#df9a31; background:#fff9ed; box-shadow:0 0 0 2px rgba(223,154,49,.09); }
.popup-admin-card.is-pending em { background:#fff0ce; color:#9a5c00; }
.popup-admin-card__order { display:grid; gap:4px; }
.popup-admin-card__order button { width:28px; height:28px; display:grid; place-items:center; border:1px solid #cbdce8; border-radius:7px; background:#fff; color:#176fae; font-size:13px; font-weight:900; }
.popup-admin-card__order button:disabled { opacity:.28; cursor:not-allowed; }
.popup-editor-dialog { width:min(780px,96vw); max-width:none; max-height:92vh; padding:0; overflow:visible; border:0; border-radius:18px; background:transparent; box-shadow:0 26px 80px rgba(4,27,45,.34); }
.popup-editor-dialog::backdrop { background:rgba(8,24,37,.52); backdrop-filter:blur(3px); }
.popup-editor-dialog[open] { display:block; }
.popup-editor { width:100%; max-height:92vh; padding:18px; overflow:auto; border-radius:18px; }
.popup-editor-heading { margin:-18px -18px 18px; padding:17px 18px; display:flex; align-items:flex-start; justify-content:space-between; gap:14px; border-bottom:1px solid #dce6ee; background:linear-gradient(145deg,#fbfdff,#f2f7fb); border-radius:16px 16px 0 0; }
.popup-editor-heading > div { display:grid; gap:3px; }
.popup-editor-heading small { color:#1875bb; font-size:9px; font-weight:900; letter-spacing:.14em; }
.popup-editor-heading h3 { color:#142f46; font-size:20px; }
.popup-editor-heading p { color:#718496; font-size:10px; line-height:1.5; }
.popup-editor-heading > button { min-width:54px; min-height:34px; border-radius:8px; background:#edf3f7; color:#36566f; font-size:11px; font-weight:800; }
.popup-editor-grid { display:grid; grid-template-columns:1fr; gap:16px; align-items:start; }
.popup-editor-fields { padding:14px; display:grid; grid-template-columns:1fr 1fr; gap:11px; border:1px solid #d3e0e9; border-radius:13px; background:#f6f9fb; }
.popup-editor-fields label { min-width:0; display:grid; align-content:start; gap:6px; }
.popup-editor-fields label > span { color:#28475f; font-size:10px; font-weight:900; }
.popup-editor-fields :is(input,select) { width:100%; min-width:0; height:40px; padding:8px 10px; border:1px solid #cbd9e3; border-radius:8px; background:#fff; color:#17344b; }
.popup-editor-fields input[type="file"] { height:auto; padding:9px; }
.popup-editor-fields label > small { color:#8193a2; font-size:9px; line-height:1.45; }
.popup-editor-wide { grid-column:1 / -1; }
.popup-check-field { min-height:42px; padding:10px; grid-template-columns:auto minmax(0,1fr); align-items:center; border:1px solid #d4e1ea; border-radius:9px; background:#fff; }
.popup-check-field input { width:17px; height:17px; padding:0; accent-color:#1475bc; }
.popup-current-image { min-height:130px; display:grid; place-items:center; overflow:hidden; border:1px dashed #aec9db; border-radius:10px; background:#eaf2f7; color:#7c91a1; font-size:10px; text-align:center; }
.popup-current-image img { width:100%; max-height:230px; display:block; object-fit:contain; }
.popup-resolution-hint { padding:10px 11px; border:1px solid #bcd8ea; border-radius:9px; background:#eaf6ff; color:#1e628f; font-size:10px; font-weight:800; line-height:1.55; }
.popup-resolution-hint.is-warning { border-color:#efc279; background:#fff7e8; color:#9a5910; }
.popup-size-reset { min-height:38px; border:1px solid #b9d1e1; border-radius:9px; background:#fff; color:#176fae; font-size:10px; font-weight:900; }
.popup-size-reset:hover:not(:disabled) { border-color:#4292c9; background:#edf7fe; }
.popup-size-reset:disabled { background:#edf2f5; color:#9aa9b4; cursor:not-allowed; opacity:.72; }
.popup-position-editor { min-width:0; display:grid; gap:11px; }
.popup-resolution-toolbar { padding:12px 14px; display:grid; gap:5px; border:1px solid #cbdde9; border-radius:12px; background:#f2f8fc; }
.popup-resolution-toolbar label { display:grid; grid-template-columns:72px minmax(120px,1fr) 112px; align-items:center; gap:11px; }
.popup-resolution-toolbar label > span { color:#264861; font-size:11px; font-weight:900; }
.popup-resolution-toolbar input { width:100%; accent-color:#1475bc; }
.popup-resolution-toolbar output { display:flex; justify-content:flex-end; gap:6px; color:#173b5c; font-size:11px; font-weight:900; }
.popup-resolution-toolbar output b { padding:2px 6px; border-radius:999px; background:#dceeff; color:#1169ab; font-size:9px; }
.popup-resolution-toolbar small { color:#75899a; font-size:9px; }
.popup-resolution-toolbar .popup-resolution-direct { width:min(280px,100%); grid-template-columns:72px minmax(100px,1fr) 20px; }
.popup-resolution-direct input { width:100%; min-width:0; height:34px; padding:5px 8px; border:1px solid #c9d9e5; border-radius:7px; background:#fff; color:#173b5c; font-weight:800; }
.popup-resolution-direct b { color:#7d91a1; font-size:9px; }
.popup-flow-guidance { padding:11px 12px; display:grid; grid-template-columns:auto minmax(0,1fr); gap:9px; align-items:start; border:1px solid #bcd7e9; border-radius:10px; background:#edf7fe; }
.popup-flow-guidance strong { color:#116da9; font-size:10px; }
.popup-flow-guidance span { color:#4f7087; font-size:10px; line-height:1.55; }
.popup-flow-guidance code { padding:1px 4px; border-radius:4px; background:#d8edf9; color:#0d5f98; font-family:Consolas,monospace; }
.popup-preview-stage { width:100%; height:min(78vh,1100px); min-height:720px; padding:14px; overflow:auto; border:1px solid #c9d8e3; border-radius:14px; background:#dfe8ef; box-shadow:inset 0 0 0 1px rgba(255,255,255,.7); scrollbar-gutter:stable both-edges; }
.popup-preview-viewport { width:1600px; height:var(--popup-preview-height,1000px); position:relative; margin:0; overflow:hidden; border:1px solid #afc2d0; border-radius:10px; background:#fff; box-shadow:0 12px 34px rgba(21,50,73,.16); }
.popup-preview-viewport iframe { width:100%; height:100%; display:block; border:0; pointer-events:none; }
.popup-preview-flow { width:var(--popup-flow-width,915px); position:absolute; z-index:4; top:var(--popup-flow-y,0); left:var(--popup-flow-x,0); display:flex; flex-wrap:wrap; align-items:flex-start; align-content:flex-start; justify-content:var(--popup-flow-justify,flex-start); column-gap:5px; row-gap:3px; pointer-events:none; }
.popup-preview-item { width:min(var(--popup-item-width,300px),100%); max-width:100%; position:relative; flex:0 0 min(var(--popup-item-width,300px),100%); box-sizing:border-box; display:flex; flex-direction:column; overflow:hidden; border:0; border-radius:0; background:rgba(255,255,255,.97); box-shadow:none; cursor:default; user-select:none; pointer-events:auto; }
.popup-preview-item--ghost { overflow:hidden; border:0; box-shadow:none; pointer-events:none; }
.popup-preview-item[hidden] { display:none; }
.popup-preview-media { width:100%; aspect-ratio:var(--popup-item-aspect,300 / 393); display:grid; place-items:center; overflow:hidden; background:#f2f5f7; }
.popup-preview-item img { width:100%; height:100%; display:none; object-fit:contain; pointer-events:none; }
.popup-preview-item.has-image img { display:block; }
.popup-preview-item.has-image .popup-preview-media > span { display:none; }
.popup-preview-media > span { padding:40px 14px; color:#70899b; font-size:11px; font-weight:800; text-align:center; }
.popup-preview-footer { width:100%; height:39px; display:flex; align-items:center; justify-content:flex-end; background:#080808; color:#fff; font-size:9px; pointer-events:none; }
.popup-preview-dismiss { min-width:0; height:39px; margin-left:auto; padding:0 10px; display:inline-flex; align-items:center; justify-content:flex-end; gap:6px; border-right:1px solid rgba(255,255,255,.18); text-align:right; white-space:nowrap; }
.popup-preview-checkbox { width:12px; height:12px; flex:0 0 12px; box-sizing:border-box; border:1px solid rgba(255,255,255,.88); border-radius:2px; background:#fff; }
.popup-preview-close { width:52px; height:39px; flex:0 0 52px; display:grid; place-items:center; background:#393939; }
.popup-preview-item:not(.shows-today-dismiss) .popup-preview-dismiss { visibility:hidden; }
.popup-preview-flow-break { width:100%; height:0; flex:0 0 100%; pointer-events:none; }
@media (max-width:600px) {
  .popup-preview-item[data-mobile-primary="false"] { display:none; }
}
.popup-editor-message { min-height:20px; margin-top:10px; color:#237047; font-size:11px; font-weight:800; }
.popup-editor-message.is-error { color:#b12d37; }
.popup-editor-actions { margin:16px -18px -18px; padding:13px 18px; display:grid; grid-template-columns:90px 110px minmax(150px,1fr); gap:8px; position:sticky; bottom:0; z-index:6; border-top:1px solid #dce6ee; background:rgba(255,255,255,.97); border-radius:0 0 16px 16px; backdrop-filter:blur(10px); }
.popup-editor-actions button { min-height:42px; border-radius:9px; font-size:12px; font-weight:800; }
.popup-editor-actions > button:first-child { background:#eef3f6; color:#405b70; }
.popup-delete-button { background:#fff0f0; color:#b32d38; }
@media (max-width:1180px) {
  .popup-layout-settings { grid-template-columns:minmax(230px,1fr) minmax(210px,1fr) 120px minmax(200px,1fr); }
  .popup-layout-settings output { grid-column:3; }
  .popup-layout-settings > button { grid-column:4; }
  .popup-layout-settings > p { grid-column:1 / -1; }
  .popup-admin-layout { grid-template-columns:1fr; }
  .popup-admin-list-panel { grid-template-columns:190px minmax(0,1fr); }
}
@media (max-width:820px) {
  .popup-layout-settings { grid-template-columns:1fr 1fr; }
  .popup-layout-settings > div { grid-column:1 / -1; }
  .popup-layout-settings .popup-layout-vertical { grid-column:auto; }
  .popup-layout-settings output { grid-column:auto; }
  .popup-layout-settings > button { grid-column:auto; }
  .popup-editor-grid { grid-template-columns:1fr; }
  .popup-preview-stage { height:76vh; min-height:620px; }
  .popup-admin-list-panel { grid-template-columns:1fr; }
  .popup-admin-list-heading { grid-template-columns:minmax(0,1fr) 130px; align-items:center; border-right:0; border-bottom:1px solid #dce6ee; }
}
@media (max-width:560px) {
  .popup-layout-settings { grid-template-columns:1fr; }
  .popup-layout-settings > button,.popup-layout-settings > p { grid-column:auto; }
  .popup-editor { padding:12px; }
  .popup-editor-heading { margin:-12px -12px 14px; padding:14px 12px; }
  .popup-editor-fields { grid-template-columns:1fr; }
  .popup-editor-wide { grid-column:auto; }
  .popup-resolution-toolbar label { grid-template-columns:1fr; }
  .popup-resolution-toolbar output { justify-content:flex-start; }
  .popup-editor-actions { margin:14px -12px -12px; padding:11px 12px; grid-template-columns:1fr 1fr; }
  .popup-editor-actions .admin-primary-button { grid-column:1 / -1; }
}
