/* DSBC Cart Slide-Out — pokazuje się po dodaniu produktu do koszyka */

#dsbc-mc-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100000;
  font-family: -apple-system, system-ui, sans-serif;
}

#dsbc-mc-root .dsbc-mc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#dsbc-mc-root.dsbc-mc-open .dsbc-mc-overlay {
  opacity: 1;
  pointer-events: auto;
}

#dsbc-mc-root .dsbc-mc-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 92vw;
  background: #fff;
  box-shadow: -6px 0 28px rgba(0, 0, 0, 0.14);
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

#dsbc-mc-root.dsbc-mc-open .dsbc-mc-panel {
  transform: translateX(0);
}

.dsbc-mc-header {
  padding: 18px 22px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dsbc-mc-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dsbc-mc-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #27ae60;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.dsbc-mc-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.2s;
}

.dsbc-mc-close:hover {
  background: #f0f0f0;
  color: #333;
}

.dsbc-mc-body {
  padding: 18px 22px;
  flex: 1;
  overflow-y: auto;
}

.dsbc-mc-body .woocommerce-mini-cart,
.dsbc-mc-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dsbc-mc-body .woocommerce-mini-cart__total,
.dsbc-mc-body .total {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px solid #eee;
  font-size: 16px;
  font-weight: 600;
}

.dsbc-mc-body .woocommerce-mini-cart-item,
.dsbc-mc-body li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.dsbc-mc-body img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.dsbc-mc-body a {
  color: #333;
  text-decoration: none;
}

.dsbc-mc-body a:hover {
  text-decoration: underline;
}

.dsbc-mc-body .quantity,
.dsbc-mc-body .amount {
  color: #555;
  font-size: 13px;
}

.dsbc-mc-body .remove,
.dsbc-mc-body .remove_from_cart_button {
  position: absolute;
  top: 10px;
  right: 0;
  font-size: 18px;
  color: #c0392b;
  text-decoration: none;
  font-weight: 700;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dsbc-mc-body .woocommerce-mini-cart__buttons {
  display: none; /* Hide default WC buttons — we have our own */
}

.dsbc-mc-empty {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.dsbc-mc-loading {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 14px;
}

.dsbc-mc-loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-top-color: #aa8c74;
  border-radius: 50%;
  margin-left: 10px;
  vertical-align: middle;
  animation: dsbc-mc-spin 0.7s linear infinite;
}

@keyframes dsbc-mc-spin {
  to { transform: rotate(360deg); }
}

.dsbc-mc-footer {
  padding: 16px 22px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  background: #fafafa;
}

.dsbc-mc-btn-secondary,
.dsbc-mc-btn-primary {
  flex: 1;
  padding: 13px 16px;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}

.dsbc-mc-btn-secondary {
  background: #fff;
  color: #555;
  border-color: #ddd;
}

.dsbc-mc-btn-secondary:hover {
  background: #f5f5f5;
  border-color: #ccc;
  color: #333;
}

.dsbc-mc-btn-primary {
  background: #aa8c74;
  color: #fff;
  border-color: #aa8c74;
}

.dsbc-mc-btn-primary:hover {
  background: #8e7660;
  border-color: #8e7660;
  color: #fff;
}

/* Form submit blocking overlay */
.dsbc-mc-submitting {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.dsbc-mc-submitting::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 480px) {
  #dsbc-mc-root .dsbc-mc-panel {
    width: 100vw;
    max-width: 100vw;
  }
}
