/* Simple Product Rows for Order Messages - Informal Style */

/* Force maximum width for order message bubbles to prevent expansion */
.bubble-message.bubble-max-width-true {
  max-width: 55% !important;
  width: 55% !important;
}

.product-row-container {
  margin-bottom: 8px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #f9f9f9;
  overflow: hidden;
  transition: background 0.2s ease;
}

.product-row-container:hover {
  background: #f5f5f5;
}

/* Product Header - Always Visible */
.product-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}

.product-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.product-row-line-1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-row-line-2 {
  display: flex;
  align-items: center;
  padding-left: 2px;
}

.product-quantity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  background: #25D366;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.product-name-text {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-sync-warning {
  color: #ff9800;
  font-size: 12px;
  flex-shrink: 0;
}

.product-row-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.product-price-text {
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

.product-toggle-icon {
  font-size: 12px;
  color: #666;
  transition: transform 0.2s ease;
}

/* Product Details - Collapsible */
.product-row-details {
  padding: 0 12px 10px 12px;
  border-top: 1px solid #e5e5e5;
  background: #fff;
}

.product-detail-image {
  padding: 10px 0 8px 0;
  text-align: center;
}

.product-detail-image img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  object-fit: cover;
}

.product-detail-item {
  display: flex;
  padding: 6px 0;
  font-size: 13px;
  gap: 8px;
}

.product-detail-label {
  color: #666;
  font-weight: 500;
  min-width: 110px;
  flex-shrink: 0;
}

.product-detail-value {
  color: #333;
  flex: 1;
  word-break: break-word;
}

.product-price-original {
  text-decoration: line-through;
  color: #999;
}

.product-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.stock-available {
  background: #d4edda;
  color: #155724;
}

.stock-unavailable {
  background: #f8d7da;
  color: #721c24;
}

.product-external-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.product-external-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.product-external-link i {
  font-size: 11px;
}

/* Order Total Row */
.order-total-row {
  margin-top: 10px;
  padding: 10px 12px;
  background: #667eea;
  color: white;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.order-total-label {
  font-weight: 500;
}

.order-total-value {
  font-weight: 700;
  font-size: 15px;
}

/* Responsive */
@media (max-width: 480px) {
  .product-row-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .product-row-right {
    width: 100%;
    justify-content: space-between;
  }

  .product-detail-item {
    flex-direction: column;
    gap: 2px;
  }

  .product-detail-label {
    min-width: auto;
  }
}
