.ap-callout-controls {
  margin: 10px 0 0;
  border: 1px solid var(--line, #dce4ec);
  border-radius: 7px;
  background: #fff;
  color: var(--ink, #10213f);
  overflow: clip;
}
.ap-callout-summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}
.ap-callout-summary::-webkit-details-marker { display: none; }
.ap-callout-summary::after { content: '＋'; color: var(--pink, #ed0b69); font-size: 17px; line-height: 1; }
.ap-callout-controls[open] > .ap-callout-summary::after { content: '−'; }
.ap-callout-summary small { margin-left: auto; color: var(--muted, #61718b); font-size: 10px; font-weight: 600; }
.ap-callout-controls-body { max-height: 0; overflow: hidden; padding: 0 10px 11px; opacity: 0; transform: translateY(-3px); transition: max-height .2s ease, opacity .16s ease, transform .16s ease; }
.ap-callout-controls[open] > .ap-callout-controls-body { max-height: none; opacity: 1; transform: translateY(0); }
.ap-callout-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-width: 0; margin: 0 0 9px; padding: 0; border: 0; }
.ap-callout-mode legend { margin: 0 0 6px; font-size: 11px; font-weight: 750; }
.ap-callout-mode-option { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 7px; border: 1px solid var(--line, #dce4ec); border-radius: 5px; color: var(--muted, #61718b); cursor: pointer; font-size: 11px; }
.ap-callout-mode-option:has(input:checked) { border-color: var(--pink, #ed0b69); background: #fff3f8; color: var(--ink, #10213f); font-weight: 700; }
.ap-callout-mode-option input,
.ap-callout-field-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--pink, #ed0b69); flex: 0 0 auto; }
.ap-callout-help { margin: 6px 0 8px; color: var(--muted, #61718b); font-size: 10px; line-height: 1.4; }
.ap-callout-fields { display: grid; max-height: 260px; gap: 5px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.ap-callout-field-row { display: grid; grid-template-columns: minmax(0, 1fr) 1fr 62px; align-items: center; gap: 5px; padding: 5px 0; border-top: 1px solid #edf1f5; }
.ap-callout-field-check { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink, #10213f); font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.ap-callout-field-input { display: grid; gap: 3px; min-width: 0; color: var(--muted, #61718b); font-size: 9px; }
.ap-callout-field-input input { width: 100%; min-width: 0; height: 28px; padding: 0 6px; border: 1px solid #cbd6e2; border-radius: 4px; background: #fff; color: var(--ink, #10213f); font-size: 10px; }
.ap-callout-field-order { display: flex; justify-content: flex-end; gap: 2px; grid-column: 3; }
.ap-callout-order-button { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line, #dce4ec); border-radius: 4px; background: #fff; color: var(--pink, #ed0b69); font-weight: 800; }
.ap-callout-order-button:disabled { opacity: .35; cursor: default; }
.ap-callout-live-preview,
.ap-callout-preview { display: grid; gap: 3px; min-width: 0; margin: 6px 0 10px; padding: 8px; border: 1px solid #eadfe4; border-left: 3px solid var(--pink, #ed0b69); border-radius: 5px; background: #fffafb; color: var(--ink, #10213f); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.ap-callout-preview-heading,
.ap-callout-preview-label { display: block; margin: 9px 0 4px; color: var(--muted, #61718b); font-size: 10px; font-weight: 750; }
.ap-callout-feature-select { display: grid; gap: 5px; margin-top: 9px; color: var(--ink, #10213f); font-size: 11px; font-weight: 700; }
.ap-callout-feature-select select { width: 100%; height: 36px; min-width: 0; padding: 0 8px; border: 1px solid #cbd6e2; border-radius: 5px; background: #fff; color: var(--ink, #10213f); font-size: 11px; }
.ap-callout-edit-button { min-height: 34px; margin-top: 6px; padding: 4px 6px; border-radius: 4px; text-align: left; }
.ap-callout-edit-button:disabled { color: var(--muted, #61718b); cursor: default; opacity: .65; }
.ap-callout-dialog { width: min(520px, calc(100vw - 28px)); max-width: calc(100vw - 28px); max-height: min(90dvh, 720px); overflow: auto; padding: 0; border: 1px solid var(--line, #dce4ec); border-radius: 10px; background: #fff; color: var(--ink, #10213f); box-shadow: 0 20px 80px #0f203055; }
.ap-callout-dialog::backdrop { background: #10213f70; animation: ap-callout-backdrop-in .16s ease both; }
.ap-callout-dialog[open] { animation: ap-callout-dialog-in .18s ease-out both; }
.ap-callout-dialog[open].is-closing { animation: ap-callout-dialog-out .16s ease-in both; }
.ap-callout-dialog-form { padding: 20px; }
.ap-callout-dialog-header h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.ap-callout-dialog-help { margin: 0 0 16px; color: var(--muted, #61718b); font-size: 12px; line-height: 1.45; }
.ap-callout-validation { margin: 8px 0 0; color: #aa1b3a; font-size: 11px; line-height: 1.4; }
.ap-callout-editor-field { display: grid; gap: 6px; margin: 0 0 13px; font-size: 12px; font-weight: 750; }
.ap-callout-editor-field input,
.ap-callout-editor-field textarea { width: 100%; min-width: 0; border: 1px solid #cbd6e2; border-radius: 5px; padding: 9px 10px; background: #fff; color: var(--ink, #10213f); font: inherit; font-weight: 500; }
.ap-callout-editor-field input { height: 40px; }
.ap-callout-editor-field textarea { min-height: 118px; max-height: 34dvh; resize: vertical; line-height: 1.45; }
.ap-callout-dialog :where(button,input,select,textarea):focus-visible { outline: 3px solid #ed0b6980; outline-offset: 2px; }
.ap-callout-preview { min-height: 50px; margin: 0; font-size: 12px; }
.ap-callout-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.ap-callout-dialog-actions .ap-button { min-height: 38px; padding: 0 14px; font-size: 12px; }
.ap-callout-reset { min-height: 36px; margin-right: auto; padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--pink, #ed0b69); font-weight: 700; text-align: left; }
.ap-callout-reset:hover { background: #fff3f8; }
@keyframes ap-callout-dialog-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ap-callout-dialog-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(5px) scale(.99); } }
@keyframes ap-callout-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 520px) {
  .ap-callout-field-row { grid-template-columns: minmax(90px, 1fr) minmax(70px, 1fr) 56px; gap: 4px; }
  .ap-callout-dialog-form { padding: 16px; }
  .ap-callout-dialog-actions { justify-content: flex-start; }
  .ap-callout-reset { flex: 1 0 100%; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-callout-controls-body { transition: none !important; }
  .ap-callout-dialog,
  .ap-callout-dialog::backdrop,
  .ap-callout-dialog[open],
  .ap-callout-dialog[open].is-closing { animation: none !important; }
}
