/**
 * Symmetry Pricing - Negotiation Component Styles
 * Embeddable negotiation flow for product pages
 */

/* Container */
.symmetry-negotiation {
  background: var(--card, #fff);
  border: 1px solid var(--ring, #e5e7eb);
  border-radius: 16px;
  padding: 24px;
  max-width: 480px;
  margin: 0 auto;
}

/* Step Header */
.sym-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ring, #e5e7eb);
}

.sym-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
}

.sym-badge-stable {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.sym-badge-demand {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.sym-badge-crisis {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.sym-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--indigo, #6366f1);
}

/* Form Elements */
.sym-form-group {
  margin-bottom: 20px;
}

.sym-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--fg, #1f2937);
}

.sym-form-group small {
  display: block;
  font-size: 11px;
  color: var(--fg-muted, #6b7280);
  margin-top: 4px;
}

.sym-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--ring, #e5e7eb);
  border-radius: 8px;
  font-size: 16px;
  background: var(--bg-alt, #f9fafb);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sym-input:focus {
  outline: none;
  border-color: var(--indigo, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* State Selector */
.sym-state-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sym-state-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  border: 2px solid var(--ring, #e5e7eb);
  border-radius: 12px;
  background: var(--bg-alt, #f9fafb);
  cursor: pointer;
  transition: all 0.2s;
}

.sym-state-btn:hover {
  border-color: var(--fg-muted, #9ca3af);
}

.sym-state-btn.selected {
  border-color: var(--indigo, #6366f1);
  background: rgba(99, 102, 241, 0.05);
}

.sym-state-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.sym-state-label {
  font-size: 12px;
  font-weight: 700;
}

.sym-state-desc {
  font-size: 10px;
  color: var(--fg-muted, #6b7280);
  text-align: center;
}

/* Buttons */
.sym-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.sym-btn-primary {
  background: var(--indigo, #6366f1);
  color: white;
}

.sym-btn-primary:hover {
  background: var(--indigo-dark, #4f46e5);
  transform: translateY(-1px);
}

.sym-btn-secondary {
  background: var(--bg-alt, #f1f5f9);
  color: var(--fg, #1f2937);
  border: 1px solid var(--ring, #e5e7eb);
}

.sym-btn-secondary:hover {
  background: var(--ring, #e5e7eb);
}

.sym-btn-link {
  background: none;
  border: none;
  color: var(--fg-muted, #6b7280);
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  width: 100%;
  text-align: center;
}

.sym-btn-link:hover {
  color: var(--indigo, #6366f1);
}

/* Capacity Display */
.sym-capacity-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1),
    rgba(139, 92, 246, 0.1)
  );
  border-radius: 12px;
  margin-bottom: 24px;
}

.sym-capacity-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted, #6b7280);
}

.sym-capacity-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--indigo, #6366f1);
}

.sym-deficit-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
}

/* Section Title */
.sym-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted, #6b7280);
  margin-bottom: 12px;
}

/* Gap Options */
.sym-gap-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.sym-gap-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--ring, #e5e7eb);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.sym-gap-option:hover {
  border-color: var(--fg-muted, #9ca3af);
}

.sym-gap-option.selected {
  border-color: var(--indigo, #6366f1);
  background: rgba(99, 102, 241, 0.05);
}

.sym-gap-option input {
  display: none;
}

.sym-gap-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sym-gap-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.sym-gap-info {
  flex: 1;
}

.sym-gap-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.sym-gap-info span {
  font-size: 12px;
  color: var(--fg-muted, #6b7280);
}

/* Step Actions */
.sym-step-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.sym-skip-gap {
  text-align: center;
  margin-top: 8px;
}

/* Summary */
.sym-summary {
  background: var(--bg-alt, #f9fafb);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.sym-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.sym-summary-row:not(:last-child) {
  border-bottom: 1px solid var(--ring, #e5e7eb);
}

.sym-summary-row.sym-discount {
  color: #16a34a;
}

.sym-summary-row.sym-total {
  font-size: 16px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid var(--ring, #e5e7eb);
}

/* Payment Modes */
.sym-payment-modes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.sym-payment-mode {
  padding: 16px;
  border: 2px solid var(--ring, #e5e7eb);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.sym-payment-mode:hover {
  border-color: var(--fg-muted, #9ca3af);
}

.sym-payment-mode.selected {
  border-color: var(--indigo, #6366f1);
  background: rgba(99, 102, 241, 0.05);
}

.sym-payment-mode input {
  display: none;
}

.sym-pm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sym-pm-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.sym-pm-badge.sym-pm-dynamic {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.sym-payment-mode p {
  font-size: 12px;
  color: var(--fg-muted, #6b7280);
  margin: 0;
}

/* Contract Step */
.sym-contract {
  text-align: center;
}

.sym-contract-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.sym-contract h3 {
  font-size: 24px;
  margin: 0 0 12px;
}

.sym-contract-code {
  font-size: 20px;
  font-weight: 800;
  font-family: monospace;
  color: var(--indigo, #6366f1);
  background: rgba(99, 102, 241, 0.1);
  padding: 12px 24px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 16px;
}

.sym-contract-note {
  font-size: 13px;
  color: var(--fg-muted, #6b7280);
  margin-bottom: 24px;
}

/* Status Board Widget */
.symmetry-status-board {
  background: var(--card, #fff);
  border: 1px solid var(--ring, #e5e7eb);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.ssb-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted, #6b7280);
  margin-bottom: 12px;
}

.ssb-price {
  font-size: 48px;
  font-weight: 800;
  color: var(--indigo, #6366f1);
  line-height: 1;
  margin-bottom: 12px;
}

.ssb-context {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.ssb-context.stable {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.ssb-context.demand {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.ssb-context.crisis {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.ssb-countdown {
  font-size: 12px;
  color: var(--fg-muted, #6b7280);
  margin-bottom: 20px;
}

.ssb-countdown span {
  font-weight: 700;
  color: var(--fg, #1f2937);
}

.ssb-explain {
  font-size: 12px;
  color: var(--fg-muted, #6b7280);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto 20px;
}

.ssb-cta {
  width: 100%;
}

/* Price History Chart */
.symmetry-price-history {
  height: 120px;
  margin: 16px 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0 4px;
}

.sph-bar {
  flex: 1;
  min-width: 8px;
  border-radius: 4px 4px 0 0;
  transition: all 0.3s;
  position: relative;
}

.sph-bar:hover {
  opacity: 0.8;
}

.sph-bar.stable {
  background: linear-gradient(to top, #22c55e, #4ade80);
}

.sph-bar.demand {
  background: linear-gradient(to top, #f59e0b, #fbbf24);
}

.sph-bar.crisis {
  background: linear-gradient(to top, #ef4444, #f87171);
}

.sph-bar::after {
  content: attr(data-price);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  background: var(--fg, #1f2937);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.sph-bar:hover::after {
  opacity: 1;
}

/* Responsive */
@media (max-width: 480px) {
  .symmetry-negotiation {
    padding: 16px;
    border-radius: 12px;
  }

  .sym-state-selector {
    grid-template-columns: 1fr;
  }

  .sym-state-btn {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }

  .sym-price {
    font-size: 16px;
  }

  .sym-capacity-value {
    font-size: 24px;
  }
}
