/* Warenkorb – Seitenleiste und Bestelltabellen (markup.php), Farben wie cd_admin/assets/frontend.css */

/* ---------- Seitenleiste ---------- */
.cart-widget-box:not(:has(*)) {
  display: none; /* auf den Bestellseiten bleibt die Box leer */
}
.wk-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 0;
  margin: 0 0 12px;
  font-size: 13px;
}
.wk-summary dt {
  padding-right: 12px;
  color: #64748b;
}
.wk-summary dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wk-summary .wk-total {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
  font-weight: 700;
  color: #1e3a8a;
}
.wk-empty {
  margin: 0 0 10px;
  font-size: 13px;
  color: #64748b;
}
.wk-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
}
.cart-widget-box a.wk-link {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

/* ---------- Knöpfe ---------- */
.wk-btn,
.cart-widget-box a.wk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 14px;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.wk-btn-primary,
.cart-widget-box a.wk-btn-primary {
  display: flex;
  width: 100%;
  color: #fff;
  background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
  border-color: #14532d;
}
.wk-btn-primary:hover,
.cart-widget-box a.wk-btn-primary:hover {
  background: linear-gradient(180deg, #15803d 0%, #166534 100%);
  text-decoration: none;
}
.wk-btn-secondary,
.wk-btn-small {
  color: #1f2937;
  background: #fff;
  border-color: #cbd5e1;
}
.wk-btn-secondary:hover,
.wk-btn-small:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.wk-btn-small {
  padding: 5px 10px;
  font-size: 12px;
}

/* ---------- Bestelltabelle ---------- */
.wk-table {
  width: 100%;
  margin: 8px 0 0;
  border-collapse: collapse;
  font-size: 14px;
}
.wk-table th,
.wk-table td {
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}
.wk-table thead th {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #64748b;
  border-bottom-color: #cbd5e1;
}
.wk-table .wk-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wk-table .wk-qty {
  width: 1%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wk-table .wk-title {
  font-weight: 600;
}
.wk-table tfoot th,
.wk-table tfoot td {
  border-bottom: 0;
  font-size: 15px;
}
.wk-table tfoot .wk-total {
  font-weight: 700;
  color: #1e3a8a;
}
.wk-qty-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.wk-qty-form input[type="number"] {
  box-sizing: border-box;
  width: 64px;
  height: 30px;
  padding: 0 6px;
  font-size: 14px;
  text-align: right;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}
.wk-qty-form input[type="number"]:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 0;
  border-color: #3b82f6;
}
.wk-table .wk-del {
  width: 1%;
  text-align: right;
}
.wk-del form {
  margin: 0;
}
.wk-remove {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: #64748b;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
.wk-remove:hover {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}
.wk-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.wk-table + .wk-note {
  text-align: right;
}
.wk-clear-form {
  margin: 12px 0 0;
}
.wk-empty-page {
  max-width: 420px;
  margin: 24px 0;
  padding: 24px;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.wk-empty-page p {
  margin: 0 0 14px;
  font-size: 15px;
}
.wk-empty-page .wk-btn-primary {
  display: inline-flex;
  width: auto;
}

/* Schmal: Zeilen als Karten, Preise untereinander */
@media (max-width: 600px) {
  .wk-table thead {
    display: none;
  }
  .wk-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
  }
  .wk-table tbody td {
    padding: 0;
    border: 0;
  }
  .wk-table tbody .wk-title {
    grid-column: 1;
    grid-row: 1;
  }
  .wk-table tbody .wk-del {
    grid-column: 2;
    grid-row: 1;
    width: auto;
  }
  .wk-table tbody .wk-qty {
    grid-column: 1 / -1;
    width: auto;
  }
  .wk-table tbody .wk-num {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
  }
  .wk-table:not(.wk-editable) tbody .wk-qty::before {
    content: "Anzahl: ";
    color: #64748b;
  }
  .wk-table tbody .wk-num::before {
    content: attr(data-label);
    color: #64748b;
  }
  .wk-table tfoot tr {
    display: flex;
    justify-content: space-between;
  }
  .wk-table tfoot th,
  .wk-table tfoot td {
    padding: 10px 0;
  }
  .wk-table tfoot .wk-del {
    display: none;
  }
}
