/**
 * AmProd Quote Request Icon Styles
 */

.amprod-quote-request-icon {
  position: relative;
  display: inline-block;
  z-index: 9999;
}

.amprod-quote-icon-button {
  position: relative;
  width: 60px;
  height: 60px;
  background: #0073aa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
  transition: all 0.3s ease;
  color: white;
}

.amprod-quote-icon-button:hover {
  background: #005a87;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
}

.amprod-quote-icon-button svg {
  width: 24px;
  height: 24px;
}

.amprod-quote-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.amprod-quote-badge.hidden {
  opacity: 0;
  transform: scale(0);
  visibility: hidden;
}

.amprod-quote-hover-cart {
  position: absolute;
  top: 70px;
  right: 0;
  width: 400px;
  max-height: 60vh;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 10000;
  border: 1px solid #e1e5e9;
  display: flex;
  flex-direction: column;
}

.amprod-quote-request-icon:hover .amprod-quote-hover-cart,
.amprod-quote-hover-cart:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.amprod-quote-request-icon.show-cart .amprod-quote-hover-cart {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.amprod-hover-cart-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e1e5e9;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.amprod-hover-cart-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
  font-weight: 600;
}

.amprod-hover-cart-scrollable {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  padding: 1em;
}

.amprod-hover-cart-scrollable::-webkit-scrollbar {
  width: 6px;
}

.amprod-hover-cart-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.amprod-hover-cart-scrollable::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}

.amprod-hover-cart-content {
  padding: 0;
}

/* Cart item styles for hover cart */
.amprod-hover-cart-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

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

.amprod-hover-cart-item-content {
  flex: 1;
}

.amprod-hover-cart-item-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.amprod-hover-cart-item-part {
  color: #666;
  font-size: 12px;
  margin-bottom: 4px;
}

.amprod-hover-cart-item-options {
  color: #888;
  font-size: 11px;
}

.amprod-hover-cart-item-actions {
  margin-left: 8px;
}

.amprod-hover-cart-button {
  border: none;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.amprod-hover-cart-button.remove {
  background: #dc3545;
  color: white;
}

.amprod-hover-cart-button.remove:hover {
  background: #c82333;
}

.amprod-hover-cart-footer {
  padding: 16px 20px;
  border-top: 1px solid #e1e5e9;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
  display: none; /* Hidden by default, shown via JS when cart has items */
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.amprod-hover-cart-footer button {
  border: none;
  border-radius: 6px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.amprod-hover-cart-footer .clear-btn {
  background: #6c757d;
  color: white;
}

.amprod-hover-cart-footer .clear-btn:hover {
  background: #5a6268;
}

.amprod-hover-cart-footer .quote-btn {
  background: #0073aa;
  color: white;
}

.amprod-hover-cart-footer .quote-btn:hover {
  background: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.amprod-hover-cart-empty {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  /* Hide hover cart on tablets and mobile - will navigate to cart page instead */
  .amprod-quote-hover-cart {
    display: none !important;
  }

  /* Make icon slightly smaller on mobile */
  .amprod-quote-icon-button {
    width: 50px;
    height: 50px;
  }

  .amprod-quote-icon-button svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 768px) {
  .amprod-quote-icon-button {
    width: 45px;
    height: 45px;
  }

  .amprod-quote-icon-button svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .amprod-quote-icon-button {
    width: 40px;
    height: 40px;
  }

  .amprod-quote-icon-button svg {
    width: 16px;
    height: 16px;
  }
}

/* Cart component adjustments when displayed in dropdown */
.amprod-quote-hover-cart #amprod-cart .amprod-cart-empty-state {
  padding: 20px 0 !important;
  text-align: center;
  color: #666;
  font-size: 14px;
}
