/* ===== Display-Konfigurator WordPress Plugin — Dark Theme ===== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

#display-konfigurator-root {
  font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.4;
  box-sizing: border-box;
  color: #ffffff;
}

#display-konfigurator-root *,
#display-konfigurator-root *::before,
#display-konfigurator-root *::after {
  box-sizing: border-box;
}

/* Reset Divi/Theme overrides */
#display-konfigurator-root button {
  font-family: inherit;
  line-height: inherit;
  letter-spacing: normal;
  text-transform: none;
}

#display-konfigurator-root input[type="text"],
#display-konfigurator-root input[type="color"] {
  font-family: inherit;
  box-shadow: none;
}

/* ===== LAYOUT ===== */
.dk-wrapper {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  align-items: flex-start;
}

.dk-sidebar {
  width: 320px;
  flex-shrink: 0;
}

.dk-preview {
  flex: 1;
  min-width: 0;
}

/* ===== SECTION HEADER (icon + label) ===== */
.dk-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  margin-top: 14px;
}

.dk-section-header:first-child {
  margin-top: 0;
}

.dk-section-header-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.dk-section-header-label {
  font-size: 12px;
  font-weight: 700;
  color: #8BC34A;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== DARK CARDS ===== */
.dk-card {
  background: rgba(40, 40, 40, 0.85);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dk-card-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* ===== TEMPLATE CARDS ===== */
.dk-template-grid {
  display: flex;
  gap: 6px;
}

.dk-template-card {
  flex: 1;
  padding: 6px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 30, 0.7);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.dk-template-card:hover {
  border-color: rgba(139, 195, 74, 0.4);
}

.dk-template-card--active {
  border-color: #8BC34A;
  background: rgba(139, 195, 74, 0.08);
}

.dk-template-card-preview {
  width: 100%;
  aspect-ratio: 57/67;
  background: transparent;
  border-radius: 4px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dk-template-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dk-template-card-name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== INPUT FIELDS ===== */
.dk-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #a3a39b;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.dk-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.dk-input:focus {
  border-color: rgba(139, 195, 74, 0.5);
}

/* ===== UPLOAD AREA ===== */
.dk-upload {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.dk-upload:hover {
  border-color: rgba(139, 195, 74, 0.4);
  color: rgba(255, 255, 255, 0.6);
}

/* ===== LOGO PREVIEW ===== */
.dk-logo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dk-logo-preview img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.dk-logo-remove {
  font-size: 11px;
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
}

.dk-logo-remove:hover {
  color: #f87171;
}

/* ===== PILLS (Laminierung) ===== */
.dk-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 500;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(30, 30, 30, 0.7);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.15s;
}

.dk-pill:hover {
  border-color: rgba(139, 195, 74, 0.3);
}

.dk-pill--active {
  border-color: #8BC34A;
  background: rgba(139, 195, 74, 0.1);
  color: #8BC34A;
}

/* ===== COLOR SWATCHES ===== */
.dk-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dk-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
  position: relative;
}

.dk-swatch:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.dk-swatch--active {
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

/* Rainbow swatch for custom color */
.dk-swatch--rainbow {
  background: conic-gradient(
    hsl(0,80%,60%), hsl(60,80%,60%), hsl(120,80%,60%),
    hsl(180,80%,60%), hsl(240,80%,60%), hsl(300,80%,60%), hsl(360,80%,60%)
  );
}

/* Hidden color input overlay */
.dk-color-input-wrap {
  position: relative;
  display: inline-flex;
}

.dk-color-input-wrap input[type="color"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

/* ===== 3D CANVAS ===== */
.dk-canvas-wrapper {
  width: 100%;
  height: 600px;
  border-radius: 12px;
  overflow: hidden;
  cursor: grab;
}

.dk-canvas-wrapper:active {
  cursor: grabbing;
}

/* ===== CART BUTTON ===== */
.dk-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 40px;
  border-radius: 10px;
  border: none;
  background: #8BC34A;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dk-cart-btn:hover {
  background: #7CB342;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139, 195, 74, 0.35);
}

.dk-cart-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.dk-cart-icon {
  font-size: 18px;
}

/* ===== INPUT ERROR STATE ===== */
.dk-input--error {
  border-color: #ef4444;
}

/* ===== URL PREVIEW ===== */
.dk-url-preview {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 4px;
  word-break: break-all;
}

/* ===== CART BUTTON DISABLED ===== */
.dk-cart-btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== REQUIRED INDICATOR ===== */
.dk-required {
  color: #ef4444;
  margin-left: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .dk-wrapper {
    flex-direction: column;
    gap: 16px;
    padding: 12px 0;
  }

  .dk-sidebar {
    width: 100%;
    order: 2;
  }

  .dk-preview {
    order: 1;
  }

  .dk-canvas-wrapper {
    height: 350px;
  }
}

@media (max-width: 600px) {
  .dk-canvas-wrapper {
    height: 280px;
  }

  .dk-template-grid {
    gap: 4px;
  }

  .dk-template-card {
 