/* ==========================================================================
   MS Office-Grade SmartArt Graphic Styles
   ========================================================================== */

/* Modal Backdrop & Dialog Layout */
.smartart-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  box-sizing: border-box;
}

.smartart-dialog-card {
  width: 95%;
  max-width: 980px;
  max-height: 88vh;
  background-color: var(--bg-surface, #ffffff);
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color, #cbd5e1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: smartartModalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes smartartModalPop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.smartart-dialog-card .modal-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface, #ffffff);
}

.smartart-dialog-card .modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main, #0f172a);
  display: flex;
  align-items: center;
  gap: 8px;
}

.smartart-dialog-card .modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.smartart-dialog-card .modal-close:hover {
  background-color: var(--bg-hover, #f1f5f9);
  color: var(--text-main, #0f172a);
}

.smartart-dialog-card .modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--bg-toolbar, #f8fafc);
}

.smartart-dialog-card .btn {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.smartart-dialog-card .btn-secondary {
  background-color: var(--bg-surface, #ffffff);
  border-color: var(--border-color, #cbd5e1);
  color: var(--text-main, #334155);
}

.smartart-dialog-card .btn-secondary:hover {
  background-color: var(--bg-hover, #f1f5f9);
}

.smartart-dialog-card .btn-primary {
  background-color: var(--primary-color, #2563eb);
  color: #ffffff;
}

.smartart-dialog-card .btn-primary:hover {
  opacity: 0.92;
}

.smartart-modal-layout {
  display: grid;
  grid-template-columns: 180px 240px 1fr;
  height: 520px;
  overflow: hidden;
  background-color: var(--bg-surface);
}

@media (max-width: 860px) {
  .smartart-modal-layout {
    grid-template-columns: 140px 1fr;
    height: 480px;
  }
  .smartart-preview-panel {
    display: none;
  }
}

@media (max-width: 600px) {
  .smartart-modal-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: 70vh;
    overflow-y: auto;
  }
  .smartart-categories-panel {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 6px;
    gap: 6px;
  }
  .smartart-cat-item {
    padding: 6px 10px;
    white-space: nowrap;
    font-size: 0.76rem;
  }
  .smartart-grid-panel {
    max-height: 280px;
  }
  .smartart-presets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Category Sidebar */
.smartart-categories-panel {
  border-right: 1px solid var(--border-color);
  background-color: var(--bg-toolbar);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.smartart-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.smartart-cat-item i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
}

.smartart-cat-item:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.smartart-cat-item:hover i {
  color: var(--primary-color);
}

.smartart-cat-item.active {
  background-color: var(--primary-color);
  color: #ffffff;
}

.smartart-cat-item.active i {
  color: #ffffff;
}

/* Presets Grid */
.smartart-grid-panel {
  border-right: 1px solid var(--border-color);
  padding: 14px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-content: flex-start;
  background-color: var(--bg-surface);
}

.smartart-preset-card {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  background: var(--bg-surface);
  transition: all 0.15s ease;
  user-select: none;
}

.smartart-preset-card:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.smartart-preset-card.active {
  border-color: var(--primary-color);
  outline: 2px solid var(--primary-color);
  background-color: var(--primary-light);
}

.smartart-preset-icon-box {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.smartart-preset-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

/* Right Preview & Live Editor */
.smartart-preview-panel {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  background: var(--bg-app);
}

.smartart-preview-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.smartart-preview-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Color Palette Picker */
.smartart-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.smartart-color-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

.smartart-palette-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.smartart-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.smartart-color-dot:hover {
  transform: scale(1.2);
}

.smartart-color-dot.active {
  border-color: #1e293b;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
  transform: scale(1.15);
}

/* Text List Editor */
.smartart-text-editor-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
}

.smartart-text-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.smartart-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.smartart-item-row {
  display: flex;
  align-items: center;
  gap: 4px;
  transition: padding-left 0.15s ease;
}

.smartart-item-row.level-1 {
  padding-left: 20px;
}

.smartart-item-row.level-2 {
  padding-left: 40px;
}

.smartart-item-handle {
  color: var(--text-muted);
  font-size: 0.75rem;
  width: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smartart-item-input {
  flex: 1;
  height: 26px;
  font-size: 0.8rem;
  padding: 2px 8px;
}

.smartart-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.smartart-btn-sub,
.smartart-btn-indent,
.smartart-btn-outdent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  color: var(--text-main, #334155);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.smartart-btn-sub {
  font-weight: 500;
  gap: 3px;
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.smartart-btn-sub:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.smartart-btn-indent:hover:not(:disabled),
.smartart-btn-outdent:hover:not(:disabled) {
  background: var(--hover-bg, #f1f5f9);
  color: #0f172a;
}

.smartart-btn-indent:disabled,
.smartart-btn-outdent:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.smartart-btn-del {
  color: #ef4444;
  font-size: 0.8rem;
  padding: 0 4px;
}

.smartart-btn-del:hover {
  color: #dc2626;
}

/* Live Preview Canvas Box */
.smartart-live-preview-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

/* ==========================================================================
   Rendered SmartArt Graphics Components
   ========================================================================== */
.smartart-wrapper {
  margin: 16px 0;
  padding: 14px;
  border: 1px dashed transparent;
  border-radius: 8px;
  position: relative;
  transition: border-color 0.15s ease;
  user-select: none;
}

.smartart-wrapper:hover {
  border-color: #cbd5e1;
}

.smartart-toolbar-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.35;
  transition: opacity 0.15s ease;
}

.smartart-wrapper:hover .smartart-toolbar-badge {
  opacity: 1;
}

.smartart-action-btn {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.12s ease;
}

.smartart-action-btn:hover {
  background-color: var(--bg-hover, #f1f5f9);
  color: var(--text-main, #0f172a);
}

.smartart-action-btn.btn-smartart-edit {
  color: #2563eb;
  background-color: #eff6ff;
  border-color: #bfdbfe;
}

.smartart-action-btn.btn-smartart-edit:hover {
  background-color: #dbeafe;
}

.smartart-action-btn.btn-smartart-del {
  color: #ef4444;
}

.smartart-action-btn.btn-smartart-del:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
}

/* Inner SmartArt Text Element - editable right inside the document */
.smartart-text {
  outline: none;
  word-break: break-word;
  user-select: text;
  cursor: text;
}

.smartart-text:focus {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.8);
  border-radius: 3px;
}

/* 1. Basic Block List */
.smartart-block-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.smartart-block-item {
  border-radius: 6px;
  padding: 12px 14px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
}

.smartart-block-header {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.8;
}

/* 2. Vertical Box List */
.smartart-vertical-box-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
}

.smartart-vbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
  padding: 10px 14px;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.smartart-vbox-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* 3. Chevron List */
.smartart-chevron-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.smartart-chevron-item {
  flex: 1;
  min-width: 110px;
  padding: 12px 20px 12px 16px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  position: relative;
  clip-path: polygon(0% 0%, 88% 0%, 100% 50%, 88% 100%, 0% 100%, 12% 50%);
  text-align: center;
}

.smartart-chevron-item:first-child {
  clip-path: polygon(0% 0%, 88% 0%, 100% 50%, 88% 100%, 0% 100%);
}

/* 4. Process Workflow */
.smartart-process {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.smartart-process-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}

.smartart-process-box {
  flex: 1;
  padding: 12px 14px;
  border-radius: 6px;
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.smartart-step-num {
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.8;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.smartart-arrow {
  color: #94a3b8;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

/* 5. Step Up Process */
.smartart-stepup-process {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 180px;
}

.smartart-stepup-bar {
  flex: 1;
  border-radius: 6px 6px 0 0;
  color: #ffffff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.smartart-stepup-bar.step-level-1 { height: 45%; }
.smartart-stepup-bar.step-level-2 { height: 72%; }
.smartart-stepup-bar.step-level-3 { height: 100%; }

.smartart-stepup-badge {
  font-size: 1.2rem;
  font-weight: 800;
  opacity: 0.8;
}

/* 6. Continuous Arrow Process */
.smartart-continuous-process {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.smartart-carrow-step {
  flex: 1;
  min-width: 110px;
  padding: 12px 14px;
  color: #ffffff;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.smartart-carrow-head {
  font-size: 1.1rem;
  font-weight: 800;
  opacity: 0.7;
}

/* 7. Basic Cycle */
.smartart-cycle {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.smartart-cycle-ring {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 4px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smartart-cycle-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 4px;
}

.smartart-cycle-center i {
  font-size: 1.8rem;
}

.smartart-cycle-node {
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.cycle-pos-0 { top: -20px; left: calc(50% - 39px); }
.cycle-pos-1 { top: calc(50% - 39px); right: -25px; }
.cycle-pos-2 { bottom: -20px; left: calc(50% - 39px); }
.cycle-pos-3 { top: calc(50% - 39px); left: -25px; }
.cycle-pos-4 { top: 15px; right: 0; }
.cycle-pos-5 { bottom: 15px; left: 0; }

/* 8. Radial Cycle */
.smartart-radial-cycle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 320px;
  height: 240px;
  margin: 0 auto;
}

.smartart-radial-center {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px;
  z-index: 2;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.smartart-radial-satellite {
  position: absolute;
  width: 75px;
  height: 50px;
  border-radius: 6px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.radial-pos-0 { top: 10px; left: 20px; }
.radial-pos-1 { top: 10px; right: 20px; }
.radial-pos-2 { bottom: 10px; right: 20px; }
.radial-pos-3 { bottom: 10px; left: 20px; }

/* 9. Organization Chart (Hierarchy) */
.smartart-hierarchy {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
}

.smartart-tree-root {
  display: flex;
  justify-content: center;
}

.smartart-node-pill {
  padding: 10px 16px;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.smartart-tree-connector-v {
  width: 2px;
  height: 20px;
  background-color: #94a3b8;
}

.smartart-tree-branches {
  display: flex;
  justify-content: center;
  gap: 16px;
  position: relative;
  padding-top: 10px;
  border-top: 2px solid #94a3b8;
}

.smartart-tree-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.smartart-tree-connector-branch {
  width: 2px;
  height: 10px;
  background-color: #94a3b8;
  margin-top: -10px;
}

.smartart-sub-branches {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  position: relative;
  width: 100%;
}

.smartart-sub-branch-node {
  padding: 6px 12px;
  border-radius: 6px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  opacity: 0.95;
  position: relative;
}

.smartart-sub-branch-node::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  width: 2px;
  height: 8px;
  background-color: #94a3b8;
}

/* 10. Horizontal Hierarchy */
.smartart-h-hierarchy {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 540px;
  margin: 0 auto;
}

.smartart-h-root {
  padding: 18px 16px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 700;
  min-width: 120px;
  text-align: center;
}

.smartart-h-arrow {
  color: #94a3b8;
  font-size: 1.2rem;
}

.smartart-h-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.smartart-h-sub {
  padding: 10px 14px;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
}

.smartart-h-sub.is-sub-level {
  margin-left: 20px;
  font-size: 0.78rem;
  padding: 6px 12px;
  opacity: 0.92;
  position: relative;
}

.smartart-h-sub.is-sub-level::before {
  content: '↳';
  position: absolute;
  left: -15px;
  color: #94a3b8;
  font-size: 0.9rem;
}

.smartart-h-sub.is-sub-sub-level {
  margin-left: 40px;
  font-size: 0.74rem;
  padding: 5px 10px;
  opacity: 0.88;
  position: relative;
}

.smartart-h-sub.is-sub-sub-level::before {
  content: '↳';
  position: absolute;
  left: -15px;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* 11. Venn Diagram */
.smartart-venn {
  position: relative;
  width: 320px;
  height: 190px;
  margin: 0 auto;
}

.smartart-venn-circle {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 12px;
  text-align: center;
  opacity: 0.85;
}

.circle-1 { left: 10px; top: 15px; }
.circle-2 { right: 10px; top: 15px; }

.smartart-venn-overlap {
  position: absolute;
  top: 60px;
  left: calc(50% - 50px);
  width: 100px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* 12. Funnel Diagram */
.smartart-funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 360px;
  margin: 0 auto;
}

.smartart-funnel-level {
  color: #ffffff;
  text-align: center;
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
}

.level-1 { width: 100%; }
.level-2 { width: 75%; }
.level-3 { width: 50%; }

/* 13. Grid Matrix (2x2) */
.smartart-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.smartart-matrix-cell {
  border-radius: 6px;
  padding: 14px;
  color: #ffffff;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.smartart-q-tag {
  font-size: 0.8rem;
  font-weight: 800;
  opacity: 0.7;
}

/* 14. Pyramid */
.smartart-pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 380px;
  margin: 0 auto;
}

.smartart-pyramid-tier {
  color: #ffffff;
  text-align: center;
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  clip-path: polygon(8% 0%, 92% 0%, 100% 100%, 0% 100%);
}

.smartart-pyramid-tier.tier-1 {
  width: 45%;
  clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
}
.smartart-pyramid-tier.tier-2 { width: 75%; }
.smartart-pyramid-tier.tier-3 { width: 100%; }

/* Inverted Pyramid */
.smartart-inverted-pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 380px;
  margin: 0 auto;
}

.smartart-inv-tier {
  color: #ffffff;
  text-align: center;
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  clip-path: polygon(0% 0%, 100% 0%, 92% 100%, 8% 100%);
}

.smartart-inv-tier.tier-1 { width: 100%; }
.smartart-inv-tier.tier-2 { width: 75%; }
.smartart-inv-tier.tier-3 {
  width: 45%;
  clip-path: polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%);
}

/* ==========================================================================
   Color Schemes & Palettes
   ========================================================================== */
/* Blue */
.smartart-color-blue .smartart-block-item,
.smartart-color-blue .smartart-vbox-item,
.smartart-color-blue .smartart-chevron-item,
.smartart-color-blue .smartart-process-box,
.smartart-color-blue .smartart-stepup-bar,
.smartart-color-blue .smartart-carrow-step,
.smartart-color-blue .smartart-cycle-node,
.smartart-color-blue .smartart-radial-center,
.smartart-color-blue .smartart-radial-satellite,
.smartart-color-blue .smartart-node-pill,
.smartart-color-blue .smartart-sub-branch-node,
.smartart-color-blue .smartart-h-root,
.smartart-color-blue .smartart-h-sub,
.smartart-color-blue .smartart-venn-circle,
.smartart-color-blue .smartart-funnel-level,
.smartart-color-blue .smartart-matrix-cell,
.smartart-color-blue .smartart-pyramid-tier,
.smartart-color-blue .smartart-inv-tier {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Teal */
.smartart-color-teal .smartart-block-item,
.smartart-color-teal .smartart-vbox-item,
.smartart-color-teal .smartart-chevron-item,
.smartart-color-teal .smartart-process-box,
.smartart-color-teal .smartart-stepup-bar,
.smartart-color-teal .smartart-carrow-step,
.smartart-color-teal .smartart-cycle-node,
.smartart-color-teal .smartart-radial-center,
.smartart-color-teal .smartart-radial-satellite,
.smartart-color-teal .smartart-node-pill,
.smartart-color-teal .smartart-sub-branch-node,
.smartart-color-teal .smartart-h-root,
.smartart-color-teal .smartart-h-sub,
.smartart-color-teal .smartart-venn-circle,
.smartart-color-teal .smartart-funnel-level,
.smartart-color-teal .smartart-matrix-cell,
.smartart-color-teal .smartart-pyramid-tier,
.smartart-color-teal .smartart-inv-tier {
  background: linear-gradient(135deg, #0d9488, #0f766e);
}

/* Emerald */
.smartart-color-emerald .smartart-block-item,
.smartart-color-emerald .smartart-vbox-item,
.smartart-color-emerald .smartart-chevron-item,
.smartart-color-emerald .smartart-process-box,
.smartart-color-emerald .smartart-stepup-bar,
.smartart-color-emerald .smartart-carrow-step,
.smartart-color-emerald .smartart-cycle-node,
.smartart-color-emerald .smartart-radial-center,
.smartart-color-emerald .smartart-radial-satellite,
.smartart-color-emerald .smartart-node-pill,
.smartart-color-emerald .smartart-sub-branch-node,
.smartart-color-emerald .smartart-h-root,
.smartart-color-emerald .smartart-h-sub,
.smartart-color-emerald .smartart-venn-circle,
.smartart-color-emerald .smartart-funnel-level,
.smartart-color-emerald .smartart-matrix-cell,
.smartart-color-emerald .smartart-pyramid-tier,
.smartart-color-emerald .smartart-inv-tier {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* Orange */
.smartart-color-orange .smartart-block-item,
.smartart-color-orange .smartart-vbox-item,
.smartart-color-orange .smartart-chevron-item,
.smartart-color-orange .smartart-process-box,
.smartart-color-orange .smartart-stepup-bar,
.smartart-color-orange .smartart-carrow-step,
.smartart-color-orange .smartart-cycle-node,
.smartart-color-orange .smartart-radial-center,
.smartart-color-orange .smartart-radial-satellite,
.smartart-color-orange .smartart-node-pill,
.smartart-color-orange .smartart-sub-branch-node,
.smartart-color-orange .smartart-h-root,
.smartart-color-orange .smartart-h-sub,
.smartart-color-orange .smartart-venn-circle,
.smartart-color-orange .smartart-funnel-level,
.smartart-color-orange .smartart-matrix-cell,
.smartart-color-orange .smartart-pyramid-tier,
.smartart-color-orange .smartart-inv-tier {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

/* Violet */
.smartart-color-violet .smartart-block-item,
.smartart-color-violet .smartart-vbox-item,
.smartart-color-violet .smartart-chevron-item,
.smartart-color-violet .smartart-process-box,
.smartart-color-violet .smartart-stepup-bar,
.smartart-color-violet .smartart-carrow-step,
.smartart-color-violet .smartart-cycle-node,
.smartart-color-violet .smartart-radial-center,
.smartart-color-violet .smartart-radial-satellite,
.smartart-color-violet .smartart-node-pill,
.smartart-color-violet .smartart-sub-branch-node,
.smartart-color-violet .smartart-h-root,
.smartart-color-violet .smartart-h-sub,
.smartart-color-violet .smartart-venn-circle,
.smartart-color-violet .smartart-funnel-level,
.smartart-color-violet .smartart-matrix-cell,
.smartart-color-violet .smartart-pyramid-tier,
.smartart-color-violet .smartart-inv-tier {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Indigo */
.smartart-color-indigo .smartart-block-item,
.smartart-color-indigo .smartart-vbox-item,
.smartart-color-indigo .smartart-chevron-item,
.smartart-color-indigo .smartart-process-box,
.smartart-color-indigo .smartart-stepup-bar,
.smartart-color-indigo .smartart-carrow-step,
.smartart-color-indigo .smartart-cycle-node,
.smartart-color-indigo .smartart-radial-center,
.smartart-color-indigo .smartart-radial-satellite,
.smartart-color-indigo .smartart-node-pill,
.smartart-color-indigo .smartart-sub-branch-node,
.smartart-color-indigo .smartart-h-root,
.smartart-color-indigo .smartart-h-sub,
.smartart-color-indigo .smartart-venn-circle,
.smartart-color-indigo .smartart-funnel-level,
.smartart-color-indigo .smartart-matrix-cell,
.smartart-color-indigo .smartart-pyramid-tier,
.smartart-color-indigo .smartart-inv-tier {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

/* Slate */
.smartart-color-slate .smartart-block-item,
.smartart-color-slate .smartart-vbox-item,
.smartart-color-slate .smartart-chevron-item,
.smartart-color-slate .smartart-process-box,
.smartart-color-slate .smartart-stepup-bar,
.smartart-color-slate .smartart-carrow-step,
.smartart-color-slate .smartart-cycle-node,
.smartart-color-slate .smartart-radial-center,
.smartart-color-slate .smartart-radial-satellite,
.smartart-color-slate .smartart-node-pill,
.smartart-color-slate .smartart-sub-branch-node,
.smartart-color-slate .smartart-h-root,
.smartart-color-slate .smartart-h-sub,
.smartart-color-slate .smartart-venn-circle,
.smartart-color-slate .smartart-funnel-level,
.smartart-color-slate .smartart-matrix-cell,
.smartart-color-slate .smartart-pyramid-tier,
.smartart-color-slate .smartart-inv-tier {
  background: linear-gradient(135deg, #64748b, #475569);
}

/* Multicolor Accent */
.smartart-color-multicolor .smartart-block-item:nth-child(1),
.smartart-color-multicolor .smartart-process-step:nth-child(1) .smartart-process-box,
.smartart-color-multicolor .smartart-cycle-node:nth-child(1),
.smartart-color-multicolor .smartart-matrix-cell.q1,
.smartart-color-multicolor .circle-1 {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.smartart-color-multicolor .smartart-block-item:nth-child(2),
.smartart-color-multicolor .smartart-process-step:nth-child(2) .smartart-process-box,
.smartart-color-multicolor .smartart-cycle-node:nth-child(2),
.smartart-color-multicolor .smartart-matrix-cell.q2,
.smartart-color-multicolor .circle-2 {
  background: linear-gradient(135deg, #10b981, #059669);
}

.smartart-color-multicolor .smartart-block-item:nth-child(3),
.smartart-color-multicolor .smartart-process-step:nth-child(3) .smartart-process-box,
.smartart-color-multicolor .smartart-cycle-node:nth-child(3),
.smartart-color-multicolor .smartart-matrix-cell.q3,
.smartart-color-multicolor .smartart-venn-overlap {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.smartart-color-multicolor .smartart-block-item:nth-child(4),
.smartart-color-multicolor .smartart-process-step:nth-child(4) .smartart-process-box,
.smartart-color-multicolor .smartart-cycle-node:nth-child(4),
.smartart-color-multicolor .smartart-matrix-cell.q4 {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Dark theme adaptations */
[data-theme="dark"] .smartart-dialog-card {
  background-color: #1e293b;
}

[data-theme="dark"] .smartart-categories-panel {
  background-color: #0f172a;
}

[data-theme="dark"] .smartart-grid-panel {
  background-color: #1e293b;
}

[data-theme="dark"] .smartart-preview-panel {
  background-color: #0f172a;
}

[data-theme="dark"] .smartart-preset-card,
[data-theme="dark"] .smartart-color-row,
[data-theme="dark"] .smartart-text-editor-container,
[data-theme="dark"] .smartart-live-preview-box {
  background-color: #1e293b;
  border-color: #334155;
}
