/**
 * Design Online — 3D view panel, share modal (loaded directly, not via Tailwind build).
 */

/* Off-screen clone host — never moves the live flat preview panel */
.design-capture-host {
  position: fixed;
  left: -10000px;
  top: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.design-view-tabs-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 1rem;
}

.design-view-tabs-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 420px;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 2px solid #e9ecef;
  border-radius: 14px;
  background: #fff;
}

.design-view-tab {
  appearance: none;
  border: none;
  border-radius: 10px;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  background: transparent;
  color: #6c757d;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.design-view-tab.is-active,
.design-view-tab[aria-selected="true"] {
  background: #ff6b35;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.28);
}

.design-view-tab:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.design-3d-panel {
  border-radius: 20px;
  border: 4px solid #ff6b35;
  background: #fff;
  padding: 0.75rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.design-3d-preview-host {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  min-height: 280px;
  overflow: hidden;
  border-radius: 14px;
  background: #f2f4f7;
}

.design-3d-canvas-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.design-3d-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}

.design-3d-hint {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #6c757d;
}

.design-3d-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-bottom: 0.25rem;
}

.design-3d-reset-btn,
.design-3d-share-btn {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.design-3d-reset-btn {
  min-width: 8.5rem;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  background: #fff;
  padding: 0.65rem 1.25rem;
  font-size: 14px;
  font-weight: 600;
  color: #1d2129;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.design-3d-reset-btn:hover {
  border-color: #ff6b35;
  color: #ff6b35;
}

.design-3d-share-btn {
  min-width: 10rem;
  border-radius: 10px;
  border: 2px solid #ff6b35;
  background: #ff6b35;
  padding: 0.65rem 1.5rem;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.design-3d-share-btn:hover {
  background: #e85d2c;
  border-color: #e85d2c;
}

/* Guided compare — banner button + slim step strip */
.design-builder-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.design-builder-header-text {
  flex: 1 1 16rem;
  min-width: 0;
}

.design-builder-header-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  flex: 0 0 auto;
  width: 100%;
  max-width: 220px;
}

@media (min-width: 640px) {
  .design-builder-header-actions {
    align-items: flex-end;
    width: auto;
    margin-left: auto;
  }
}

@keyframes design-compare-blink {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.55);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 107, 53, 0);
  }
}

.design-compare-header-btn {
  appearance: none;
  cursor: pointer;
  width: 100%;
  border: 2px solid #ff6b35;
  border-radius: 10px;
  background: #ff6b35;
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.design-compare-header-btn.is-blink:not(:disabled) {
  animation: design-compare-blink 1.8s ease-in-out infinite;
}

.design-compare-header-btn:hover:not(:disabled) {
  background: #e85d2c;
  border-color: #e85d2c;
}

.design-compare-header-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  animation: none;
}

.design-compare-header-btn.is-active {
  background: #1d2129;
  border-color: #1d2129;
  animation: none;
}

/* Slim help bar — only visible during compare */
.design-compare-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-left: 4px solid #ff6b35;
  border-radius: 10px;
  background: #fff7f3;
}

.design-compare-help.hidden {
  display: none !important;
}

.design-compare-help-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: #ff6b35;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.design-compare-help-text {
  flex: 1 1 14rem;
  margin: 0;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1d2129;
}

.design-compare-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.design-compare-btn--ghost {
  border-color: transparent !important;
  background: transparent !important;
  color: #6c757d !important;
}

.design-compare-btn--ghost:hover:not(:disabled) {
  color: #1d2129 !important;
  border-color: transparent !important;
}

.design-compare-btn--outline {
  border-color: #ff6b35 !important;
  background: #fff !important;
  color: #ff6b35 !important;
}

.design-compare-btn--outline:hover:not(:disabled) {
  background: #fff7f3 !important;
}

.design-compare-intro-list {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
  font-size: 14px;
  line-height: 1.55;
  color: #1d2129;
}

.design-compare-intro-list li {
  margin-bottom: 0.45rem;
}

.design-compare-intro-list li:last-child {
  margin-bottom: 0;
}

.design-compare-intro-start {
  width: 100%;
  padding: 0.75rem 1rem !important;
  font-size: 14px !important;
}

.design-compare-dialog--intro {
  max-width: 480px;
}

.design-compare-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.design-compare-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  background: #f8f9fa;
  font-size: 11px;
  font-weight: 600;
  color: #6c757d;
}

.design-compare-slot.is-filled {
  border-color: #ff6b35;
  background: #fff7f3;
  color: #1d2129;
}

.design-compare-slot.is-active {
  box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.25);
}

.design-compare-slot-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #ff6b35;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.design-compare-slot-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9rem;
}

.design-compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.design-compare-btn {
  appearance: none;
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  background: #fff;
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #1d2129;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.design-compare-btn:hover:not(:disabled) {
  border-color: #ff6b35;
  color: #ff6b35;
}

.design-compare-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.design-compare-btn--primary {
  border-color: #ff6b35;
  background: #ff6b35;
  color: #fff;
}

.design-compare-btn--primary:hover:not(:disabled) {
  background: #e85d2c;
  border-color: #e85d2c;
  color: #fff;
}

/* Compare modal */
.design-compare-modal {
  position: fixed;
  inset: 0;
  z-index: 2147482900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.design-compare-modal.hidden {
  display: none !important;
}

.design-compare-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 33, 41, 0.45);
}

.design-compare-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  max-height: min(92vh, 900px);
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  background: #fff;
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
}

.design-compare-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #6c757d;
  cursor: pointer;
}

.design-compare-close:hover {
  color: #1d2129;
}

.design-compare-title {
  margin: 0 0 0.35rem;
  padding-right: 2rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1d2129;
}

.design-compare-lead {
  margin: 0 0 1rem;
  font-size: 14px;
  line-height: 1.5;
  color: #6c757d;
}

.design-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.design-compare-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 14px;
  background: #fafbfc;
}

.design-compare-card.is-active {
  border-color: #ff6b35;
  background: #fff7f3;
}

.design-compare-card-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d2129;
}

.design-compare-card-preview {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  background: #fff;
}

.design-compare-card-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.design-compare-card-meta {
  margin: 0;
  min-height: 2.5rem;
  font-size: 12px;
  line-height: 1.45;
  color: #6c757d;
}

.design-compare-use-btn {
  appearance: none;
  cursor: pointer;
  width: 100%;
  border: 2px solid #1d2129;
  border-radius: 10px;
  background: #1d2129;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.design-compare-use-btn:hover {
  background: #ff6b35;
  border-color: #ff6b35;
}

@media (max-width: 640px) {
  .design-builder-header-actions {
    max-width: none;
  }

  .design-compare-help {
    flex-direction: column;
    align-items: stretch;
  }

  .design-compare-help-actions {
    width: 100%;
  }

  .design-compare-help-actions .design-compare-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .design-compare-grid {
    grid-template-columns: 1fr;
  }
}

/* Share modal */
.design-3d-share-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.design-3d-share-modal.hidden {
  display: none !important;
}

.design-3d-share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 33, 41, 0.45);
}

.design-3d-share-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  background: #fff;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
}

.design-3d-share-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #6c757d;
  cursor: pointer;
}

.design-3d-share-close:hover {
  color: #1d2129;
}

.design-3d-share-title {
  margin: 0 0 0.5rem;
  padding-right: 2rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1d2129;
}

.design-3d-share-lead {
  margin: 0 0 1rem;
  font-size: 14px;
  line-height: 1.5;
  color: #6c757d;
}

.design-3d-share-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 14px;
  font-weight: 700;
  color: #1d2129;
}

.design-3d-share-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  padding: 0.65rem 0.85rem;
  font-size: 14px;
  outline: none;
}

.design-3d-share-input:focus {
  border-color: #ff6b35;
}

.design-3d-share-note {
  margin: 0.65rem 0 1rem;
  font-size: 12px;
  color: #6c757d;
}

.design-3d-share-error {
  margin: 0 0 0.75rem;
  font-size: 13px;
  font-weight: 600;
  color: #b32d2e;
}

.design-3d-share-error.hidden {
  display: none !important;
}

.design-3d-share-submit {
  width: 100%;
  border-radius: 10px;
  border: 2px solid #ff6b35;
  background: #ff6b35;
  padding: 0.75rem 1rem;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.design-3d-share-submit:hover {
  background: #e85d2c;
  border-color: #e85d2c;
}

.design-3d-share-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.design-3d-share-link-row {
  display: flex;
  gap: 0.5rem;
}

.design-3d-share-link-row .design-3d-share-input {
  flex: 1;
  min-width: 0;
}

.design-3d-share-copy {
  flex-shrink: 0;
  border-radius: 10px;
  border: 2px solid #ff6b35;
  background: #ff6b35;
  padding: 0.65rem 1rem;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}

.design-3d-share-copied {
  margin: 0.75rem 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #1d7a3c;
}

.design-3d-share-copied.hidden {
  display: none !important;
}

#design3dShareStepLink.hidden {
  display: none !important;
}

/* Public share link page (with site header/footer) */
.share-3d-page-wrap {
  background: #fff;
}

/* 5-col preview + 7-col industries (12-col grid, like design page) */
.share-3d-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .share-3d-layout {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 2rem;
  }

  .share-3d-preview-col {
    grid-column: span 5;
  }

  .share-3d-industries-col {
    grid-column: span 7;
  }
}

.share-3d-preview-center {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.share-3d-industries-head {
  margin-bottom: 1rem;
}

.share-3d-industries-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #1d2129;
  line-height: 1.2;
}

.share-3d-industries-lead {
  margin: 0.5rem 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #383838;
}

/* 2 category cards per row inside 7-column area */
.share-3d-industries-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .share-3d-industries-grid {
    gap: 1rem;
  }
}

.share-3d-page-wrap .design-3d-panel {
  padding: 0.5rem;
  border-width: 3px;
}

.share-3d-page-wrap .design-3d-preview-host {
  min-height: 0;
  max-width: 100%;
  aspect-ratio: 1;
}

.share-3d-page-wrap .design-3d-hint {
  font-size: 11px;
  margin-top: 0.5rem;
}

.share-3d-page-wrap .design-3d-actions {
  margin-top: 0.75rem;
  gap: 0.5rem;
}

.share-3d-page-wrap .design-3d-reset-btn,
.share-3d-page-wrap .design-3d-share-btn {
  min-width: 0;
  flex: 1 1 auto;
  padding: 0.55rem 0.85rem;
  font-size: 13px;
}

.share-3d-cta-row {
  margin-top: 1rem;
}

.share-3d-cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

.share-3d-cta-outline {
  border-color: #ff6b35 !important;
  color: #ff6b35 !important;
}

.share-3d-cta-outline:hover {
  background: #fff5f0 !important;
  border-color: #e85d2c !important;
  color: #e85d2c !important;
}

.share-3d-industry-card {
  color: inherit;
}
