/* frontend/quote-send.css — Quote Send UI (Light Default + Dark Mode)
   All colours derive strictly from `frontend/css/theme.css` (--pp-* tokens). */

.quote-send-panel {
  margin-top: 1.5rem;
  border-top: 1px solid var(--pp-border);
  padding-top: 1.5rem;
}

.quote-send-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.quote-send-header h4 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--pp-text);
}

.quote-send-btn {
  padding: 0.5rem 1.15rem;
  background: var(--pp-primary);
  color: var(--pp-primary-fg);
  border: 1px solid var(--pp-primary-border);
  border-radius: var(--pp-radius-sm);
  cursor: pointer;
  font-family: var(--pp-font-sans);
  font-size: var(--pp-text-base);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background-color 0.15s ease;
}

.quote-send-btn:hover {
  background: var(--pp-primary-hover);
}

.quote-send-btn:disabled {
  background: var(--pp-disabled-bg);
  color: var(--pp-disabled-fg);
  border-color: var(--pp-disabled-border);
  cursor: not-allowed;
}

.supplier-selection-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.55rem;
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  background: var(--pp-surface-2);
}

.supplier-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.supplier-checkbox-item:hover {
  border-color: var(--pp-border-strong);
  background: var(--pp-surface-hover);
}

.supplier-checkbox-item.selected {
  border-color: var(--pp-primary);
  background: var(--pp-primary-soft);
}

.supplier-checkbox-item input[type="checkbox"] {
  margin-top: 0.2rem;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--pp-primary);
}

.supplier-info {
  flex: 1;
}

.supplier-name {
  font-weight: 600;
  color: var(--pp-text);
  margin-bottom: 0.2rem;
}

.supplier-meta {
  font-size: var(--pp-text-xs);
  color: var(--pp-text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.supplier-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.supplier-recommended-badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  background: var(--pp-badge-green-bg);
  border: 1px solid var(--pp-badge-green-border);
  color: var(--pp-badge-green-fg);
  font-size: 0.7rem;
  border-radius: var(--pp-radius-xs);
  font-weight: 600;
}

.quote-send-options {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--pp-surface-2);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
}

.quote-option-group {
  margin-bottom: 0.85rem;
}

.quote-option-group:last-child {
  margin-bottom: 0;
}

.quote-option-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  color: var(--pp-text-secondary);
  font-size: var(--pp-text-sm);
}

.quote-option-group textarea {
  width: 100%;
  padding: 0.5rem 0.7rem;
  background: var(--pp-input-bg);
  color: var(--pp-text);
  border: 1px solid var(--pp-input-border);
  border-radius: var(--pp-radius-sm);
  font-family: var(--pp-font-sans);
  font-size: var(--pp-text-base);
  min-height: 80px;
}

.quote-option-group textarea:focus {
  outline: none;
  border-color: var(--pp-primary);
  box-shadow: 0 0 0 3px var(--pp-ring-soft);
}

.quote-checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--pp-text-sm);
  color: var(--pp-text);
}

.quote-checkbox-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--pp-primary);
}

.quote-history {
  margin-top: 1.5rem;
}

.quote-history-header {
  font-size: var(--pp-text-base);
  font-weight: 600;
  color: var(--pp-text);
  margin-bottom: 0.75rem;
}

.quote-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.quote-history-item {
  padding: 0.85rem 1rem;
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.quote-history-info {
  flex: 1;
}

.quote-history-supplier {
  font-weight: 600;
  color: var(--pp-text);
  margin-bottom: 0.2rem;
}

.quote-history-meta {
  font-size: var(--pp-text-xs);
  color: var(--pp-text-muted);
}

.quote-status-badge {
  padding: 0.18rem 0.55rem;
  border-radius: var(--pp-radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.quote-status-badge.sent {
  background: var(--pp-badge-blue-bg);
  color: var(--pp-badge-blue-fg);
  border-color: var(--pp-badge-blue-border);
}

.quote-status-badge.received {
  background: var(--pp-badge-green-bg);
  color: var(--pp-badge-green-fg);
  border-color: var(--pp-badge-green-border);
}

.quote-status-badge.pending {
  background: var(--pp-badge-amber-bg);
  color: var(--pp-badge-amber-fg);
  border-color: var(--pp-badge-amber-border);
}

/* ── Quote Send Modal ── */
.quote-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pp-backdrop);
  backdrop-filter: blur(3px);
  z-index: 1500;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.quote-modal.active {
  display: flex;
}

.quote-modal-content {
  background: var(--pp-surface);
  color: var(--pp-text);
  border-radius: var(--pp-radius-lg);
  border: 1px solid var(--pp-border);
  box-shadow: var(--pp-shadow-lg);
  padding: 1.5rem;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.quote-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--pp-border);
}

.quote-modal-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--pp-text);
}

.quote-modal-close {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--pp-radius-sm);
  font-size: 1.35rem;
  color: var(--pp-text-muted);
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  line-height: 1;
}

.quote-modal-close:hover {
  background: var(--pp-badge-red-bg);
  color: var(--pp-badge-red-fg);
}

.quote-modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--pp-border);
}

.detected-brands-section {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: var(--pp-badge-blue-bg);
  border: 1px solid var(--pp-badge-blue-border);
  border-left: 4px solid var(--pp-info);
  border-radius: var(--pp-radius-sm);
  color: var(--pp-text);
}

.detected-brands-label {
  font-size: var(--pp-text-xs);
  font-weight: 600;
  color: var(--pp-badge-blue-fg);
  margin-bottom: 0.4rem;
}

.detected-brand-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.brand-chip {
  padding: 0.2rem 0.65rem;
  background: var(--pp-navy);
  color: var(--pp-surface);
  border-radius: var(--pp-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.select-all-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--pp-surface-3);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius-sm);
  margin-bottom: 0.5rem;
  font-size: var(--pp-text-sm);
  color: var(--pp-text-secondary);
}

.select-all-btn {
  background: none;
  border: none;
  color: var(--pp-primary-text);
  cursor: pointer;
  font-family: var(--pp-font-sans);
  font-size: var(--pp-text-sm);
  font-weight: 600;
}

.select-all-btn:hover {
  text-decoration: underline;
}
