/* ../branzino-email-builder/dist/branzino-email-builder.css */
.wysiwyg-toolbar {
  position: fixed;
  color: #333;
  display: flex;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  display: none;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  align-items:  center;
  gap: 4px;
  min-width: 320px;
  padding: 8px 12px;
  transition: all .2s;
  transform: translateY(-10px);
  box-shadow: 0 4px 12px #00000026;
}

.wysiwyg-toolbar.visible {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wysiwyg-toolbar.active {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  background: #f8fdff;
  border-color: #2196f3;
  transform: translateY(0);
  box-shadow: 0 4px 16px #2196f333;
}

.toolbar-btn {
  color: #333;
  cursor: pointer;
  display: flex;
  background: none;
  border: 1px solid #0000;
  border-radius: 4px;
  justify-content: center;
  align-items:  center;
  min-width: 28px;
  height: 28px;
  padding: 6px 8px;
  transition: all .2s;
  font-size: 14px;
  font-weight: 500;
}

.toolbar-btn:hover {
  background: #e3f2fd;
  border-color: #2196f3;
}

.toolbar-btn.active {
  color: #fff;
  background: #2196f3;
  border-color: #2196f3;
}

.color-picker-wrapper {
  position: relative;
  display: flex;
  align-items:  center;
}

.toolbar-color-picker {
  cursor: pointer;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  flex: none;
  width: 38px;
  height: 36px;
  padding: 0;
}

.toolbar-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.toolbar-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.toolbar-color-popover {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  z-index: 1002;
  background: #fff;
  border: 1px solid #d1d9e5;
  border-radius: 12px;
  width: min(230px, 100vw - 24px);
  padding: 10px;
  transition: opacity .18s, transform .18s, visibility .18s;
  top: calc(100% + 8px);
  left: 0;
  transform: translateY(-8px);
  box-shadow: 0 16px 34px #0f172a2e;
}

.toolbar-color-popover[hidden] {
  display: none;
}

[data-role="bg-color-wrapper"] .toolbar-color-popover {
  left: auto;
  right: 0;
}

.toolbar-color-popover.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.toolbar-color-popover-title {
  color: #111827;
  letter-spacing: .01em;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}

.toolbar-color-brand-section {
  margin-bottom: 9px;
}

.toolbar-color-section-label {
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 600;
}

.toolbar-color-swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.toolbar-color-swatch {
  aspect-ratio: 1;
  cursor: pointer;
  border: 1px solid #0f172a29;
  border-radius: 8px;
  width: 100%;
  transition: transform .15s, box-shadow .15s;
}

.toolbar-color-swatch:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px #0f172a29;
}

.toolbar-color-custom {
  display: flex;
  align-items:  center;
  gap: 8px;
  margin-top: 10px;
}

.toolbar-color-input {
  color: #0f172a;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
  font-size: 13px;
}

.toolbar-color-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px #3b82f626;
}

.toolbar-color-input.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px #dc262626;
}

.color-btn {
  font-size: 16px;
  font-weight: 700;
}

.highlight-btn {
  -webkit-text-fill-color: initial !important;
  background: none !important;
}

.color-btn-letter {
  color: var(--toolbar-selected-text-color, #1f2937);
  line-height: 1;
}

.highlight-btn-letter {
  display: inline-block;
  color: #0f172a;
  background: linear-gradient(to bottom, transparent 0%, transparent 58%, var(--toolbar-selected-bg-color, #ff0) 58%, var(--toolbar-selected-bg-color, #ff0) 100%);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.variables-dropdown {
  position: relative;
}

.variables-menu {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  z-index: 1001;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  min-width: 320px;
  transition: all .2s;
  top: 100%;
  left: 0;
  transform: translateY(-10px);
  box-shadow: 0 16px 34px #0f172a24;
}

.variables-menu.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.variables-header {
  background: linear-gradient(#f8fbff, #f3f8ff);
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 14px 10px;
}

.variables-header-title {
  color: #1e293b;
  letter-spacing: .01em;
  font-size: 13px;
  font-weight: 700;
}

.variables-header-subtitle {
  color: #64748b;
  margin-top: 2px;
  font-size: 12px;
}

.variables-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
}

.variables-select-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.variables-select-group label {
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.variables-select {
  color: #0f172a;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  transition: border-color .18s, box-shadow .18s;
  font-size: 13px;
}

.variables-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px #3b82f629;
}

.variables-select:disabled {
  color: #94a3b8;
  cursor: wait;
  background: #f8fafc;
}

.variables-status {
  display: flex;
  border-radius: 8px;
  align-items:  center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.3;
}

.variables-status[data-state="info"] {
  color: #475569;
  background: #f1f5f9;
}

.variables-status[data-state="loading"] {
  color: #1d4ed8;
  background: #eef6ff;
}

.variables-status[data-state="error"] {
  color: #b91c1c;
  background: #fef2f2;
}

.variables-status-spinner {
  display: none;
  border: 2px solid;
  border-top-color: #0000;
  border-radius: 50%;
  width: 12px;
  height: 12px;
}

.variables-status[data-state="loading"] .variables-status-spinner {
  display: inline-block;
  animation: variables-spin .75s linear infinite;
}

.variables-preview {
  display: flex;
  color: #475569;
  align-items:  center;
  gap: 6px;
  font-size: 12px;
}

.variables-preview-label {
  font-weight: 600;
}

.variables-preview-value {
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 6px;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
}

.variables-insert-btn {
  color: #fff;
  background: #3b82f6;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  width: 100%;
  min-height: 36px;
  transition: background-color .18s, border-color .18s;
  font-size: 13px;
  font-weight: 600;
}

.variables-insert-btn:hover:enabled {
  background: #2563eb;
  border-color: #2563eb;
}

.variables-insert-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@keyframes variables-spin {
  to {
    transform: rotate(360deg);
  }
}

.toolbar-separator {
  background: #fff3;
  width: 1px;
  height: 20px;
  margin: 0 4px;
}

.emoji-dropdown {
  position: relative;
}

.emoji-menu {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  z-index: 1001;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  width: min(336px, 100vw - 24px);
  transition: all .2s;
  top: 100%;
  left: 0;
  transform: translateY(-10px);
  box-shadow: 0 18px 34px #0f172a29;
}

.emoji-menu.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.emoji-categories {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  background: linear-gradient(#f8fbff, #f3f7ff);
  border-bottom: 1px solid #e2e8f0;
  gap: 6px;
  padding: 10px;
}

.emoji-category-btn {
  cursor: pointer;
  background: none;
  border: 1px solid #0000;
  border-radius: 8px;
  width: 100%;
  height: 32px;
  transition: all .16s;
  font-size: 17px;
}

.emoji-category-btn:hover {
  background: #fff;
  border-color: #cfd8e3;
}

.emoji-category-btn.active {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: inset 0 0 0 1px #3b82f633;
}

.emoji-content {
  overflow-y: auto;
  max-height: 238px;
  padding: 10px;
}

.emoji-header {
  color: #334155;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 0 2px 10px;
  font-size: 12px;
  font-weight: 700;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
}

.emoji-item {
  display: flex;
  aspect-ratio: 1;
  cursor: pointer;
  background: #fff;
  border: 1px solid #0000;
  border-radius: 8px;
  justify-content: center;
  align-items:  center;
  width: 100%;
  transition: all .2s;
  font-size: 21px;
}

.emoji-item:hover {
  background: #f8fafc;
  border-color: #dbe5f0;
  transform: translateY(-1px);
}

@media (width <= 768px) {
  .emoji-categories, .emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.link-dialog {
  position: fixed;
  z-index: 1001;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
  width: min(460px, 100vw - 32px);
  padding: 0;
  transition: all .2s;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 40px #0f172a3d;
}

.link-dialog.visible {
  opacity: 1;
  visibility: visible;
}

.link-dialog-overlay {
  position: fixed;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  background: #00000080;
  transition: all .2s;
  inset: 0;
}

.link-dialog-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.link-dialog-header {
  background: linear-gradient(#f9fafb, #f3f4f6);
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 20px 12px;
}

.link-dialog h3 {
  color: #111827;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.link-dialog-subtitle {
  color: #6b7280;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.link-dialog-body {
  padding: 16px 20px 0;
}

.link-dialog-label {
  display: block;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
}

.link-dialog input {
  box-sizing: border-box;
  outline: none;
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  width: 100%;
  padding: 12px;
  transition: border-color .2s, box-shadow .2s;
  font-size: 14px;
}

.link-dialog select {
  box-sizing: border-box;
  outline: none;
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  transition: border-color .2s, box-shadow .2s;
  font-size: 13px;
}

.link-dialog input:focus, .link-dialog select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px #3b82f626;
}

.link-dialog select:disabled {
  color: #94a3b8;
  cursor: wait;
  background: #f8fafc;
}

.link-dialog-helper {
  color: #64748b;
  word-break: break-word;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.link-dialog-error {
  color: #b91c1c;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.link-dialog-variable-card {
  display: flex;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
}

.link-dialog-variable-title {
  color: #1e293b;
  font-size: 13px;
  font-weight: 700;
}

.link-dialog-variable-subtitle {
  color: #64748b;
  margin-top: -6px;
  font-size: 12px;
  line-height: 1.35;
}

.link-dialog-variable-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.link-dialog-variable-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.link-dialog-variable-group label {
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.link-dialog-variable-status {
  display: flex;
  border-radius: 8px;
  align-items:  center;
  gap: 8px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.3;
}

.link-dialog-variable-status[data-state="info"] {
  color: #4338ca;
  background: #eef2ff;
}

.link-dialog-variable-status[data-state="loading"] {
  color: #1d4ed8;
  background: #eef6ff;
}

.link-dialog-variable-status[data-state="error"] {
  color: #b91c1c;
  background: #fef2f2;
}

.link-dialog-variable-spinner {
  display: none;
  border: 2px solid;
  border-top-color: #0000;
  border-radius: 50%;
  width: 12px;
  height: 12px;
}

.link-dialog-variable-status[data-state="loading"] .link-dialog-variable-spinner {
  display: inline-block;
  animation: variables-spin .75s linear infinite;
}

.link-dialog-variable-btn {
  align-self:  flex-start;
}

.link-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  padding: 16px 20px 20px;
}

.link-dialog .btn {
  cursor: pointer;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 16px;
  transition: all .2s;
  font-size: 14px;
}

.link-dialog .btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.link-dialog .btn.primary {
  color: #fff;
  background: #3b82f6;
  border-color: #3b82f6;
}

.link-dialog .btn.primary:hover:enabled {
  background: #2563eb;
  border-color: #2563eb;
}

.link-dialog .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.text-component strong, .text-component b {
  font-weight: 600;
}

.text-component em, .text-component i {
  font-style: italic;
}

.text-component a {
  color: #2196f3;
  text-decoration: underline;
}

.text-component a:hover {
  color: #1976d2;
}

.text-component ul, .text-component ol {
  margin: 8px 0;
  padding-left: 24px;
}

.text-component ul {
  list-style-type: disc;
}

.text-component ol {
  list-style-type: decimal;
}

.text-component li {
  margin: 4px 0;
  line-height: 1.6;
}

.properties-panel {
  display: flex;
  overflow: hidden;
  background: #fff;
  border-left: 1px solid #e0e0e0;
  flex-direction: column;
  width: 320px;
}

.properties-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 20px 20px 16px;
}

.properties-header h2 {
  color: #333;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.properties-content {
  overflow-y: auto;
  flex: 1;
  padding: 0 20px 20px;
}

.property-section {
  margin-bottom: 32px;
}

.property-section h3 {
  color: #333;
  display: flex;
  align-items:  center;
  gap: 8px;
  margin: 20px 0 16px;
  font-size: 16px;
  font-weight: 600;
}

.property-section:first-child h3 {
  margin-top: 0;
}

.property-group {
  margin-bottom: 20px;
}

.property-group label {
  display: block;
  color: #555;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.property-group input, .property-group select {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  width: 100%;
  padding: 10px 12px;
  transition: border-color .2s;
  font-size: 14px;
}

.property-group input:focus, .property-group select:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 3px #2196f31a;
}

.property-group input[type="number"] {
  appearance: auto;
  -moz-appearance: auto;
}

.property-group input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: auto;
  margin: 0;
}

.property-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: auto;
  margin: 0;
}

.color-input-wrapper {
  display: flex;
  align-items:  center;
  gap: 8px;
}

.color-input-wrapper input[type="color"] {
  cursor: pointer;
  background: none;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  width: 50px;
  height: 38px;
  padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.color-input-wrapper input[type="text"] {
  flex: 1;
  font-family: monospace;
  font-size: 13px;
}

.no-selection-state {
  text-align: center;
  color: #999;
  padding: 40px 20px;
}

.no-selection-icon {
  opacity: .5;
  margin-bottom: 16px;
  font-size: 48px;
}

.no-selection-state h4 {
  color: #666;
  margin: 0 0 8px;
  font-size: 16px;
}

.no-selection-state p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

:root {
  --be-color-primary: #2196f3;
  --be-color-primary-strong: #1976d2;
  --be-color-text: #333;
  --be-color-text-muted: #666;
  --be-color-border: #e0e0e0;
  --be-color-border-soft: #ddd;
  --be-color-surface: #fff;
  --be-color-surface-subtle: #f8f9fa;
  --be-color-canvas-bg: #fafafa;
  --be-color-app-bg: #f0f2f5;
  --be-color-success: #4caf50;
  --be-color-danger: #f44336;
  --be-radius-sm: 4px;
  --be-radius-md: 6px;
  --be-radius-lg: 8px;
  --be-radius-xl: 12px;
  --be-space-1: 4px;
  --be-space-2: 8px;
  --be-space-3: 12px;
  --be-space-4: 16px;
  --be-space-5: 20px;
  --be-space-6: 24px;
  --be-z-modal-overlay: 2000;
  --be-z-modal: 2001;
  --be-z-toast: 3000;
}

#emailbuilder {
  display: flex;
  width: 100vw;
  height: 100vh;
}

.branzino-email-builder {
  display: flex;
}

.branzino-email-builder * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.branzino-email-builder {
  width: 100%;
  height: 100%;
}

.branzino-email-builder .preact-editor-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

.branzino-email-builder .preact-component-item {
  text-align: left;
  border: none;
  width: 100%;
  font-family: inherit;
}

.branzino-email-builder .section-component {
  border-radius: var(--be-radius-md);
  padding: var(--be-space-3);
  margin: var(--be-space-3) 0;
  border: 1px solid #e5e7eb;
  min-height: 40px;
}

.branzino-email-builder .toolbar {
  border-right: 1px solid var(--be-color-border);
  display: flex;
  overflow: hidden;
  background: #fff;
  flex-direction: column;
  width: 280px;
}

.branzino-email-builder .toolbar-tabs {
  display: flex;
  border-bottom: 1px solid var(--be-color-border);
  background: var(--be-color-surface-subtle);
}

.branzino-email-builder .toolbar-tab-btn {
  cursor: pointer;
  color: var(--be-color-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid #0000;
  flex: 1;
  padding: 14px 16px;
  transition: all .2s;
  font-size: 14px;
  font-weight: 500;
}

.branzino-email-builder .toolbar-tab-btn:hover {
  color: var(--be-color-text);
  background: #fff;
}

.branzino-email-builder .toolbar-tab-btn.active {
  color: var(--be-color-primary);
  border-bottom-color: var(--be-color-primary);
  background: #fff;
}

.branzino-email-builder .toolbar-content {
  overflow-y: auto;
  flex: 1;
  padding: 20px;
}

.branzino-email-builder .toolbar h2 {
  color: var(--be-color-text);
  margin-bottom: 24px;
  font-size: 18px;
  font-weight: 600;
}

.branzino-email-builder .component-group {
  margin-bottom: 24px;
}

.branzino-email-builder .component-group h3 {
  color: var(--be-color-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}

.branzino-email-builder .component-item {
  display: flex;
  background: var(--be-color-surface-subtle);
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  border: 2px solid #0000;
  border-radius: 8px;
  align-items:  center;
  margin-bottom: 8px;
  padding: 12px 16px;
  transition: all .2s;
}

.branzino-email-builder .component-item:hover {
  border-color: var(--be-color-primary);
  background: #e3f2fd;
  transform: translateY(-1px);
}

.branzino-email-builder .component-item:active {
  cursor: grabbing;
}

.branzino-email-builder .component-item.dragging {
  opacity: .5;
  transform: rotate(5deg);
}

.branzino-email-builder .component-icon {
  background: var(--be-color-primary);
  display: flex;
  color: #fff;
  border-radius: 4px;
  justify-content: center;
  align-items:  center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  font-size: 14px;
}

.branzino-email-builder .component-label {
  color: var(--be-color-text);
  font-weight: 500;
}

.branzino-email-builder .canvas-container {
  display: flex;
  background: var(--be-color-canvas-bg);
  flex-direction: column;
  flex: 1;
}

.branzino-email-builder .canvas-header {
  border-bottom: 1px solid var(--be-color-border);
  display: flex;
  background: #fff;
  justify-content: space-between;
  align-items:  center;
  padding: 16px 24px;
}

.branzino-email-builder .canvas-title {
  color: var(--be-color-text);
  font-size: 16px;
  font-weight: 600;
}

.branzino-email-builder .canvas-actions {
  display: flex;
  align-items:  center;
  gap: 12px;
}

.branzino-email-builder .preview-group {
  display: flex;
  border: 1px solid var(--be-color-border-soft);
  overflow: hidden;
  border-radius: 6px;
  gap: 4px;
}

.branzino-email-builder .preview-group .btn {
  display: flex;
  border: none;
  border-radius: 0;
  align-items:  center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
}

.branzino-email-builder .preview-group .btn.preview-icon-btn {
  justify-content: center;
  min-width: 42px;
  padding: 8px 10px;
}

.branzino-email-builder .preview-group .btn:first-child {
  border-right: 1px solid var(--be-color-border-soft);
}

.branzino-email-builder .preview-group .btn:hover {
  background: var(--be-color-app-bg);
}

.branzino-email-builder .preview-group .btn.active {
  color: var(--be-color-primary);
  box-shadow: inset 0 -2px 0 var(--be-color-primary);
  background: #edf6ff;
}

.branzino-email-builder .canvas.preview-mobile .drop-zone {
  box-shadow: 0 2px 14px #0f172a2e;
}

.branzino-email-builder .btn-icon {
  font-size: 14px;
}

.branzino-email-builder .btn {
  border: 1px solid var(--be-color-border-soft);
  cursor: pointer;
  background: #fff;
  border-radius: 6px;
  padding: 8px 16px;
  transition: all .2s;
  font-size: 14px;
}

.branzino-email-builder .btn:hover {
  background: #f5f5f5;
}

.branzino-email-builder .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.branzino-email-builder .btn.primary {
  background: var(--be-color-primary);
  color: #fff;
  border-color: var(--be-color-primary);
}

.branzino-email-builder .btn.primary:hover {
  background: var(--be-color-primary-strong);
}

.branzino-email-builder .canvas {
  overflow-y: auto;
  position: relative;
  flex: 1;
  padding: 24px;
}

.branzino-email-builder .drop-zone {
  border: 2px dashed var(--be-color-border-soft);
  position: relative;
  background: #fff;
  border-radius: 12px;
  min-height: 600px;
  padding: 24px;
  transition: all .3s;
}

.branzino-email-builder .drop-zone.drag-over {
  border-color: var(--be-color-primary);
  background: #f3f9ff;
}

.branzino-email-builder .drop-zone-placeholder {
  position: absolute;
  text-align: center;
  color: #999;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.branzino-email-builder .drop-zone-placeholder.hidden {
  display: none;
}

.branzino-email-builder .drop-zone-icon {
  opacity: .5;
  margin-bottom: 16px;
  font-size: 48px;
}

.branzino-email-builder .drop-zone-text {
  margin-bottom: 8px;
  font-size: 18px;
}

.branzino-email-builder .drop-zone-subtext {
  opacity: .7;
  font-size: 14px;
}

.branzino-email-builder .component {
  position: relative;
  cursor: pointer;
  border: 2px solid #0000;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 16px;
  transition: all .2s;
}

.branzino-email-builder .component:hover {
  border-color: var(--be-color-primary);
  box-shadow: 0 2px 8px #2196f31a;
}

.branzino-email-builder .component.selected {
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 3px #2196f31a;
}

.branzino-email-builder .text-component {
  outline: none;
  border: 1px solid #eee;
  border-radius: 6px;
  min-height: 40px;
  padding: 12px;
  line-height: 1.5;
}

.branzino-email-builder .text-component:focus {
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 2px #2196f31a;
}

.branzino-email-builder .text-component[contenteditable="true"] {
  cursor: text;
}

.branzino-email-builder .heading-component {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.branzino-email-builder .heading-component.h1 {
  font-size: 32px;
}

.branzino-email-builder .heading-component.h2 {
  font-size: 28px;
}

.branzino-email-builder .heading-component.h3 {
  font-size: 24px;
}

.branzino-email-builder .heading-component.h4 {
  font-size: 20px;
}

.branzino-email-builder .heading-component.h5 {
  font-size: 18px;
}

.branzino-email-builder .heading-component.h6 {
  font-size: 16px;
}

.branzino-email-builder .button-component {
  display: inline-block;
  background: var(--be-color-primary);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  transition: all .2s;
  font-weight: 500;
}

.branzino-email-builder .button-component:hover {
  background: var(--be-color-primary-strong);
  transform: translateY(-1px);
}

.branzino-email-builder .image-component {
  display: block;
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}

.branzino-email-builder .image-placeholder {
  border: 2px dashed var(--be-color-border-soft);
  display: flex;
  color: #999;
  background: #f5f5f5;
  border-radius: 6px;
  justify-content: center;
  align-items:  center;
  width: 100%;
  height: 200px;
  font-size: 16px;
}

.branzino-email-builder .insertion-indicator {
  background: var(--be-color-primary);
  opacity: 0;
  border-radius: 2px;
  height: 4px;
  margin: 8px 0;
  transition: opacity .2s;
}

.branzino-email-builder .insertion-indicator.active {
  opacity: 1;
}

.branzino-email-builder .canvas {
  overflow-y: auto;
  position: relative;
  background: var(--be-color-app-bg);
  flex: 1;
  padding: 24px;
}

.branzino-email-builder .drop-zone {
  position: relative;
  background: #fff;
  border: none;
  border-radius: 8px;
  max-width: 600px;
  min-height: 600px;
  margin: 0 auto;
  padding: 0;
  transition: all .3s;
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 8px #0000001a;
}

.branzino-email-builder .drop-zone.drag-over {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px #2196f333;
}

.branzino-email-builder .drop-zone-placeholder {
  position: absolute;
  text-align: center;
  color: #999;
  pointer-events: none;
  padding: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.branzino-email-builder .email-container {
  min-height: 560px;
  padding: 20px;
}

.branzino-email-builder .component {
  position: relative;
  cursor: pointer;
  border: 2px solid #0000;
  border-radius: 4px;
  margin-bottom: 0;
  padding: 0;
  transition: all .2s;
}

.branzino-email-builder .component:hover {
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 1px #2196f31a;
}

.branzino-email-builder .component.selected {
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 3px #2196f326;
}

.branzino-email-builder .vertical-insertion-indicator {
  position: absolute;
  background: var(--be-color-primary);
  opacity: 0;
  pointer-events: none;
  z-index: 11;
  border-radius: 999px;
  width: 4px;
  transition: opacity .16s;
  top: 4px;
  bottom: 4px;
  box-shadow: 0 0 0 2px #2196f32e;
}

.branzino-email-builder .vertical-insertion-indicator.active {
  opacity: 1;
}

.branzino-email-builder .vertical-insertion-indicator.side-left {
  left: -2px;
}

.branzino-email-builder .vertical-insertion-indicator.side-right {
  right: -2px;
}

.branzino-email-builder .drag-ghost-preview {
  opacity: .96;
  background: #fff;
  border: 1px solid #2196f359;
  border-radius: 8px;
  box-shadow: 0 10px 24px #0f172a2e;
}

.branzino-email-builder .block-content-frame {
  width: 100%;
}

.branzino-email-builder .canvas .section-component {
  background: none;
  border: none;
  border-radius: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.branzino-email-builder .text-component {
  outline: none;
  color: var(--be-color-text);
  border: none;
  border-radius: 0;
  min-height: 24px;
  margin: 16px 0;
  padding: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
}

.branzino-email-builder .heading-component {
  color: var(--be-color-text);
  margin: 24px 0 16px;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.3;
}

.branzino-email-builder .heading-component:focus {
  background: #2196f30d;
  border-radius: 4px;
  margin: 16px -8px 8px;
  padding: 8px;
}

.branzino-email-builder .button-component {
  display: inline-block;
  background: var(--be-color-primary);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  margin: 12px 0;
  padding: 12px 24px;
  transition: all .2s;
  font-family: inherit;
  font-weight: 500;
}

.branzino-email-builder .button-component:focus {
  outline: 2px solid #2196f34d;
  outline-offset: 2px;
}

.branzino-email-builder .button-component .button-text-component {
  display: inline;
  line-height: inherit;
  color: inherit;
  background: none;
  border: none;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.branzino-email-builder .button-component .button-text-component:focus {
  box-shadow: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
}

.branzino-email-builder .image-component {
  max-width: 100%;
  height: auto;
}

.branzino-email-builder .image-placeholder {
  background: var(--be-color-surface-subtle);
  border: 2px dashed var(--be-color-border-soft);
  display: flex;
  color: var(--be-color-text-muted);
  cursor: pointer;
  border-radius: 6px;
  justify-content: center;
  align-items:  center;
  width: 100%;
  height: 200px;
  margin: 16px 0;
  transition: all .2s;
  font-size: 16px;
}

.branzino-email-builder .image-placeholder:hover {
  background: var(--be-color-app-bg);
  border-color: var(--be-color-primary);
}

.branzino-email-builder .spacer-component {
  border: 1px dashed var(--be-color-border-soft);
  display: block;
  position: relative;
  background: none;
}

.branzino-email-builder .spacer-component:after {
  content: "📏 Spacer";
  position: absolute;
  color: #999;
  pointer-events: none;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.branzino-email-builder .separator-component {
  display: block;
  margin: 20px 0;
}

.branzino-email-builder .separator-line {
  background: var(--be-color-border);
  border: none;
  width: 100%;
  height: 2px;
  margin: 0;
}

.branzino-email-builder .social-component {
  text-align: center;
  margin: 16px 0;
}

.branzino-email-builder .social-links {
  display: inline-flex;
  align-items:  center;
  gap: 10px;
}

.branzino-email-builder .social-link {
  display: inline-block;
  text-decoration: none;
  border-radius: 4px;
  transition: all .2s;
}

.branzino-email-builder .social-link:hover {
  transform: scale(1.1);
}

.branzino-email-builder .social-icon {
  display: block;
  border-radius: 4px;
  width: 32px;
  height: 32px;
}

.branzino-email-builder .html-component {
  position: relative;
  outline: none;
  background: none;
  border: none;
  border-radius: 0;
  min-height: 24px;
  margin: 16px 0;
  padding: 0;
}

.branzino-email-builder .html-placeholder {
  color: var(--be-color-text-muted);
  text-align: center;
  padding: 20px;
  font-style: italic;
}

.branzino-email-builder .html-content {
  background: #fff;
  border-radius: 4px;
  padding: 12px;
}

.branzino-email-builder .component-controls {
  position: absolute;
  display: flex;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  background: #ffffffeb;
  border: 1px solid #94a3b873;
  border-radius: 999px;
  gap: 4px;
  padding: 4px;
  transition: opacity .18s, transform .18s;
  top: -14px;
  right: 10px;
  transform: translateY(-4px);
}

.branzino-email-builder .component:hover > .component-controls, .branzino-email-builder .component.selected > .component-controls, .branzino-email-builder .component:focus-within > .component-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.branzino-email-builder .component:hover:has(.component:hover) > .component-controls {
  opacity: 0;
  pointer-events: none;
}

.branzino-email-builder .control-btn {
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  background: none;
  border: 1px solid #0000;
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 22px;
  height: 22px;
  transition: background-color .18s, color .18s, border-color .18s;
  font-size: 11px;
  line-height: 1;
}

.branzino-email-builder .control-btn.drag-btn {
  cursor: grab;
}

.branzino-email-builder .control-btn.drag-btn:active {
  cursor: grabbing;
}

.branzino-email-builder .control-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b866;
}

.branzino-email-builder .control-btn.delete-btn:hover {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #ef444459;
}

.branzino-email-builder .social-platforms {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.branzino-email-builder .checkbox-label {
  display: flex;
  cursor: pointer;
  align-items:  center;
  gap: 8px;
  font-size: 14px;
}

.branzino-email-builder .checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.branzino-email-builder .checkbox-label span {
  color: var(--be-color-text);
}

.branzino-email-builder #htmlContent {
  resize: vertical;
  min-height: 120px;
  font-family: Courier New, monospace;
}

.branzino-email-builder #previewHtmlBtn {
  margin-top: 8px;
  font-size: 12px;
}

.branzino-email-builder .properties-panel {
  background: var(--be-color-surface);
  border-left: 1px solid var(--be-color-border);
  display: flex;
  overflow: hidden;
  flex-direction: column;
  width: 320px;
}

.branzino-email-builder .properties-content {
  overflow-y: auto;
  padding: var(--be-space-5);
  flex: 1;
}

.branzino-email-builder .properties-tabs {
  display: flex;
  border-bottom: 1px solid var(--be-color-border);
  background: var(--be-color-surface-subtle);
}

.branzino-email-builder .properties-tab-btn {
  cursor: pointer;
  color: var(--be-color-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid #0000;
  flex: 1;
  padding: 14px 16px;
  transition: all .2s;
  font-size: 14px;
  font-weight: 500;
}

.branzino-email-builder .properties-tab-btn:hover {
  background: var(--be-color-surface);
  color: var(--be-color-text);
}

.branzino-email-builder .properties-tab-btn.active {
  background: var(--be-color-surface);
  color: var(--be-color-primary);
  border-bottom-color: var(--be-color-primary);
}

.branzino-email-builder .component-props {
  display: flex;
  gap: var(--be-space-4);
  flex-direction: column;
}

.branzino-email-builder .responsive-properties-toolbar {
  position: sticky;
  z-index: 5;
  display: flex;
  border: 1px solid var(--be-color-border);
  border-radius: var(--be-radius-lg);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  background: #fffffff5;
  flex-direction: column;
  gap: 8px;
  margin: -4px -4px 4px;
  padding: 10px;
  top: 0;
  box-shadow: 0 4px 12px #0f172a0f;
}

.branzino-email-builder .responsive-properties-label {
  color: var(--be-color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 12px;
  font-weight: 600;
}

.branzino-email-builder .responsive-device-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: var(--be-radius-md);
  background: var(--be-color-surface-subtle);
  gap: 4px;
  padding: 3px;
}

.branzino-email-builder .responsive-device-switcher button {
  display: flex;
  border-radius: var(--be-radius-sm);
  color: var(--be-color-text-muted);
  cursor: pointer;
  background: none;
  border: 1px solid #0000;
  justify-content: center;
  align-items:  center;
  gap: 6px;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
}

.branzino-email-builder .responsive-device-switcher button.active {
  border-color: var(--be-color-border);
  background: var(--be-color-surface);
  color: var(--be-color-primary);
  box-shadow: 0 1px 3px #0f172a14;
}

.branzino-email-builder .responsive-reset-btn {
  color: var(--be-color-primary);
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  font-size: 12px;
}

.branzino-email-builder .property-group {
  margin-bottom: 0;
}

.branzino-email-builder .property-group label {
  display: block;
  margin-bottom: var(--be-space-2);
  color: #555;
  font-size: 14px;
  font-weight: 500;
}

.branzino-email-builder .property-label-row {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: var(--be-space-2);
  margin-bottom: var(--be-space-2);
}

.branzino-email-builder .property-label-row label {
  margin-bottom: 0;
}

.branzino-email-builder .property-group input, .branzino-email-builder .property-group select, .branzino-email-builder .property-group textarea:not(.property-code-editor-textarea) {
  border: 2px solid var(--be-color-border);
  border-radius: var(--be-radius-md);
  background: var(--be-color-surface);
  width: 100%;
  padding: 10px 12px;
  transition: border-color .2s;
  font-size: 14px;
}

.branzino-email-builder .property-group input:focus, .branzino-email-builder .property-group select:focus, .branzino-email-builder .property-group textarea:not(.property-code-editor-textarea):focus {
  outline: none;
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 3px #2196f31a;
}

.branzino-email-builder .property-group textarea:not(.property-code-editor-textarea) {
  resize: vertical;
  min-height: 120px;
  line-height: 1.4;
}

.branzino-email-builder .property-group input[type="number"] {
  appearance: auto;
  -moz-appearance: auto;
}

.branzino-email-builder .property-group input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: auto;
  margin: 0;
}

.branzino-email-builder .property-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: auto;
  margin: 0;
}

.branzino-email-builder .property-group > .btn {
  width: 100%;
}

.branzino-email-builder .property-code-editor {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  border: 2px solid var(--be-color-border);
  border-radius: var(--be-radius-md);
  color: #e2e8f0;
  overflow: hidden;
  background: #0f172a;
  min-height: 180px;
}

.branzino-email-builder .property-code-editor:focus-within {
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 3px #2196f329;
}

.branzino-email-builder .property-code-editor-gutter {
  color: #64748b;
  text-align: right;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  background: #0b1220;
  border-right: 1px solid #94a3b840;
  min-width: 44px;
  padding: 12px 8px 12px 10px;
}

.branzino-email-builder .property-code-editor-gutter-line {
  height: 1.5em;
  font-family: Fira Code, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.branzino-email-builder .property-code-editor-code {
  position: relative;
  min-height: 180px;
}

.branzino-email-builder .property-code-editor-pre, .branzino-email-builder .property-code-editor-textarea {
  position: absolute;
  tab-size: 2;
  border: none;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 12px;
  font-family: Fira Code, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  font-size: 13px;
  line-height: 1.5;
  inset: 0;
  white-space: pre !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.branzino-email-builder .property-code-editor-pre {
  overflow: hidden;
  pointer-events: none;
}

.branzino-email-builder .property-code-editor-textarea {
  outline: none;
  resize: none;
  caret-color: #e2e8f0;
  overflow: auto;
  color: #0000 !important;
  background: none !important;
}

.branzino-email-builder .property-code-editor-modal, .branzino-email-builder .property-code-editor-modal .property-code-editor-code {
  min-height: min(70vh, 680px);
}

.branzino-email-builder .property-code-editor .token.comment {
  color: #94a3b8;
}

.branzino-email-builder .property-code-editor .token.tag, .branzino-email-builder .property-code-editor .token.punctuation {
  color: #cbd5e1;
}

.branzino-email-builder .property-code-editor .token.attr-name {
  color: #93c5fd;
}

.branzino-email-builder .property-code-editor .token.attr-value, .branzino-email-builder .property-code-editor .token.string {
  color: #86efac;
}

.branzino-email-builder .property-code-editor .token.keyword {
  color: #f9a8d4;
}

.branzino-email-builder .property-group-note {
  margin-top: var(--be-space-2);
  color: var(--be-color-text-muted);
  font-size: 13px;
}

.branzino-email-builder .property-group-error {
  color: #b42318;
}

.branzino-email-builder .padding-link-btn {
  border: 1px solid var(--be-color-border);
  background: var(--be-color-surface-subtle);
  color: var(--be-color-text-muted);
  cursor: pointer;
  border-radius: 999px;
  padding: 5px 10px;
  transition: all .2s;
  font-size: 12px;
  line-height: 1.2;
}

.branzino-email-builder .padding-link-btn:hover {
  border-color: var(--be-color-primary);
  color: var(--be-color-primary);
  background: #f3f9ff;
}

.branzino-email-builder .padding-link-btn.active {
  border-color: var(--be-color-primary);
  color: var(--be-color-primary);
  background: #edf6ff;
}

.branzino-email-builder .padding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--be-space-2);
}

.branzino-email-builder .padding-cell {
  border: 1px solid var(--be-color-border);
  border-radius: var(--be-radius-md);
  background: var(--be-color-surface-subtle);
  padding: 8px;
}

.branzino-email-builder .padding-cell-label {
  display: block;
  color: var(--be-color-text-muted);
  margin-bottom: 6px;
  font-size: 12px;
}

.branzino-email-builder .padding-input-wrap {
  display: flex;
  align-items:  center;
  gap: 6px;
}

.branzino-email-builder .padding-input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
}

.branzino-email-builder .padding-unit {
  color: var(--be-color-text-muted);
  text-align: right;
  min-width: 18px;
  font-size: 12px;
}

.branzino-email-builder .property-inline-row {
  display: flex;
  gap: var(--be-space-2);
  align-items:  center;
}

.branzino-email-builder .property-inline-row > :first-child {
  flex: 1;
  min-width: 0;
}

.branzino-email-builder .property-inline-row .btn {
  white-space: nowrap;
  width: auto;
}

.branzino-email-builder .color-input-row {
  display: flex;
  align-items:  center;
  gap: var(--be-space-2);
}

.branzino-email-builder .color-input-row input[type="color"] {
  cursor: pointer;
  width: 52px;
  min-width: 52px;
  height: 40px;
  padding: 2px;
}

.branzino-email-builder .color-input-row input[type="text"] {
  font-family: Courier New, Courier, monospace;
}

.branzino-email-builder .color-swatches {
  display: flex;
  margin-top: var(--be-space-2);
  flex-wrap: wrap;
  gap: 6px;
}

.branzino-email-builder .color-swatch-btn {
  border: 1px solid var(--be-color-border);
  cursor: pointer;
  border-radius: 999px;
  width: 20px;
  height: 20px;
  padding: 0;
  box-shadow: inset 0 0 0 1px #ffffff73;
}

.branzino-email-builder .color-swatch-btn.active {
  outline: 2px solid var(--be-color-primary);
  outline-offset: 1px;
}

.branzino-email-builder .social-links-list {
  display: flex;
  gap: var(--be-space-3);
  flex-direction: column;
}

.branzino-email-builder .social-link-item {
  padding: var(--be-space-3);
  border-radius: var(--be-radius-md);
  border: 1px solid var(--be-color-border);
  background: var(--be-color-surface-subtle);
  gap: var(--be-space-3);
}

.branzino-email-builder .social-link-remove-btn {
  padding: 8px 12px;
  font-size: 13px;
}

.branzino-email-builder .properties-content .empty-state {
  text-align: left;
  padding: var(--be-space-4);
  border: 1px dashed var(--be-color-border-soft);
  border-radius: var(--be-radius-lg);
  background: var(--be-color-surface-subtle);
  color: var(--be-color-text-muted);
}

.branzino-email-builder .sections-content {
  overflow-y: auto;
  height: 100%;
  padding: 20px;
}

.branzino-email-builder .sections-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.branzino-email-builder .section-group {
  margin-bottom: 8px;
}

.branzino-email-builder .section-group h3 {
  color: var(--be-color-text);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

.branzino-email-builder .section-item {
  display: flex;
  background: var(--be-color-surface-subtle);
  cursor: pointer;
  border: 2px solid #0000;
  border-radius: 8px;
  align-items:  center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px;
  transition: all .2s;
}

.branzino-email-builder .section-item:hover {
  border-color: var(--be-color-primary);
  background: #f3f9ff;
  transform: translateY(-1px);
}

.branzino-email-builder .section-preview {
  border: 1px solid var(--be-color-border);
  display: flex;
  background: #fff;
  border-radius: 4px;
  flex-shrink: 0;
  justify-content: center;
  align-items:  center;
  width: 60px;
  height: 40px;
}

.branzino-email-builder .section-preview-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  gap: 2px;
  width: 100%;
  height: 100%;
  font-size: 8px;
  line-height: 1;
}

.branzino-email-builder .preview-header {
  background: var(--be-color-primary);
  color: #fff;
  display: flex;
  border-radius: 1px;
  justify-content: center;
  align-items:  center;
  width: 90%;
  height: 8px;
  font-size: 6px;
}

.branzino-email-builder .preview-banner {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 1px;
  width: 90%;
  height: 12px;
}

.branzino-email-builder .preview-divider {
  background: var(--be-color-border);
  width: 90%;
  height: 1px;
}

.branzino-email-builder .preview-layout {
  display: flex;
  align-items:  center;
  gap: 4px;
  width: 90%;
  height: 100%;
}

.branzino-email-builder .preview-text {
  display: flex;
  background: #f0f0f0;
  border-radius: 1px;
  flex: 1;
  justify-content: center;
  align-items:  center;
  height: 80%;
  font-size: 8px;
}

.branzino-email-builder .preview-image {
  background: var(--be-color-border-soft);
  display: flex;
  border-radius: 1px;
  justify-content: center;
  align-items:  center;
  width: 20px;
  height: 80%;
  font-size: 8px;
}

.branzino-email-builder .preview-columns {
  display: flex;
  gap: 2px;
  width: 90%;
  height: 80%;
}

.branzino-email-builder .preview-column {
  display: flex;
  background: #f0f0f0;
  border-radius: 1px;
  flex: 1;
  justify-content: center;
  align-items:  center;
  font-size: 8px;
}

.branzino-email-builder .preview-cta {
  display: flex;
  flex-direction: column;
  align-items:  center;
  gap: 2px;
  width: 90%;
  height: 100%;
}

.branzino-email-builder .preview-button {
  background: var(--be-color-primary);
  color: #fff;
  display: flex;
  border-radius: 2px;
  justify-content: center;
  align-items:  center;
  width: 60%;
  height: 8px;
  font-size: 6px;
}

.branzino-email-builder .preview-social {
  display: flex;
  background: #f0f0f0;
  border-radius: 1px;
  justify-content: center;
  align-items:  center;
  width: 90%;
  height: 8px;
  font-size: 6px;
}

.branzino-email-builder .preview-unsubscribe {
  background: var(--be-color-border);
  display: flex;
  border-radius: 1px;
  justify-content: center;
  align-items:  center;
  width: 70%;
  height: 6px;
  font-size: 5px;
}

.branzino-email-builder .preview-company {
  display: flex;
  background: #f0f0f0;
  border-radius: 1px;
  justify-content: center;
  align-items:  center;
  width: 90%;
  height: 8px;
  font-size: 6px;
}

.branzino-email-builder .section-info {
  flex: 1;
}

.branzino-email-builder .section-title {
  color: var(--be-color-text);
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 600;
}

.branzino-email-builder .section-description {
  color: var(--be-color-text-muted);
  font-size: 11px;
}

.branzino-email-builder .modal-overlay {
  position: fixed;
  z-index: var(--be-z-modal-overlay);
  opacity: 0;
  visibility: hidden;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  background: #0009;
  transition: all .3s;
  inset: 0;
}

.branzino-email-builder .modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.branzino-email-builder .modal {
  position: fixed;
  border-radius: var(--be-radius-xl);
  z-index: var(--be-z-modal);
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  display: flex;
  background: #fff;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
  transition: all .3s;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 60px #0000004d;
}

.branzino-email-builder .modal.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%)scale(1);
}

.branzino-email-builder .modal-header {
  padding: var(--be-space-5) var(--be-space-6);
  border-bottom: 1px solid var(--be-color-border);
  display: flex;
  background: var(--be-color-surface-subtle);
  justify-content: space-between;
  align-items:  center;
}

.branzino-email-builder .modal-header h3 {
  color: var(--be-color-text);
  display: flex;
  align-items:  center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.branzino-email-builder .modal-close {
  color: var(--be-color-text-muted);
  cursor: pointer;
  border-radius: var(--be-radius-sm);
  display: flex;
  background: none;
  border: none;
  justify-content: center;
  align-items:  center;
  width: 32px;
  height: 32px;
  padding: 4px;
  transition: all .2s;
  font-size: 24px;
}

.branzino-email-builder .modal-close:hover {
  background: var(--be-color-border);
  color: var(--be-color-text);
}

.branzino-email-builder .modal-content {
  padding: var(--be-space-6);
  overflow-y: auto;
  flex: 1;
}

.branzino-email-builder .send-mail-modal-content {
  min-width: min(560px, 100vw - 48px);
}

.branzino-email-builder .html-editor-modal {
  width: min(980px, 100vw - 48px);
}

.branzino-email-builder .html-editor-modal-content {
  min-height: min(78vh, 760px);
}

.branzino-email-builder .send-mail-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.branzino-email-builder .send-mail-form label {
  color: var(--be-color-text);
  font-size: 13px;
  font-weight: 600;
}

.branzino-email-builder .send-mail-form input {
  border-radius: var(--be-radius-lg);
  color: var(--be-color-text);
  outline: none;
  border: 1px solid #d4d6da;
  width: 100%;
  padding: 10px 12px;
  transition: border-color .2s, box-shadow .2s;
  font-size: 14px;
}

.branzino-email-builder .send-mail-form input:focus {
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 3px #2196f326;
}

.branzino-email-builder .send-mail-form small {
  color: var(--be-color-text-muted);
  margin-top: -2px;
  font-size: 12px;
}

.branzino-email-builder .send-mail-status {
  border-radius: var(--be-radius-lg);
  border: 1px solid var(--be-color-border);
  background: var(--be-color-surface-subtle);
  color: var(--be-color-text);
  margin-top: 4px;
  padding: 10px 12px;
  font-size: 13px;
}

.branzino-email-builder .send-mail-status.error {
  color: #8c2a2a;
  background: #fff1f1;
  border-color: #f2c2c2;
}

.branzino-email-builder .send-mail-status.success {
  color: #206a33;
  background: #ecfff0;
  border-color: #b8e3c0;
}

.branzino-email-builder .send-mail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.branzino-email-builder .templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--be-space-5);
  max-width: 800px;
}

.branzino-email-builder .template-card {
  border: 2px solid var(--be-color-border);
  border-radius: var(--be-radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: all .2s;
}

.branzino-email-builder .template-card:hover {
  border-color: var(--be-color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #2196f326;
}

.branzino-email-builder .template-preview {
  background: var(--be-color-surface-subtle);
  overflow: hidden;
  position: relative;
  display: flex;
  border-bottom: 1px solid var(--be-color-border);
  justify-content: center;
  align-items:  center;
  height: 200px;
}

.branzino-email-builder .template-preview-content {
  border-radius: var(--be-radius-sm);
  overflow: hidden;
  position: relative;
  background: #fff;
  width: 90%;
  height: 90%;
  transform: scale(.7);
  box-shadow: 0 2px 8px #0000001a;
}

.branzino-email-builder .template-info {
  padding: var(--be-space-4);
}

.branzino-email-builder .template-title {
  color: var(--be-color-text);
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.branzino-email-builder .template-description {
  color: var(--be-color-text-muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.branzino-email-builder .template-blank {
  border: 2px dashed var(--be-color-border-soft);
  background: var(--be-color-canvas-bg);
}

.branzino-email-builder .template-blank .template-preview {
  background: var(--be-color-canvas-bg);
  border: none;
}

.branzino-email-builder .template-blank .template-preview-content {
  display: flex;
  color: #999;
  background: #fff;
  border: 2px dashed #ccc;
  justify-content: center;
  align-items:  center;
  font-size: 18px;
}

.branzino-email-builder .template-blank:hover {
  border-color: var(--be-color-primary);
  background: #f3f9ff;
}

.branzino-email-builder .save-form {
  max-width: 400px;
}

.branzino-email-builder .form-group {
  margin-bottom: 20px;
}

.branzino-email-builder .form-group label {
  display: block;
  color: var(--be-color-text);
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.branzino-email-builder .form-group input, .branzino-email-builder .form-group textarea {
  padding: var(--be-space-3);
  border: 2px solid var(--be-color-border);
  border-radius: var(--be-radius-md);
  resize: vertical;
  width: 100%;
  transition: border-color .2s;
  font-family: inherit;
  font-size: 14px;
}

.branzino-email-builder .form-group input:focus, .branzino-email-builder .form-group textarea:focus {
  outline: none;
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 3px #2196f31a;
}

.branzino-email-builder .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.branzino-email-builder .saved-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--be-space-5);
  max-width: 800px;
}

.branzino-email-builder .saved-template-card {
  cursor: default;
  display: flex;
  flex-direction: column;
}

.branzino-email-builder .saved-template-card.is-selected {
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 2px #2196f31f;
}

.branzino-email-builder .saved-template-card:hover {
  transform: none;
}

.branzino-email-builder .saved-template-preview {
  background: var(--be-color-surface-subtle);
  border-bottom: 1px solid var(--be-color-border);
}

.branzino-email-builder .saved-template-preview-frame {
  display: block;
  pointer-events: none;
  background: #fff;
  border: 0;
  width: 100%;
  height: 100%;
}

.branzino-email-builder .saved-template-preview-empty {
  border: 2px dashed var(--be-color-border-soft);
  color: var(--be-color-text-muted);
  display: flex;
  text-align: center;
  justify-content: center;
  align-items:  center;
  padding: 0 12px;
  font-size: 14px;
}

.branzino-email-builder .saved-template-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.branzino-email-builder .saved-template-meta {
  color: var(--be-color-text-muted);
  margin: 0;
  font-size: 13px;
}

.branzino-email-builder .saved-template-current {
  color: var(--be-color-primary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

.branzino-email-builder .saved-template-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
}

.branzino-email-builder .saved-template-card-actions .btn {
  padding: 6px var(--be-space-3);
  min-width: auto;
  font-size: 13px;
}

.branzino-email-builder .btn-danger {
  color: #fff;
  background: #f44;
  border-color: #f44;
}

.branzino-email-builder .btn-danger:hover {
  background: #c00;
  border-color: #c00;
}

.branzino-email-builder .empty-state {
  text-align: center;
  color: #999;
  padding: 40px 20px;
}

.branzino-email-builder .empty-state-icon {
  opacity: .5;
  margin-bottom: 16px;
  font-size: 48px;
}

.branzino-email-builder .empty-state h4 {
  color: var(--be-color-text-muted);
  margin: 0 0 8px;
  font-size: 18px;
}

.branzino-email-builder .empty-state p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.branzino-email-builder .toast {
  position: fixed;
  top: var(--be-space-5);
  right: var(--be-space-5);
  padding: var(--be-space-3) var(--be-space-5);
  border-radius: var(--be-radius-md);
  color: #fff;
  z-index: var(--be-z-toast);
  opacity: 0;
  visibility: hidden;
  max-width: 300px;
  transition: all .3s;
  font-size: 14px;
  font-weight: 500;
  transform: translateY(-20px);
}

.branzino-email-builder .toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.branzino-email-builder .toast.success {
  background: #4caf50;
}

.branzino-email-builder .toast.error {
  background: #f44336;
}

.branzino-email-builder .stock-image-modal {
  width: min(980px, 100vw - 48px);
}

.branzino-email-builder .stock-image-modal-content {
  min-height: min(76vh, 720px);
}

.branzino-email-builder .stock-provider-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.branzino-email-builder .stock-provider-tab {
  border: 1px solid var(--be-color-border);
  background: var(--be-color-surface-subtle);
  color: var(--be-color-text);
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
}

.branzino-email-builder .stock-provider-tab.active {
  border-color: var(--be-color-primary);
  color: var(--be-color-primary);
  background: #eaf5ff;
}

.branzino-email-builder .stock-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.branzino-email-builder .stock-search-row input {
  border-radius: var(--be-radius-lg);
  border: 1px solid #d4d6da;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 14px;
}

.branzino-email-builder .stock-search-row input:focus {
  outline: none;
  border-color: var(--be-color-primary);
  box-shadow: 0 0 0 3px #2196f324;
}

.branzino-email-builder .stock-search-note {
  color: var(--be-color-text-muted);
  margin: 0 0 12px;
  font-size: 12px;
}

.branzino-email-builder .stock-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.branzino-email-builder .stock-image-card {
  border: 1px solid var(--be-color-border);
  border-radius: var(--be-radius-md);
  text-align: left;
  cursor: pointer;
  background: #fff;
  padding: 8px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.branzino-email-builder .stock-image-card:hover {
  border-color: var(--be-color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px #2196f326;
}

.branzino-email-builder .stock-image-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  width: 100%;
}

.branzino-email-builder .stock-image-meta {
  display: block;
  color: var(--be-color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 8px;
  font-size: 12px;
}

.branzino-email-builder .column-layout {
  position: relative;
}

.branzino-email-builder .columns-container {
  display: flex;
  position: relative;
  gap: 20px;
  padding: 20px 0;
}

.branzino-email-builder .column-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.branzino-email-builder .column-dropzone {
  background: none;
  border: none;
  border-radius: 0;
  min-height: 0;
  padding: 0;
  transition: box-shadow .2s, background-color .2s;
}

.branzino-email-builder .column-dropzone.is-empty {
  border: 1px dashed var(--be-color-border);
  background: var(--be-color-canvas-bg);
  border-radius: 8px;
  min-height: 100px;
  padding: 12px;
}

.branzino-email-builder .column-dropzone.drag-over-column {
  background: #e8f0fe;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px #4285f4, 0 0 0 3px #4285f41a;
}

.branzino-email-builder .column-dropzone.is-empty.drag-over-column {
  border-color: #4285f4;
}

.branzino-email-builder .column-placeholder {
  display: flex;
  color: #999;
  pointer-events: none;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  gap: 8px;
  min-height: 80px;
  font-size: 14px;
}

.branzino-email-builder .column-placeholder-icon {
  opacity: .5;
  font-size: 24px;
}

.branzino-email-builder .column-placeholder-text {
  opacity: .7;
  font-size: 13px;
}

.branzino-email-builder .column-resize-handle {
  position: absolute;
  cursor: col-resize;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items:  center;
  width: 20px;
  top: 0;
  bottom: 0;
  right: -10px;
}

.branzino-email-builder .column-resize-handle:before {
  content: "⋮";
  color: #ccc;
  transition: color .2s;
  font-size: 18px;
}

.branzino-email-builder .column-resize-handle:hover:before {
  color: #4285f4;
}

.branzino-email-builder .column-resize-handle:active {
  cursor: col-resize;
}

.branzino-email-builder .column-dropzone .component {
  margin-bottom: 12px;
}

.branzino-email-builder .column-dropzone .component:last-child {
  margin-bottom: 0;
}

.branzino-email-builder .column-dropzone > .component > .insertion-indicator {
  display: none;
}

@media (width <= 600px) {
  .branzino-email-builder .column-resize-handle {
    display: none;
  }
}
