/* rfq_cart.css - RFQ Cart System Styles */

:root {
  --rfq-accent: #c62828;
  --rfq-dark: #111827;
  --rfq-light: #f9fafb;
  --rfq-border: #e5e7eb;
  --rfq-shadow: 0 24px 50px rgba(15, 23, 42, 0.25);
}

/* ──── FAB Button ──────────────────────────────────────────────── */

#rfq-cart-fab {
  position: fixed;
  right: 3rem;
  bottom: 6rem;
  z-index: 1045;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #5a4a2a;
  background: #c9b27d;
  color: #111;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 24px rgba(90, 74, 42, 0.25);
  cursor: pointer;
  transition: background 0.2s ease;
}

#rfq-cart-fab:hover {
  background: #d4b896;
}

#rfq-cart-fab .rfq-fab-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
}

#rfq-cart-fab svg {
  width: 100%;
  height: 100%;
  fill: #111;
}

/* ──── Badge ────────────────────────────────────────────────────── */

#rfq-cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--rfq-accent);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(198, 40, 40, 0.35);
}

#rfq-cart-badge.is-hidden {
  display: none;
}

/* ──── Backdrop ─────────────────────────────────────────────────── */

#rfq-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1040;
}

body.rfq-cart-open #rfq-cart-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* ──── Drawer ────────────────────────────────────────────────────── */

#rfq-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 92vh;
  background: #fff;
  border-left: 1px solid var(--rfq-border);
  box-shadow: var(--rfq-shadow);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1046;
  display: flex;
  flex-direction: column;
}

body.rfq-cart-open #rfq-cart-drawer {
  transform: translateX(0);
}

/* ──── Drawer Header ────────────────────────────────────────────── */

.rfq-cart-header {
  padding: 18px 20px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--rfq-border);
  flex-shrink: 0;
}

.rfq-cart-header > div:first-child {
  flex: 1;
}

.rfq-cart-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--rfq-dark);
}

.rfq-cart-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.rfq-cart-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
}

/* ──── Drawer Body (Scrollable) ────────────────────────────────── */

.rfq-cart-body {
  flex: 1;
  overflow-y: auto;
  background: var(--rfq-light);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.rfq-cart-empty {
  text-align: center;
  color: #6b7280;
  padding: 40px 12px;
}

.rfq-cart-empty p {
  margin-bottom: 8px;
}

.rfq-cart-hint {
  font-size: 13px;
}

.rfq-cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ──── Cart Item ────────────────────────────────────────────────── */

.rfq-cart-item {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--rfq-border);
  display: grid;
  gap: 10px;
}

.rfq-cart-item-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.rfq-cart-item-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rfq-cart-item-title {
  font-weight: 600;
  color: var(--rfq-dark);
  font-size: 14px;
}

.rfq-cart-item-meta {
  font-size: 12px;
  color: #6b7280;
}

.rfq-cart-item-price {
  font-weight: 600;
  color: var(--rfq-accent);
  font-size: 13px;
}

.rfq-cart-item-link {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}

.rfq-cart-item-link:hover {
  text-decoration: underline;
}

/* ──── Thumbnail ────────────────────────────────────────────────── */

.rfq-cart-item-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--rfq-border);
  background: #fff;
  flex-shrink: 0;
}

/* ──── Config Display ───────────────────────────────────────────── */

.rfq-cart-config {
  background: #f3f4f6;
  border-left: 3px solid var(--rfq-accent);
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.config-detail {
  color: #374151;
  font-size: 12px;
}

/* ──── Actions ──────────────────────────────────────────────────── */

.rfq-cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rfq-cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.rfq-cart-qty span {
  font-weight: 500;
}

.rfq-cart-qty input {
  width: 64px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--rfq-border);
  font-size: 12px;
}

.rfq-cart-remove {
  border: none;
  background: none;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.rfq-cart-remove:hover {
  color: #b91c1c;
}

/* ──── Item Footer (Notes & Totals) ────────────────────────────── */

.rfq-cart-item-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ──── Collapsible Notes Toggle ────────────────────────────────── */

.rfq-cart-note-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.rfq-cart-note-toggle:hover {
  color: var(--rfq-dark);
}

.rfq-note-triangle {
  display: inline-flex;
  font-size: 10px;
  color: #9ca3af;
  transition: transform 0.2s ease;
}

.rfq-cart-note-toggle.is-expanded .rfq-note-triangle {
  transform: rotate(90deg);
}

/* ──── Notes Content (Collapsed/Expanded) ────────────────────────── */

.rfq-cart-note-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}

.rfq-cart-note-content.is-expanded {
  max-height: 200px;
  opacity: 1;
}

.rfq-cart-note-content textarea {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--rfq-border);
  padding: 6px 8px;
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
}

.rfq-cart-item-total {
  font-weight: 600;
  color: var(--rfq-dark);
  font-size: 12px;
}

/* ──── Drawer Footer (Fixed) ────────────────────────────────────── */

.rfq-cart-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--rfq-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: #fff;
}

#rfq-cart-subtotal {
  font-weight: 600;
  color: var(--rfq-dark);
  font-size: 13px;
  padding: 0 0 8px 0;
  border-bottom: 1px solid var(--rfq-border);
}

.rfq-cart-clear {
  border: 1px solid var(--rfq-border);
  background: #fff;
  color: #6b7280;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rfq-cart-clear:hover {
  background: var(--rfq-light);
}

.rfq-cart-send {
  border: none;
  background: var(--rfq-dark);
  color: #fff;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rfq-cart-send:hover {
  background: #1f2937;
}

/* ──── Responsive ────────────────────────────────────────────────── */

@media (max-width: 576px) {
  #rfq-cart-fab {
    right: 2rem;
    bottom: 5.5rem;
    font-size: 12px;
    padding: 10px 12px;
  }
}

@media (max-width: 576px) {
  .rfq-cart-item-wrapper {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .rfq-cart-item-thumbnail {
    width: 100%;
    height: auto;
    max-height: 200px;
  }
}

@media (max-width: 576px) {
  .rfq-cart-footer {
    flex-direction: column;
  }
}

/* ─────────────────────────────────────────────────────────
   RFQ Modal: Cart Summary Styles
   ───────────────────────────────────────────────────────── */

.rfq-summary-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rfq-summary-item {
  background: #f9fafb;
  border-left: 3px solid #c62828;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
}

.rfq-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.rfq-summary-title {
  font-weight: 600;
  color: #111827;
  font-size: 14px;
}

.rfq-summary-sku {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.rfq-summary-qty {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.rfq-summary-qty strong {
  color: #111827;
  font-weight: 600;
}

.rfq-summary-config {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #374151;
}

.rfq-summary-price {
  font-weight: 600;
  color: #c62828;
  margin-bottom: 6px;
  font-size: 13px;
}

.rfq-summary-note {
  font-size: 12px;
  color: #6b7280;
  padding: 8px;
  background: #fff;
  border-radius: 4px;
  border-left: 2px solid #9ca3af;
}

.rfq-summary-note strong {
  color: #374151;
}

/* ─────────────────────────────────────────────────────────
   Modal Footer Spacing
   ───────────────────────────────────────────────────────── */

#consultForm .modal-body {
  max-height: 85vh;
  overflow-y: auto;
}

#consultForm .modal-title {
  font-weight: 600;
  margin-bottom: 12px;
}

