.bm-text-action-panel {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0 0 12px;
  border-bottom: 1px solid #edf1f5;
}
.bm-mobile-layout #fontSettingsContainer[hidden],
#fontSettingsContainer[hidden] { display: none !important; }
.bm-text-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.bm-text-action-row.has-single-action { grid-template-columns: minmax(0, 1fr); }
.bm-text-action-card {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  padding: 8px 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  background: transparent;
  color: #666;
  box-shadow: none;
  appearance: none;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bm-text-action-row.has-single-action .bm-text-action-card {
  min-height: 92px;
  aspect-ratio: auto;
}
.bm-text-action-card:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.bm-text-action-card:active {
  background: var(--accent);
  color: #4b5563;
}
.bm-text-action-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.bm-text-action-card__icon {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}
.bm-text-action-card__label {
  line-height: 1.25;
  white-space: nowrap;
}
.bm-batch-text-selection-toolbar {
  position: absolute;
  z-index: 9300;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.bm-batch-text-selection-toolbar.is-visible { display: flex; }
.bm-batch-text-context {
  width: auto;
  height: 32.4px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid rgb(209 213 219 / 82%);
  border-radius: 999px;
  background: rgb(248 250 252 / 96%);
  color: #202124;
  box-shadow: 0 10px 24px rgb(15 23 42 / 10%);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.bm-batch-text-context:hover {
  border-color: rgb(156 163 175 / 90%);
  background: #eceef2;
}
.bm-batch-text-context:active { background: #e2e4e8; }
.bm-batch-text-context:focus-visible {
  outline: 2px solid #9ca3af;
  outline-offset: 1px;
}
.bm-batch-text-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.bm-batch-text-modal.is-open { display: flex; }
.bm-batch-text-modal__backdrop { position: absolute; inset: 0; background: rgb(15 23 42 / 46%); }
.bm-batch-text-modal__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(15 23 42 / 28%);
}
.bm-batch-text-modal__header, .bm-batch-text-modal__footer { padding: 18px 22px; }
.bm-batch-text-modal .bm-batch-text-modal__header { height: auto; min-height: 96px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; padding: 24px 22px; border-bottom: 1px solid #ececf2; box-shadow: none; flex-shrink: 0; }
.bm-batch-text-modal__title { margin: 0; font-size: 21px; }
.bm-batch-text-modal__hint { margin: 5px 0 0; color: #687083; font-size: 13px; }
.bm-batch-text-modal__close { align-self: flex-start; flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-top: -6px; margin-left: 12px; padding: 0; border: 1px solid #dfe1e8; border-radius: 8px; background: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.bm-batch-text-modal__body { overflow: auto; padding: 18px 22px; }
.bm-batch-text-rule { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 246px) 132px minmax(30px, 1fr); align-items: center; justify-content: start; gap: 8px; margin-bottom: 10px; }
.bm-batch-text-rule__field { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; color: #5e6574; font-size: 13px; font-weight: 400; white-space: nowrap; }
.bm-batch-text-rule textarea, .bm-batch-text-rule select {
  min-width: 0; height: 34px; padding: 0 8px; box-sizing: border-box; line-height: 18px; border: 1px solid #dfe1e8; border-radius: 7px; background: #fff;
}
.bm-batch-text-rule textarea { flex: 1; width: 100%; resize: none; padding: 7px 8px; font-family: inherit; font-size: 13px; line-height: 18px; }
.bm-batch-text-rule select { width: 132px; font-family: inherit; font-size: 12px; }
.bm-batch-text-rule.has-error textarea { border-color: #d84b4b; }
.bm-batch-text-rule__remove { display: flex; align-items: center; justify-content: center; padding: 0; color: #5e6574; transition: color 150ms ease; justify-self: end; width: 30px; height: 32px; border: 0; border-radius: 7px; background: #f4f4f7; cursor: pointer; }
.bm-batch-text-rule__remove svg { width: 20px; height: 20px; }
.bm-batch-text-rule__remove:hover { color: #dc2626; }
.bm-batch-text-add { border: 0; background: transparent; color: var(--primary); font-weight: 650; cursor: pointer; padding: 7px 0; }
.bm-batch-text-preview { margin-top: 16px; padding: 14px; border-radius: 10px; background: #f7f7fb; font-size: 13px; }
.bm-batch-text-preview__rule + .bm-batch-text-preview__rule { margin-top: 11px; padding-top: 11px; border-top: 1px solid #e4e5ec; }
.bm-batch-text-preview__result { color: #4e5668; margin-top: 0; overflow-wrap: anywhere; }
.bm-batch-text-preview__result + .bm-batch-text-preview__result { margin-top: 6px; }
.bm-batch-text-warning, .bm-batch-text-error { margin-top: 10px; font-size: 13px; }
.bm-batch-text-warning { color: #9a5a00; }
.bm-batch-text-error { color: #c83232; }
.bm-batch-text-modal__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #ececf2; }
.bm-batch-text-modal__summary { color: #5e6574; font-size: 13px; }
.bm-batch-text-modal__actions { display: flex; gap: 10px; }
.bm-batch-text-modal__actions button { min-width: 88px; height: 38px; border-radius: 8px; cursor: pointer; }
.bm-batch-text-cancel { border: 1px solid #dfe1e8; background: #fff; }
.bm-batch-text-submit { border: 0; background: var(--primary); color: white; font-weight: 650; }
.bm-batch-text-submit:disabled { opacity: .46; cursor: not-allowed; }
#mobileBatchTextSelectedBtn[hidden] { display: none; }
@media (max-width: 767px) {
  .bm-batch-text-modal { align-items: flex-end; padding: 0; }
  .bm-batch-text-modal__dialog { width: 100%; max-height: 88dvh; border-radius: 18px 18px 0 0; }
  .bm-batch-text-rule { grid-template-columns: minmax(0, 1fr) 34px; }
  .bm-batch-text-rule__field { grid-column: 1; display: grid; grid-template-columns: 39px minmax(0, 1fr); text-align: right; }
  .bm-batch-text-rule select { grid-column: 1; justify-self: end; }
  .bm-batch-text-rule__remove { grid-column: 2; grid-row: 1 / 4; }
  .bm-batch-text-selection-toolbar { display: none !important; }
  .bm-batch-text-modal__footer { align-items: stretch; flex-direction: column; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .bm-batch-text-modal__actions button { flex: 1; }
}
