/* Custom styles for email studio */
:root {
  --brand-primary: #1e40af;
  --brand-accent: #2563eb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar beautification */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Email preview devices */
.preview-desktop {
  width: 100%;
  max-width: 640px;
  min-height: 540px;
  transition: all 0.25s ease-in-out;
}

.preview-mobile {
  width: 375px !important;
  max-width: 375px !important;
  min-height: 640px;
  border: 10px solid #0f172a;
  border-radius: 36px;
  box-shadow: 0 25px 30px -10px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease-in-out;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.2s ease-out forwards;
}

/* Visual Canvas Interactive Blocks */
.canvas-block {
  position: relative;
  transition: all 0.15s ease-in-out;
  border: 1px dashed transparent;
  border-radius: 8px;
}

.canvas-block:hover {
  border-color: #3b82f6;
  background-color: rgba(239, 246, 255, 0.4);
}

.canvas-block.selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.canvas-block-toolbar {
  position: absolute;
  top: -14px;
  right: 12px;
  display: none;
  background: #1e293b;
  color: white;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  z-index: 20;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  align-items: center;
  gap: 4px;
}

.canvas-block:hover .canvas-block-toolbar {
  display: flex;
}

.canvas-block-toolbar button {
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.1s;
}

.canvas-block-toolbar button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.15);
}

/* Editable content area styling */
[contenteditable="true"]:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Code editor styling */
.raw-html-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  tab-size: 2;
}

/* Deliverability gauge pill */
.deliverability-score-high {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.deliverability-score-med {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.deliverability-score-low {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}
