/* Sonic Labs - Mietkorb / Cart CSS (Clean Blue Design & Reset) */

/* Floating Cart Button Reset & Styling */
button#cart-floating-btn,
#cart-floating-btn {
  all: unset;
  box-sizing: border-box !important;
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  z-index: 9999 !important;
  background-color: #007bff !important;
  color: #ffffff !important;
  border-radius: 50px !important;
  padding: 12px 24px !important;
  font-family: "Open Sans", sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.9em !important;
  letter-spacing: 0.05em !important;
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.35) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  height: auto !important;
  line-height: 1 !important;
  min-height: unset !important;
  margin: 0 !important;
  border: 2px solid #ffffff !important;
  text-transform: uppercase !important;
  user-select: none !important;

  /* Hidden by default with smooth spring entrance animation */
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(40px) scale(0.7) !important;
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.25s ease,
              box-shadow 0.25s ease !important;
}

button#cart-floating-btn.visible,
#cart-floating-btn.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

button#cart-floating-btn.visible:hover,
#cart-floating-btn.visible:hover {
  background-color: #2891ff !important;
  transform: translateY(-4px) scale(1.05) !important;
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.5) !important;
  color: #ffffff !important;
}

button#cart-floating-btn.pop,
#cart-floating-btn.pop {
  animation: cartPopAnim 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes cartPopAnim {
  0% { transform: scale(1); }
  50% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

#cart-floating-badge {
  all: unset;
  box-sizing: border-box !important;
  background-color: #ffffff !important;
  color: #007bff !important;
  border-radius: 50px !important;
  padding: 3px 9px !important;
  font-size: 0.85em !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  display: inline-block !important;
  text-align: center !important;
}

/* Toast Notifications */
.cart-toast {
  position: fixed;
  bottom: 95px;
  right: 30px;
  z-index: 10000;
  background: #1d2124;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 8px;
  border-left: 4px solid #007bff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  font-family: "Open Sans", sans-serif;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.cart-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Cart Modal Overlay */
#cart-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#cart-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Cart Modal Box */
#cart-modal {
  background: #ffffff;
  width: 90%;
  max-width: 520px;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  position: relative;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  font-family: "Open Sans", sans-serif;
}

#cart-modal h2 {
  font-family: "Roboto Slab", serif;
  font-size: 1.4em;
  margin-bottom: 20px;
  border-bottom: 2px solid #007bff;
  padding-bottom: 12px;
  color: #2b3034;
  display: flex;
  align-items: center;
  gap: 10px;
}

#cart-modal h2 i {
  color: #007bff;
}

button#cart-modal-close,
#cart-modal-close {
  all: unset;
  box-sizing: border-box !important;
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  font-size: 1.6em !important;
  line-height: 1 !important;
  cursor: pointer !important;
  color: #7f888f !important;
  background: none !important;
  border: none !important;
  padding: 4px 8px !important;
  height: auto !important;
}

#cart-modal-close:hover {
  color: #007bff !important;
}

#cart-modal-items {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  overflow-y: auto;
  flex-grow: 1;
  max-height: 350px;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.cart-item-row:hover {
  background: #f1f5f9;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-title {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.95em;
}

.cart-item-category {
  font-size: 0.78em;
  color: #007bff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

button.cart-item-remove,
.cart-item-remove {
  all: unset;
  box-sizing: border-box !important;
  color: #ef4444 !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  font-size: 1.2em !important;
  padding: 4px 8px !important;
  line-height: 1 !important;
  height: auto !important;
  border-radius: 4px !important;
  transition: background 0.2s ease !important;
}

button.cart-item-remove:hover,
.cart-item-remove:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #dc2626 !important;
}

.cart-empty-msg {
  color: #64748b;
  font-style: italic;
  text-align: center;
  padding: 35px 15px;
}

.cart-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
}

/* Contact Page Cart Summary Box */
#cart-summary-box {
  background: #f0f7ff;
  border: 2px dashed #007bff;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 25px;
}

#cart-summary-box h4 {
  color: #007bff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1em;
}

#cart-summary-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 12px;
}

#cart-summary-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  font-size: 0.92em;
}

.btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-add-cart.added {
  background-color: #16a34a !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
