/* Use the editor's existing modal, tabs, buttons and delivery badges. */
.ab-row { display:inline-flex; flex-shrink:0; }
.ab-badge { display:inline-flex; align-items:center; gap:4px; padding:2px 6px; border:1px solid var(--border-light); border-radius:5px; background:var(--surface2); color:var(--text2); font-family:inherit; font-size:11px; font-weight:500; line-height:1.5; white-space:nowrap; cursor:pointer; }
.ab-badge:hover,.ab-badge:focus-visible { border-color:var(--accent); color:var(--accent); background:var(--accent-light); }
.ab-badge.ab-running { color:var(--accent); background:var(--accent-light); border-color:var(--accent-light); }
#abTestsDialog .media-modal { height:auto; max-height:calc(100dvh - 48px); }
#abTestsDialog .media-modal-header { padding:16px 22px; }
#abTestsDialog .media-modal-header h3 { display:flex; align-items:baseline; gap:8px; }
#abTestsDialog .media-modal-header h3 svg { align-self:center; flex-shrink:0; }
.ab-title { display:flex; align-items:baseline; gap:16px; min-width:0; }
.ab-title h3 { white-space:nowrap; }
.ab-top { padding:12px 22px; border-bottom:1px solid var(--border-light); display:flex; flex-shrink:0; flex-direction:column; gap:12px; }
.ab-account { font-size:13px; color:var(--text2); border-left:1px solid var(--border); padding-left:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ab-tab-count { margin-left:7px; color:var(--text2); font-size:12px; }
.ab-layout { display:grid; grid-template-columns:350px minmax(0,1fr); flex:1 1 auto; min-height:0; overflow:hidden; }
.ab-list { padding:12px; border-right:1px solid var(--border-light); overflow:auto; background:var(--surface2); }
.ab-study { display:flex; flex-direction:column; gap:6px; width:100%; text-align:left; border:0; background:transparent; border-radius:var(--radius); padding:10px 12px; font-family:inherit; cursor:pointer; color:var(--text); margin-bottom:4px; }
.ab-study:hover { background:var(--surface); }
.ab-study.selected { background:var(--accent-light); }
.ab-study.selected .ab-study-title { color:var(--accent); }
.ab-study-title { font-size:13px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.ab-study-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; font-size:12px; color:var(--text2); }
.ab-study-meta .status-badge.other { background:var(--surface); color:var(--text2); border:1px solid var(--border-light); }
.ab-study-date { font-size:12px; color:var(--text2); }
.ab-detail { overflow:auto; padding:24px; min-width:0; }
.ab-detail-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.ab-detail-heading h4 { font-size:18px; font-weight:600; line-height:1.4; overflow-wrap:anywhere; }
.ab-detail-heading .status-badge { flex-shrink:0; margin-top:3px; }
.ab-eyebrow { font-size:12px; color:var(--text2); margin-bottom:6px; }
.ab-period { display:flex; flex-wrap:wrap; gap:12px 36px; padding-bottom:18px; margin-bottom:18px; border-bottom:1px solid var(--border-light); }
.ab-period span { display:block; color:var(--text2); font-size:12px; margin-bottom:4px; }
.ab-period strong { font-size:14px; font-weight:500; }
.ab-active-note { font-size:13px; color:var(--text2); margin-bottom:18px; line-height:1.6; }
.ab-section-label { display:flex; justify-content:space-between; gap:16px; font-size:14px; font-weight:600; color:var(--text); margin-bottom:12px; }
.ab-section-label>span:last-child { color:var(--text2); font-size:12px; font-weight:500; }
.ab-cells { border-top:1px solid var(--border-light); }
.ab-cell { padding:16px 0; border-bottom:1px solid var(--border-light); }
.ab-cell-head { display:flex; align-items:center; gap:12px; }
.ab-letter { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:5px; background:var(--surface2); color:var(--text2); font-size:13px; font-weight:600; flex-shrink:0; }
.ab-cell-head h5 { flex:1; min-width:0; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.ab-percentage { font-size:15px; font-weight:600; white-space:nowrap; }
.ab-entity { margin:10px 0 0 40px; display:flex; align-items:center; gap:16px; justify-content:space-between; }
.ab-entity+.ab-entity { padding-top:12px; }
.ab-entity-info { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.ab-entity-name { font-size:13px; color:var(--text2); overflow-wrap:anywhere; }
.ab-entity-actions { display:flex; gap:8px; flex-shrink:0; }
.ab-entity-actions .toolbar-btn { justify-content:center; line-height:20px; }
.ab-entity-actions .toolbar-btn svg { display:block; flex-shrink:0; }
.ab-note { color:var(--text2); font-size:12px; line-height:1.6; margin-top:16px; }
.ab-description { color:var(--text2); font-size:13px; white-space:pre-line; margin-bottom:18px; }
.ab-message { font-size:13px; padding:10px 12px; border-radius:6px; margin-bottom:12px; }
.ab-warning { color:var(--warning); background:var(--warning-bg); }
.ab-empty { min-height:320px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:12px; color:var(--text2); }
.ab-empty>svg { width:32px; height:32px; color:var(--text3); }
.ab-empty h4 { font-size:15px; color:var(--text); font-weight:500; }
.ab-empty p { max-width:320px; font-size:13px; }
.ab-link { border:0; padding:0; background:transparent; color:var(--accent); text-align:left; font-family:inherit; font-size:13px; cursor:pointer; }
.ab-link:hover { text-decoration:underline; }
.ab-scope { margin-top:10px; }
.ab-context { margin-bottom:24px; }
.ab-context-links { display:flex; flex-direction:column; }
.ab-context-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px 16px; padding:10px 0; }
.ab-context-row:first-child { padding-top:0; }
.ab-context-row+.ab-context-row { border-top:1px solid var(--border-light); }
.ab-context-main { display:flex; flex-direction:column; gap:4px; min-width:0; }
.ab-context-row .ab-link { font-weight:500; line-height:1.6; }
.ab-context-meta { color:var(--text2); font-size:13px; white-space:nowrap; }
.ab-context-period { color:var(--text2); font-size:12px; }
.ab-context-note { font-size:12px; color:var(--text2); margin-top:8px; line-height:1.6; }
#abNotice:empty { display:none; }
@media(min-width:769px) and (max-width:1150px) {
  .ab-layout { grid-template-columns:340px minmax(0,1fr); }
  .ab-entity { flex-wrap:wrap; }
}
@media(max-width:768px) {
  #abTestsDialog { padding:0; }
  #abTestsDialog .media-modal { height:100dvh; max-height:100dvh; border-radius:0; }
  #abTestsDialog .media-modal-header { padding:16px; }
  .ab-title { flex-direction:column; align-items:flex-start; gap:4px; }
  .ab-account { border:0; padding:0; max-width:190px; font-size:12px; }
  .ab-top { padding:12px 16px; }
  .ab-layout { display:flex; flex-direction:column; overflow:auto; }
  .ab-list { display:flex; gap:8px; padding:10px; flex-shrink:0; border-right:0; border-bottom:1px solid var(--border-light); }
  .ab-study { flex:0 0 310px; margin:0; padding:10px; }
  .ab-detail { overflow:visible; padding:20px 16px; }
  .ab-detail-heading { flex-wrap:wrap; gap:8px; }
  .ab-detail-heading h4 { font-size:17px; }
  .ab-period { gap:12px 24px; }
  .ab-period strong { font-size:13px; }
  .ab-entity { margin-left:40px; flex-direction:column; align-items:stretch; gap:12px; }
  .ab-entity-actions .toolbar-btn { flex:1; justify-content:center; }
  #abTabs .em-tab { min-width:0; height:auto; min-height:36px; padding:6px 10px; }
}
@media(max-width:600px) {
  .ab-context-row { grid-template-columns:minmax(0,1fr) auto; }
  .ab-context-main { grid-column:1/-1; }
}
