/**
 * SmartQuote v1 - CSS Styles
 * Fixed pricing matrix with +10% enforcement
 */

/* Vehicle Group Selector in Booking */
.smartquote-vehicle-group {
  margin: 1.5rem 0;
  padding: 1rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 1px solid #bae6fd;
}

.smartquote-vehicle-group label {
  display: block;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.smartquote-vehicle-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #7dd3fc;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.smartquote-vehicle-group select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
  outline: none;
}

.smartquote-vehicle-group .form-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #0369a1;
}

/* Price Change Info */
.smartquote-price-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.smartquote-price-info--valid {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.smartquote-price-info--invalid {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.smartquote-price-info .icon {
  font-size: 1.1rem;
}

/* Dashboard: Change Requests Panel */
.smartquote-change-requests {
  margin: 1.5rem 0;
}

.smartquote-change-requests__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.smartquote-change-requests__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.smartquote-change-requests__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  background: #ef4444;
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.smartquote-change-requests__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.smartquote-change-request-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
}

.smartquote-change-request-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.smartquote-change-request-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.smartquote-change-request-card__customer {
  font-weight: 600;
  color: #1e293b;
}

.smartquote-change-request-card__time {
  font-size: 0.8rem;
  color: #64748b;
}

.smartquote-change-request-card__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.smartquote-change-request-card__price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.smartquote-change-request-card__price-old {
  color: #94a3b8;
  text-decoration: line-through;
}

.smartquote-change-request-card__price-new {
  font-weight: 600;
  color: #16a34a;
}

.smartquote-change-request-card__price-arrow {
  color: #64748b;
}

.smartquote-change-request-card__percent {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.smartquote-change-request-card__percent--over {
  background: #fee2e2;
  color: #991b1b;
}

.smartquote-change-request-card__reason {
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.smartquote-change-request-card__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.smartquote-change-request-card__actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn--accept {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: none;
}

.btn--accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn--decline {
  background: white;
  color: #dc2626;
  border: 1px solid #dc2626;
}

.btn--decline:hover {
  background: #fef2f2;
}

/* Empty State */
.smartquote-change-requests__empty {
  text-align: center;
  padding: 2rem;
  color: #64748b;
  font-size: 0.95rem;
}

.smartquote-change-requests__empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

/* Feature Flag Indicator */
.smartquote-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.smartquote-indicator--active {
  background: #dcfce7;
  color: #166534;
}

/* Pricing Snapshot in Booking Details */
.smartquote-pricing-snapshot {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f0f9ff;
  border-radius: 8px;
  border: 1px solid #bae6fd;
  font-size: 0.85rem;
}

.smartquote-pricing-snapshot__title {
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.smartquote-pricing-snapshot__row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.smartquote-pricing-snapshot__label {
  color: #64748b;
}

.smartquote-pricing-snapshot__value {
  font-weight: 500;
  color: #1e293b;
}

/* Dashboard Section Header for SmartQuote */
.dashboard-section__smartquote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.dashboard-section__smartquote-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #0369a1;
}

.dashboard-section__smartquote-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 640px) {
  .smartquote-change-request-card__details {
    grid-template-columns: 1fr;
  }
  
  .smartquote-change-request-card__actions {
    flex-direction: column;
  }
  
  .smartquote-change-request-card__actions .btn {
    width: 100%;
    text-align: center;
  }
}
