/* Floating Quote Button — vertical tab anchored to the right edge.
 * Slim profile, subtle shadow, accent on hover. Stays understated so
 * product imagery leads. */
.quote-floating-btn {
  position: fixed;
  top: 32%;
  right: 0;
  transform: translateY(-50%);
  background: #292524; /* stone-800 */
  color: #ffffff;
  padding: 0.85rem 0.6rem;
  border: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: -4px 4px 14px rgba(41, 37, 36, 0.18);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  width: auto;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, padding-right 0.2s ease;
}

.quote-floating-btn:hover {
  background-color: #44403c; /* stone-700 */
  box-shadow: -6px 6px 18px rgba(41, 37, 36, 0.26);
  padding-right: 0.85rem;
}

.quote-floating-btn:focus-visible {
  outline: 2px solid #292524;
  outline-offset: 2px;
}

.quote-floating-btn.quote-bounce {
  animation: quoteTagBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* The flying "puck" cloned from the product image */
.quote-fly-puck {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 12px 28px rgba(41, 37, 36, 0.28),
    0 2px 6px rgba(41, 37, 36, 0.18);
  transform-origin: center;
  will-change: transform, opacity;
  border: 2px solid #fff;
}

.quote-fly-puck img {
  display: block;
  pointer-events: none;
  user-select: none;
}

@keyframes quoteTagBounce {
  0% {
    transform: translateY(-50%) scale(1);
    box-shadow: -4px 4px 14px rgba(41, 37, 36, 0.18);
  }
  30% {
    transform: translateY(-50%) scale(1.12);
    box-shadow: -8px 8px 22px rgba(41, 37, 36, 0.32);
  }
  60% {
    transform: translateY(-50%) scale(0.95);
    box-shadow: -4px 4px 14px rgba(41, 37, 36, 0.18);
  }
  100% {
    transform: translateY(-50%) scale(1);
    box-shadow: -4px 4px 14px rgba(41, 37, 36, 0.18);
  }
}

/* Source button confirmation pulse — works regardless of which page renders
   the .add-to-quote-btn, since the puck is optional. */
.add-to-quote-btn.quote-btn-pulse {
  animation: quoteBtnPulse 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes quoteBtnPulse {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-2px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

/* Modal Overlay */
.quote-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: all 0.3s ease;
}

/* Main Content Blur Effect */
#main-content {
  transition: filter 0.3s ease;
}

#main-content.blur {
  filter: blur(5px);
}

/* Modal Container */
.quote-modal {
  background: #fff;
  max-width: 600px;
  width: 90%;
  padding: 2rem;
  border-radius: 8px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

/* Close Button */
.quote-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  font-size: 1.5rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 50%;
}

/* Modal Title */
.quote-modal-title {
  margin-bottom: 1.5rem;
}

/* Quote Table */
.quote-table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
}

.quote-table th {
  text-align: left;
  padding: 0.5rem;
}

.quote-table tr {
  border-bottom: 1px solid #eee;
}

.quote-table td {
  padding: 0.5rem;
}

/* Form Styles */
.quote-form {
  display: grid;
  gap: 1rem;
}

.form-group {
  display: block;
}

.form-label {
  display: block;
  margin-bottom: 0.3rem;
}

.form-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.submit-btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5rem;
}

/* Quantity Controls */
.qty-control {
  padding: 0.2rem 0.5rem;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.remove-btn {
  padding: 0.3rem 0.6rem;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* File Input Styles */
.file-input {
  padding: 0.5rem;
  border: 1px dashed #ddd;
  background: #f9f9f9;
  cursor: pointer;
}

.file-input:hover {
  border-color: #666;
  background: #f0f0f0;
}

.file-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #666;
}

.product-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.product-variant {
  font-size: 0.9rem;
  color: #666;
}

.quantity-btn {
  padding: 4px 8px;
  background: #f5f5f4;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.quantity-btn:hover {
  background: #e7e5e4;
}

/* =========================================================================
 * Canonical "Add to Quote" button.
 *
 * Lives in modal.css because every page that needs the quote tab already
 * loads modal.css. Previously each page (index.html, products.html,
 * search-results.html) declared its own copy with slightly different
 * padding/radius/weight; this is the single source of truth.
 * ========================================================================= */
.add-to-quote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background-color: #292524; /* stone-800 — matches header text + nav admin */
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(41, 37, 36, 0.08);
}

.add-to-quote-btn:hover {
  background-color: #44403c; /* stone-700 */
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(41, 37, 36, 0.14);
}

.add-to-quote-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(41, 37, 36, 0.08);
}

.add-to-quote-btn:focus-visible {
  outline: 2px solid #292524;
  outline-offset: 2px;
}

.add-to-quote-btn.added {
  background-color: #44403c;
}

.add-to-quote-btn svg {
  width: 16px;
  height: 16px;
}

/* On grid product cards the button stretches across the bottom row alongside
 * the quantity input. */
.product-action-buttons .add-to-quote-btn {
  flex: 1;
  min-width: 0;
}
