/* =============================================================================
   ELBE3D Quote – Frontend Styles v2 (Full-Width Responsive)
   ============================================================================= */

/* --- Custom Properties --- */
:root {
  --e3dq-bg: rgba(246, 248, 252, 0.92);
  --e3dq-card: rgba(255, 255, 255, 0.88);
  --e3dq-border: rgba(148, 163, 184, 0.32);
  --e3dq-shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --e3dq-radius: 6px;
  --e3dq-text: #0f172a;
  --e3dq-muted: #64748b;
  --e3dq-primary: #21b36b;
  --e3dq-primary-dark: #1a9a5b;
  --e3dq-danger: #b91c1c;
  --e3dq-success: #166534;
}

/* --- Fill WP Content Container (no viewport breakout) --- */
[data-e3dq-root] {
  width: 100%;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}

/* --- Widget Base --- */
#elbe3d-quote,
.elbe3d-widget {
  font-family: inherit;
  color: var(--e3dq-text);
  max-width: 1600px;
  margin: 0 auto;
}

/* --- Grid: Desktop = sidebar 30% + main 70% --- */
#elbe3d-quote .e3d-grid,
.elbe3d-widget .e3d-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1025px) {
  #elbe3d-quote .e3d-grid,
  .elbe3d-widget .e3d-grid {
    grid-template-columns: minmax(0, 2.4fr) minmax(280px, 1fr);
    gap: 32px;
    align-items: start;
  }
  /* Swap columns: 3D preview (main) left, options (sidebar) right */
  .e3d-main { order: -1; }
  .e3d-sidebar { order: 1; }
}

/* --- Sidebar & Main Columns --- */
.e3d-sidebar,
.e3d-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Mobile: sidebar first (upload + options), then main (preview) — natural order */
/* Desktop: sidebar left, main right — grid handles it */

/* --- Card (Glass) --- */
.e3d-card,
.e3d-preview-card {
  position: relative;
  background: var(--e3dq-card);
  border-radius: var(--e3dq-radius);
  border: 1px solid var(--e3dq-border);
  padding: clamp(16px, 2.5vw, 28px);
  box-shadow: var(--e3dq-shadow);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.e3d-preview-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.e3d-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.e3d-card-desc,
.e3d-preview-hint,
.e3d-price-info,
.e3d-hint,
.e3d-status,
.e3d-preview-card p,
.e3d-card p {
  color: var(--e3dq-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* --- 3D Preview Area --- */
.e3d-preview {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--e3dq-border);
  background: transparent;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.elbe3dq-viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
}

@media (min-width: 1025px) {
  .elbe3dq-viewer {
    aspect-ratio: 1 / 1;
    max-height: clamp(400px, 60vh, 760px);
  }
}

.elbe3dq-viewer canvas,
canvas.elbe3dq-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Preview card inner glow */
.e3d-preview-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.e3d-preview-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

/* Viewer wrap */
.elbe3d-viewer-wrap,
.elbe3d-view {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.elbe3d-viewer-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- Floating Toolbar (preview buttons) --- */
[data-e3dq-toolbar],
.elbe3dq-toolbar-floating {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 3;
}

.e3dq-btn {
  font: 600 13px/1.2 system-ui, -apple-system, sans-serif;
  padding: 6px 10px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.96);
  color: #1d2430;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(4px);
}
.e3dq-btn:hover { background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); }
.e3dq-btn:focus-visible { outline: 2px solid var(--e3dq-primary); outline-offset: 2px; }

/* --- Analyzing Overlay --- */
.e3dq-widget.e3dq-is-analyzing .e3dq-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 2;
}
.e3dq-widget.e3dq-is-analyzing .e3dq-preview::after {
  content: '';
  position: absolute;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--e3dq-primary);
  animation: e3dq-spin 1s linear infinite;
  z-index: 3;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
@keyframes e3dq-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* --- Upload Section --- */
.e3d-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}

.e3d-file-name {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  color: var(--e3dq-muted);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Progress Bar */
.e3dq-progress {
  height: 6px;
  border-radius: 3px;
  background: rgba(226, 232, 240, 0.6);
  margin-top: 12px;
  overflow: hidden;
}
.e3dq-progress #elbe3d-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--e3dq-primary), var(--e3dq-primary-dark));
  transition: width 0.2s ease;
}

/* --- Sections (Material, Quality, etc.) --- */
.e3d-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.e3d-section:first-of-type { margin-top: 0; }

.e3d-section h4 {
  margin: 0;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--e3dq-muted);
  font-weight: 600;
}

/* --- Chip Buttons --- */
.e3d-chip-group,
.e3dq-quality-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.elbe3d-chip {
  appearance: none;
  border-radius: 3px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.92);
  color: var(--e3dq-text);
  font: inherit;
  font-weight: 500;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  min-height: 38px;
}
.elbe3d-chip:hover,
.elbe3d-chip:focus-visible {
  border-color: rgba(33, 179, 107, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(33, 179, 107, 0.15);
  outline: none;
}
.elbe3d-chip:focus-visible {
  box-shadow: 0 0 0 3px rgba(33, 179, 107, 0.25);
}
.elbe3d-chip.is-selected {
  background: linear-gradient(135deg, rgba(33, 179, 107, 0.15), rgba(33, 179, 107, 0.06));
  border-color: rgba(33, 179, 107, 0.7);
  color: var(--e3dq-primary-dark);
  font-weight: 600;
}
.elbe3d-chip.is-disabled,
.elbe3d-chip[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* Swatches & Thumbnails */
.elbe3d-color-swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}
.elbe3d-plate-thumb {
  width: 24px; height: 24px;
  border-radius: 3px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  object-fit: cover;
}
.elbe3d-placeholder { filter: grayscale(1); opacity: 0.65; }
.elbe3d-chip-note { font-size: 0.75rem; color: var(--e3dq-muted); }

/* --- Quantity --- */
.e3d-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.e3d-qty input[type="number"] {
  width: 72px;
  text-align: center;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 8px;
  font: inherit;
  background: rgba(255, 255, 255, 0.95);
  -moz-appearance: textfield;
}
.e3d-qty input[type="number"]:focus-visible {
  outline: none;
  border-color: rgba(33, 179, 107, 0.6);
  box-shadow: 0 0 0 3px rgba(33, 179, 107, 0.2);
}
.e3d-qty input::-webkit-inner-spin-button,
.e3d-qty input::-webkit-outer-spin-button {
  -webkit-appearance: none; margin: 0;
}

/* --- Extras (Toggles) --- */
.e3d-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}
.e3d-toggle input[type="checkbox"] { width: 18px; height: 18px; }

.e3d-extra-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}
.e3d-extra-label { display: inline-flex; align-items: center; gap: 0.25rem; }
.e3dq-extra-price { font-size: 0.75rem; color: var(--e3dq-muted); }

.e3d-extra-tip {
  background: transparent;
  border: 0;
  border-radius: 3px;
  width: 1.6rem; height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--e3dq-primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: background 0.2s;
}
.e3d-extra-tip:hover { background: rgba(33, 179, 107, 0.1); }
.e3d-extra-tip:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.e3d-extra-tooltip {
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  z-index: 20;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.94);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.45;
  min-width: 12rem;
  max-width: min(22rem, 80vw);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
}
.e3d-extra-tooltip a {
  color: inherit; text-decoration: underline; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.5rem;
}
.e3d-extra-tooltip a::after { content: '\2197'; font-size: 0.75em; }
.e3d-extra-tooltip p { margin: 0; }

/* Hide secondary extra details */
.e3dq-extras-hints,
.e3dq-extras-secondary,
.e3dq-extra-hint,
.e3dq-extra-note { display: none !important; }

.e3dq-extra-price-lines {
  list-style: none; margin: 0.5rem 0 0; padding: 0;
  font-size: 0.85rem; color: var(--e3dq-muted);
  display: grid; gap: 0.3rem;
}
.e3dq-extra-price-lines[hidden] { display: none !important; }
.e3dq-extra-price-line {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.e3dq-extra-price-line.is-active { color: var(--e3dq-primary-dark); font-weight: 600; }

/* --- Price Box --- */
.e3d-price-box {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  font-size: 1.2rem;
  font-weight: 600;
}
.e3d-price-box strong,
.e3dq-price-box strong { font-size: 1.5rem; }

.e3d-price-box.is-loading {
  position: relative;
  color: rgba(148, 163, 184, 0.6);
}
.e3d-price-box.is-loading::after {
  content: '';
  display: inline-block;
  width: 20px; height: 20px;
  margin-left: 12px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.3);
  border-top-color: var(--e3dq-primary);
  animation: e3dq-spin 0.8s linear infinite;
  vertical-align: middle;
}
.e3dq-widget.e3dq-is-pricing .e3d-price-box { opacity: 0.7; }

/* --- Status Box --- */
.e3d-status {
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 4px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  min-height: 1.5rem;
}
.e3d-status[data-status="success"] {
  border-color: rgba(22, 101, 52, 0.4);
  background: rgba(187, 247, 208, 0.3);
  color: var(--e3dq-success);
}
.e3d-status[data-status="error"] {
  border-color: rgba(185, 28, 28, 0.4);
  background: rgba(254, 226, 226, 0.5);
  color: var(--e3dq-danger);
}
.e3d-status[data-status="info"] {
  border-color: rgba(33, 179, 107, 0.3);
  background: rgba(236, 253, 245, 0.45);
  color: var(--e3dq-primary-dark);
}

.e3dq-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.92rem;
  color: var(--e3dq-muted);
}
.e3dq-status-line span { display: inline-flex; gap: 0.3rem; align-items: baseline; }
.e3dq-status-line strong { color: var(--e3dq-text); }

.e3dq-status-cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; margin-left: 0.75rem; padding: 0.35rem 0.9rem;
  border-radius: 3px; font-weight: 600;
  background: rgba(255, 255, 255, 0.18); color: inherit; text-decoration: none;
}
.e3dq-status-cta:hover { background: rgba(255, 255, 255, 0.28); text-decoration: none; }

/* --- CTA Button --- */
.e3dq-cta {
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--e3dq-primary), var(--e3dq-primary-dark));
  color: #fff;
  border: none;
  min-width: 200px;
  padding: 14px 28px;
}
.e3dq-cta:hover,
.e3dq-cta:focus-visible {
  color: #fff;
  box-shadow: 0 14px 32px rgba(33, 179, 107, 0.3);
  transform: translateY(-1px);
}

/* Busy state */
.e3dq-busy-lock[disabled] { cursor: not-allowed; opacity: 0.6; }

/* --- Hint / Note --- */
.e3d-hint a { color: var(--e3dq-primary); text-decoration: none; }
.e3d-hint a:hover { text-decoration: underline; color: var(--e3dq-primary-dark); }

.e3d-note {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 14px;
  color: var(--e3dq-muted);
}

/* --- Desktop Card Ordering --- */
@media (min-width: 1025px) {
  .elbe3d-card--preview { order: -3; }
  .elbe3d-card--stats,
  .elbe3d-metrics-card { order: -2; }
  .elbe3d-card--status,
  .elbe3d-status-card { order: -1; }
  .elbe3d-card--price,
  .elbe3d-price-card { order: 0; }
  .elbe3d-card--cta,
  .elbe3d-cta-card { order: 1; }

  .e3dq-quality-group { flex-wrap: nowrap; }
}

/* --- Legacy Element Cleanup --- */
.elbe3d-toolbar-bottom,
.elbe3d-toolbar-vertical,
.elbe3d-viewer-hint,
.e3dq-toolbar-bottom,
.elbe3dq-footbar,
.e3dq-toolbar.foot,
.elbe3d-legacy-footbar,
.elbe3d-legacy-hint,
.elbe3d-toolbar--footer,
.elbe3dq-hint { display: none !important; }

/* === RESPONSIVE BREAKPOINTS === */

/* --- Mobile: < 640px --- */
@media (max-width: 639px) {
  [data-e3dq-root] {
    padding: 1rem;
  }

  .e3d-upload {
    flex-direction: column;
    align-items: stretch;
  }
  .e3d-file-name { text-align: center; }

  .e3d-price-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .elbe3dq-viewer {
    aspect-ratio: 1 / 1;
    max-height: 360px;
  }

  .e3d-card, .e3d-preview-card {
    padding: 16px;
    border-radius: 4px;
  }

  .elbe3d-chip {
    padding: 6px 12px;
    font-size: 0.88rem;
  }

  .e3dq-status-line {
    flex-direction: column;
    gap: 0.3rem;
  }
}

/* --- Tablet: 640px – 1024px --- */
@media (min-width: 640px) and (max-width: 1024px) {
  [data-e3dq-root] {
    padding: 1.5rem;
  }

  .elbe3dq-viewer {
    aspect-ratio: 16 / 10;
    max-height: 480px;
  }

  /* Two-column mini grid for some sections */
  .e3d-chip-group {
    gap: 8px;
  }
}

/* --- Wide Desktop: > 1400px --- */
@media (min-width: 1400px) {
  #elbe3d-quote .e3d-grid,
  .elbe3d-widget .e3d-grid {
    grid-template-columns: minmax(0, 2.8fr) minmax(320px, 1.2fr);
    gap: 40px;
  }

  .elbe3dq-viewer {
    max-height: 800px;
  }
}

/* --- Color Chips (view tools legacy compat) --- */
.e3dq-view-tools { display: flex; gap: 0.5rem; align-items: center; margin: 0.5rem 0 0; flex-wrap: wrap; }
.e3dq-color-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.55rem; border: 1px solid rgba(0,0,0,0.1); border-radius: 3px; cursor: pointer; }
.e3dq-color-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.25); }
.e3dq-color-chip[aria-pressed="true"] { outline: 2px solid rgba(0,0,0,0.15); }

/* --- Three.js Wrap Clipping --- */
.three-wrap,
.view-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.three-wrap canvas,
.view-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===================================================================
   Slicer-Style Plate Management (Bambu Studio inspired)
   =================================================================== */

/* --- Toolbar: vertical icon strip, right side of canvas --- */
.e3dq-slicer-toolbar {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.e3dq-slicer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(38, 42, 48, 0.92);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(6px);
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.e3dq-slicer-btn:hover {
  background: rgba(50, 56, 64, 0.96);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.e3dq-slicer-btn:active { transform: scale(0.95); }
.e3dq-slicer-btn:focus-visible { outline: 2px solid var(--e3dq-primary); outline-offset: 2px; }
.e3dq-slicer-btn svg { width: 18px; height: 18px; pointer-events: none; }

.e3dq-slicer-btn--remove svg { color: #e53935; }
.e3dq-slicer-btn--remove:hover svg { color: #ff5252; }
.e3dq-slicer-btn--lay svg { color: #43a047; }
.e3dq-slicer-btn--lay:hover svg { color: #66bb6a; }
.e3dq-slicer-btn--arrange svg { color: #1e88e5; }
.e3dq-slicer-btn--arrange:hover svg { color: #42a5f5; }
.e3dq-slicer-btn--add svg { color: var(--e3dq-primary); }
.e3dq-slicer-btn--add:hover svg { color: #66bb6a; }

.e3dq-slicer-btn[hidden] { display: none !important; }

/* Tooltip on hover */
.e3dq-slicer-btn[aria-label]::after {
  content: attr(aria-label);
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font: 500 11px/1.2 system-ui, sans-serif;
  color: #fff;
  background: rgba(20, 22, 26, 0.92);
  padding: 4px 8px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
.e3dq-slicer-btn:hover[aria-label]::after { opacity: 1; }

/* --- Plate Tabs: bottom of canvas --- */
.e3dq-plate-tabs {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 5;
  padding: 3px;
  background: rgba(20, 22, 26, 0.75);
  border-radius: 4px;
  backdrop-filter: blur(6px);
}

.e3dq-plate-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 3px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font: 600 11px/1.2 system-ui, sans-serif;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  min-width: 48px;
  justify-content: center;
}

.e3dq-plate-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.e3dq-plate-tab.is-active {
  background: rgba(42, 45, 49, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.e3dq-plate-tab-num {
  font: 700 10px/1 'SF Mono', 'Consolas', monospace;
  color: var(--e3dq-primary);
}

.e3dq-plate-tab-label {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.e3dq-plate-tab-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 3px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
}
.e3dq-plate-tab-add:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--e3dq-primary);
  border-color: var(--e3dq-primary);
}
.e3dq-plate-tab-add svg { width: 14px; height: 14px; }

/* --- Oversize warning indicator --- */
.e3dq-oversize-indicator {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 3px;
  background: rgba(185, 28, 28, 0.9);
  color: #fff;
  font: 600 11px/1.2 system-ui, sans-serif;
  z-index: 5;
  pointer-events: none;
  animation: e3dq-oversize-pulse 2s ease-in-out infinite;
}
.e3dq-oversize-indicator[hidden] { display: none !important; }
.e3dq-oversize-indicator svg { width: 14px; height: 14px; flex-shrink: 0; }

@keyframes e3dq-oversize-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Hide old toolbar when slicer toolbar is active */
.e3dq-has-slicer-toolbar > .e3dq-actions { display: none !important; }
