/* AWP PrintWise - Cart Summary Styles */
/* WooCommerce Cart Summary for Custom Checkout Screen */

/**
 * Cart Summary Container
 */
#awp-cart-summary-container {
  width: 100%;
  min-height: 200px;
}

/**
 * Cart Summary
 */
.awp-cart-summary {
  background: white;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/**
 * Cart Summary Items
 */
.awp-cart-summary-items {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.awp-cart-summary-title {
  font-size: 1.125rem;
  font-weight: 900;
  color: #1f2937;
  margin: 0 0 1rem 0;
}

/**
 * Cart Item
 */
.awp-cart-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}

.awp-cart-item:last-child {
  border-bottom: none;
}

.awp-cart-item-remove {
  position: absolute;
  top: 0.75rem;
  right: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #fee2e2;
  border: none;
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.awp-cart-item-remove:hover {
  background: #ef4444;
  color: white;
  transform: scale(1.1);
}

.awp-cart-item-remove:active {
  transform: scale(0.95);
}

.awp-cart-item-info {
  flex: 1;
  padding-right: 2.5rem; /* Space for remove button */
}

.awp-cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.awp-studio-cart-thumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  flex-shrink: 0;
}
.awp-studio-cart-thumbs img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.awp-studio-cart-thumbs--cart img {
  width: 56px;
  height: 56px;
}
.awp-studio-cart-thumbs-more {
  position: absolute;
  right: -6px;
  bottom: -4px;
  min-width: 22px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.awp-cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.awp-cart-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  margin: 0;
  line-height: 1.4;
}

.awp-cart-item-variation {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.25rem 0;
}

.awp-cart-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.awp-cart-item-quantity {
  font-size: 0.75rem;
  color: #6b7280;
}

.awp-cart-item-price {
  font-size: 0.875rem;
  font-weight: 500;
  color: #663399;
}

/**
 * Cart Summary Totals
 */
.awp-cart-summary-totals {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.awp-cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.awp-cart-summary-label {
  font-size: 0.875rem;
  color: #6b7280;
}

.awp-cart-summary-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
}

.awp-cart-summary-row.awp-cart-summary-total {
  padding-top: 0.75rem;
  border-top: 2px solid #e5e7eb;
  margin-top: 0.5rem;
}

.awp-cart-summary-row.awp-cart-summary-total .awp-cart-summary-label {
  font-size: 1rem;
  font-weight: 900;
  color: #1f2937;
}

.awp-cart-summary-row.awp-cart-summary-total .awp-cart-summary-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: #663399;
}

/**
 * Cart Summary Loading State
 */
.awp-cart-summary-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.awp-cart-summary-loading .awp-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e5e7eb;
  border-top-color: #663399;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.awp-cart-summary-loading p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

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

/**
 * Cart Summary Error State
 */
.awp-cart-summary-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 6px;
}

.awp-cart-summary-error p {
  color: #ef4444;
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
}

/**
 * Cart Summary Empty State
 */
.awp-cart-summary-empty {
  padding: 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

/**
 * Cart Summary Actions
 */
.awp-cart-summary-actions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e5e7eb;
}

.awp-button-clear-cart {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #fee2e2;
  color: #ef4444;
  border: 2px solid #ef4444;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.awp-button-clear-cart:hover:not(:disabled) {
  background: #ef4444;
  color: white;
}

.awp-button-clear-cart:active:not(:disabled) {
  transform: scale(0.98);
}

.awp-button-clear-cart:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/**
 * Custom Checkout Screen Layout
 */
.custom-checkout-screen {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.checkout-left {
  flex: 1;
}

.checkout-right {
  flex: 0 0 400px;
}

.cart-summary-section {
  position: sticky;
  top: 2rem;
}

@media (max-width: 768px) {
  .custom-checkout-screen {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .checkout-right {
    flex: 1;
    order: -1; /* Cart summary üstte görünsün */
  }

  .cart-summary-section {
    position: static;
  }

  .awp-cart-summary {
    padding: 1rem;
  }
}
