/* e2d-model-viewer.css — shared 3D viewer modal styles */

.e2d-mv-modal {
  position: fixed;
  inset: 0;
  z-index: 100200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.e2d-mv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 15, 22, 0.58);
  backdrop-filter: blur(4px);
}

.e2d-mv-panel {
  position: relative;
  z-index: 1;
  background: #f5faf8;
  border-radius: 18px;
  border: 1px solid #d8e6df;
  box-shadow: 0 26px 80px rgba(14, 38, 33, 0.26);
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.e2d-mv-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #e0ece7;
  min-width: 0;
}

.e2d-mv-header-text {
  min-width: 0;
}

.e2d-mv-title {
  font-size: 18px;
  font-weight: 800;
  color: #1a2e2a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.e2d-mv-subtitle {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.e2d-mv-close {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #d8ebe4;
  color: #1a2e2a;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  transition: background 0.14s ease;
}

.e2d-mv-close:hover {
  background: #c4dfd6;
}

.e2d-mv-body {
  position: relative;
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.e2d-mv-canvas {
  display: block;
  width: 100%;
  height: min(68vh, 640px);
  border-radius: 14px;
  border: 1px solid #d7e3df;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 35%),
    linear-gradient(180deg, #f8fcfb 0%, #dfece7 100%);
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
}

.e2d-mv-canvas:active {
  cursor: grabbing;
}

.e2d-mv-status {
  min-height: 22px;
  color: #64748b;
  font-size: 13px;
}

.e2d-mv-viewcube {
  position: absolute;
  bottom: 56px;
  right: 38px;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 132px;
  padding: 9px 8px 8px;
  border-radius: 16px;
  background: rgba(245, 250, 248, 0.9);
  border: 1px solid rgba(216, 230, 223, 0.92);
  box-shadow: 0 14px 30px rgba(23, 53, 47, 0.12);
  backdrop-filter: blur(10px);
}

.e2d-mv-viewcube__canvas {
  display: block;
  width: 114px;
  height: 114px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.32) 42%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(236, 244, 240, 0.55));
  cursor: pointer;
}

.e2d-mv-viewcube__iso {
  min-width: 48px;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid #c7d6d1;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #edf5f2 100%);
  color: #3c5551;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.e2d-mv-viewcube__iso:hover {
  transform: translateY(-1px);
  border-color: #95b9ad;
  box-shadow: 0 8px 16px rgba(23, 53, 47, 0.12);
}

.e2d-mv-viewcube__iso--active {
  border-color: #6dafa0;
  background: linear-gradient(180deg, #d9f0e7 0%, #c6e7db 100%);
  color: #16483e;
}

/* ── HTML / Image mode overrides ─────────────────────────────────────────── */

.e2d-mv-body--html {
  overflow-y: auto;
  display: block;
  padding: 20px 24px;
  min-height: 0;
  font-size: 16px;
}

.e2d-mv-body--image {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 16px;
  min-height: 0;
}

.e2d-mv-img {
  display: block;
  max-width: 100%;
  max-height: min(68vh, 640px);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 24px rgba(14, 38, 33, 0.12);
}

@media (max-width: 600px) {
  .e2d-mv-img {
    max-height: min(60vh, 400px);
  }
}

@media (max-width: 600px) {
  .e2d-mv-body {
    padding: 10px;
  }

  .e2d-mv-canvas {
    height: min(60vh, 400px);
  }

  .e2d-mv-viewcube {
    bottom: 48px;
    right: 20px;
    width: 100px;
    padding: 7px 6px 6px;
  }

  .e2d-mv-viewcube__canvas {
    width: 86px;
    height: 86px;
  }
}

/* ── Shared analysis-summary styles (html mode inside E2DModelViewer) ── */
.e2d-3dpoq-entry-history-summary-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0 0 14px;
}
.e2d-3dpoq-entry-history-summary-facts div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(244, 251, 249, 0.95);
  border: 1px solid rgba(34, 97, 117, 0.08);
}
.e2d-3dpoq-entry-history-summary-facts dt {
  color: #5a7177;
  font-size: 12px;
}
.e2d-3dpoq-entry-history-summary-facts dd {
  margin: 0;
  color: #17352f;
  font-weight: 700;
}
.e2d-3dpoq-entry-history-summary-details,
.e2d-3dpoq-entry-history-summary-warnings {
  display: grid;
  gap: 8px;
}
.e2d-3dpoq-entry-history-summary-details {
  color: #4e676d;
  line-height: 1.55;
}
.e2d-3dpoq-entry-history-summary-empty {
  border-radius: 12px;
  padding: 12px 14px;
  background: #f3faf8;
  color: #5a7177;
  line-height: 1.55;
}
.e2d-3dpoq-entry-history-summary-preview {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.e2d-3dpoq-entry-history-summary-preview-label {
  color: #17352f;
  font-size: 13px;
  font-weight: 700;
}
.e2d-3dpoq-entry-history-summary-preview img {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 12px;
  border: 1px solid rgba(34, 97, 117, 0.1);
  background: #fff;
}
.e2d-3dpoq-summary-review-notice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.e2d-3dpoq-summary-review-notice strong {
  font-size: 13px;
  font-weight: 700;
}
.e2d-3dpoq-summary-review-notice__note {
  color: inherit;
  opacity: 0.88;
  white-space: pre-wrap;
  word-break: break-word;
}
.e2d-3dpoq-summary-review-notice--rejected {
  background: #fff3e0;
  border: 1px solid #e0902a;
  color: #7c3d00;
}
.e2d-3dpoq-summary-review-notice--approved {
  background: #f5f5f5;
  border: 1px solid #c8c8c8;
  color: #444;
}
.e2d-mv-body--html .e2d-3dpoq-warning-group {
  border-radius: 12px;
  background: #fff5db;
  color: #7a5500;
  padding: 12px 14px;
}
.e2d-mv-body--html .e2d-3dpoq-warning-group strong {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}
.e2d-mv-body--html .e2d-3dpoq-warning-group ul {
  margin: 6px 0 0 18px;
  padding: 0;
}
.e2d-mv-body--html .e2d-3dpoq-warning-group + .e2d-3dpoq-warning-group {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
