/* =====================================================
   Holzwerkstatt Janz – 3D Schrank-Konfigurator Styles
   ===================================================== */

#hwj-konfigurator-wrap {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  min-height: 600px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  margin: 24px 0 48px;
}

@media (max-width: 860px) {
  #hwj-konfigurator-wrap {
    grid-template-columns: 1fr;
  }
}

/* ── Left panel ── */
#hwj-konfigurator-panel {
  background: #f8f9fa;
  padding: 28px 24px;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  max-height: 680px;
}

#hwj-konfigurator-panel h3 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: #0f5b4f;
  border-bottom: 2px solid #0f5b4f;
  padding-bottom: 10px;
}

.hwj-config-section {
  margin-bottom: 18px;
}

.hwj-config-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

.hwj-config-section input[type="range"] {
  width: 100%;
  accent-color: #0f5b4f;
  cursor: pointer;
}

.hwj-config-section select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s;
}

.hwj-config-section select:focus {
  outline: none;
  border-color: #0f5b4f;
}

.hwj-config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Color swatches */
.hwj-color-dots {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hwj-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.hwj-dot:hover {
  transform: scale(1.15);
}

.hwj-dot.active {
  box-shadow: 0 0 0 3px #0f5b4f, 0 0 0 5px #fff, 0 0 0 7px #0f5b4f;
}

/* Buttons */
.hwj-btn-primary {
  background: #0f5b4f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: background .2s;
  margin-top: 8px;
}

.hwj-btn-primary:hover {
  background: #0a4038;
}

.hwj-btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ── Canvas area ── */
#hwj-konfigurator-canvas-wrap {
  position: relative;
  background: linear-gradient(135deg, #f0ede8 0%, #e8e4de 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

#hwj-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 500px;
}

#hwj-canvas-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Modal ── */
#hwj-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#hwj-modal {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

#hwj-modal h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #0f5b4f;
}

#hwj-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  transition: color .15s;
  padding: 0;
}

#hwj-modal-close:hover {
  color: #222;
}

.hwj-field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.hwj-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .hwj-field-row { grid-template-columns: 1fr; }
  #hwj-modal { padding: 24px 20px; }
}

.hwj-field-group label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.hwj-field-group input,
.hwj-field-group textarea {
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .2s;
  width: 100%;
  box-sizing: border-box;
}

.hwj-field-group input:focus,
.hwj-field-group textarea:focus {
  outline: none;
  border-color: #0f5b4f;
}

.hwj-notice {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-weight: 500;
  font-size: 14px;
}

.hwj-notice.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.hwj-notice.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
