/* service-cart-widget.css */

.service-cart-widget {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap:1rem;
}

.service-cart-spacing {
  height: 20px;
}

.service-cart-bottom-widget {
  pointer-events: none; /* Equivalent to IgnorePointer */
}

/* Cart Widget Styles */
.cart-widget {
  max-width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background-color: white;
  transition: opacity 0.2s ease;
}

.cart-widget-disabled {
  pointer-events: none;
  opacity: 0.7;
}

/* Empty State Styles */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.cart-empty-icon {
  width: auto;
  height: 80px;
  object-fit: contain;
  opacity: 0.6;
}

.cart-empty-spacing {
  height: 8px;
}

.cart-empty-text {
  font-size: 12px;
  font-weight: 400;
  color: #000000;
  margin: 0;
  text-align: center;
}

/* Cart Content Styles */
.cart-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: start;
  gap:1rem;
}

.cart-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #141414;
    margin: 0;
    text-align: start;
}

.cart-title-spacing {
  height: 12px;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.cart-item-spacing {
  height: 10px;
}

.cart-actions-spacing {
  height: 32px;
}

.cart-actions {
  width: 100%;
}

/* Service type specific styling */
.cart-widget-service .cart-total-amount {
  font-size: 12px;
  font-weight: 600;
  color: #fcfcfc;
}

/* Cart type specific styling */
.cart-bottom-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 16px;
}

.cart-summary {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.cart-total-price {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.cart-summary-spacing {
  height: 4px;
}

.cart-items-count {
  font-size: 10px;
  font-weight: 400;
  color: #6c757d;
  margin: 0;
}

.cart-summary-spacer {
  flex: 1;
}

/* Service Cart Tile Styles */
.service-cart-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

.cart-tile-details {
  flex: 1;
  min-width: 0;
}

.cart-tile-text {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.cart-tile-title {
  font-size: 1rem;
  font-weight: 400;
  color: #424242;
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  text-align: start;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-tile-subtitle-spacing {
  height: 4px;
}

.cart-tile-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #7A5AF8; /* AppColors.kSecondary */
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  text-align: start;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-tile-main-spacing {
  /* width: 12px; */
  flex-shrink: 0;
}

.cart-tile-price-spacing {
  /* width: 16px; */
  flex-shrink: 0;
}

.cart-tile-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
  min-width: 60px;
}

.cart-tile-total-price {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  white-space: nowrap;
}

.cart-tile-original-price {
  font-size: 12px;
  font-weight: 500;
  color: #a3a3a3;
  text-decoration: line-through;
  margin: 0;
  white-space: nowrap;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .service-cart-spacing {
    height: 16px;
  }
  
  .cart-widget {
    border-radius: 12px;
    padding: 12px;
  }
  
  .cart-empty-icon {
    height: 60px;
  }
  
  .cart-empty-text {
    font-size: 10px;
  }
  
  .cart-title {
    font-size: 12px;
  }
  
  .cart-title-spacing {
    height: 8px;
  }
  
  .cart-item-spacing {
    height: 8px;
  }
  
  .cart-actions-spacing {
    height: 24px;
  }
  
  .cart-bottom-row {
    gap: 12px;
  }
  
  .cart-tile-main-spacing {
    width: 8px;
  }
  
  .cart-tile-price-spacing {
    width: 12px;
  }
  
  .cart-tile-title {
    font-size: 11px;
  }
  
  .cart-tile-subtitle {
    font-size: 9px;
  }
  
  .cart-tile-total-price,
  .cart-tile-original-price {
    font-size: 11px;
  }
}

/* Accessibility and interaction states */
.service-cart-tile:focus-within {
  outline: 2px solid #007bff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Loading states */
.cart-widget.loading {
  opacity: 0.6;
  pointer-events: none;
}

.cart-widget.loading .cart-items-list {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Print styles */
@media print {
  .cart-widget {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
  
  .service-cart-bottom-widget {
    display: none;
  }
}
