/**
 * Property Jeanie - Feasibility Wizard Styles
 */

/* Step Container */
.feasibility-step {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}

.step-header {
  text-align: center;
  margin-bottom: 2rem;
}

.step-question {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground, #3B1F6E);
  margin-bottom: 0.5rem;
}

.step-help {
  color: var(--muted-foreground, #6B5F82);
  font-size: 0.9rem;
}

/* Options */
.step-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--card, #FFFFFF);
  border: 1px solid var(--border, #EDE4D4);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.option-card:hover {
  border-color: var(--primary, #7C3AED);
  background: var(--secondary, #F5F3FF);
}

.option-card.selected {
  border-color: var(--primary, #7C3AED);
  background: rgba(109, 40, 217, 0.1);
}

.option-card.has-warning {
  border-color: var(--warning, #f59e0b);
}

.option-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.option-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary, #8b5cf6);
}

.option-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.option-label {
  font-weight: 500;
  color: var(--foreground, #3B1F6E);
}

.option-detail {
  font-size: 0.8rem;
  color: var(--muted-foreground, #6B5F82);
}

.option-specs {
  margin: 0.5rem 0 0 0;
  padding: 0 0 0 1.25rem;
  list-style: none;
  font-size: 0.75rem;
  color: var(--muted-foreground, #6B5F82);
}

.option-specs li {
  position: relative;
  padding: 0.15rem 0;
}

.option-specs li::before {
  content: '✓';
  position: absolute;
  left: -1rem;
  color: var(--primary, #8b5cf6);
  font-size: 0.7rem;
}

.option-rate {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: var(--primary, #8b5cf6);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
}

.option-warning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  color: var(--warning, #f59e0b);
  margin-right: 1rem;
}

.warning-icon {
  width: 1rem;
  height: 1rem;
}

.option-check {
  color: var(--muted-foreground, #64748b);
}

.option-card.selected .option-check {
  color: var(--primary, #8b5cf6);
}

.check-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* Navigation */
.step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, #334155);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.btn-primary {
  background: var(--primary, #8b5cf6);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--secondary, #334155);
  color: var(--foreground, #fff);
  border: 1px solid var(--border, #475569);
}

.btn-secondary:hover {
  background: var(--muted, #475569);
}

.icon {
  width: 1rem;
  height: 1rem;
}

/* Progress */
.wizard-progress {
  height: 4px;
  background: var(--muted, #334155);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.wizard-progress-bar {
  height: 100%;
  background: var(--primary, #8b5cf6);
  transition: width 0.3s ease;
}

.step-counter {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted-foreground, #94a3b8);
  margin-bottom: 1rem;
}

/* Results */
.feasibility-results {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem;
}

.results-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border, #334155);
}

.results-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary, #8b5cf6);
}

.results-title h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground, #fff);
  margin: 0;
}

.results-address {
  color: var(--muted-foreground, #94a3b8);
  font-size: 0.9rem;
  margin: 0;
}

/* Summary Cards */
.results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--card, #1e293b);
  border: 1px solid var(--border, #334155);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
}

.summary-card.primary {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
  border-color: var(--primary, #8b5cf6);
}

.summary-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground, #fff);
}

.summary-card.primary .summary-value {
  color: var(--primary, #a78bfa);
}

/* Breakdown */
.results-breakdown {
  background: var(--card, #1e293b);
  border: 1px solid var(--border, #334155);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.results-breakdown h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground, #fff);
  margin: 0 0 1rem 0;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border, #334155);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-label {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.breakdown-label span:first-child {
  color: var(--foreground, #e2e8f0);
}

.breakdown-detail {
  font-size: 0.75rem;
  color: var(--muted-foreground, #64748b);
}

.breakdown-value {
  font-weight: 600;
  color: var(--foreground, #fff);
  font-variant-numeric: tabular-nums;
}

.breakdown-total {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--primary, #8b5cf6);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--foreground, #fff);
}

/* Assumptions */
.assumptions-panel {
  margin-bottom: 2rem;
}

.assumptions-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  background: var(--secondary, #334155);
  border: 1px solid var(--border, #475569);
  border-radius: 0.5rem;
  color: var(--foreground, #fff);
  cursor: pointer;
  font-weight: 500;
}

.assumptions-toggle:hover {
  background: var(--muted, #475569);
}

.toggle-icon {
  margin-left: auto;
}

.assumptions-content {
  padding: 1.5rem;
  background: var(--card, #1e293b);
  border: 1px solid var(--border, #334155);
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
}

.assumptions-content.hidden {
  display: none;
}

.assumptions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.assumption-category h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted-foreground, #94a3b8);
  margin: 0 0 0.75rem 0;
  letter-spacing: 0.05em;
}

.assumption-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.assumption-field label {
  flex: 1;
  font-size: 0.85rem;
  color: var(--foreground, #e2e8f0);
}

.assumption-field input {
  width: 80px;
  padding: 0.4rem 0.5rem;
  background: var(--background, #0f172a);
  border: 1px solid var(--border, #475569);
  border-radius: 0.375rem;
  color: var(--foreground, #fff);
  text-align: right;
  font-size: 0.85rem;
}

.assumption-field input:focus {
  outline: none;
  border-color: var(--primary, #8b5cf6);
}

.assumption-unit {
  font-size: 0.8rem;
  color: var(--muted-foreground, #64748b);
  width: 1.5rem;
}

/* Actions */
.results-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Error State */
.error-state {
  text-align: center;
  padding: 3rem;
}

.error-icon {
  width: 3rem;
  height: 3rem;
  color: var(--destructive, #ef4444);
  margin-bottom: 1rem;
}

.error-state h3 {
  color: var(--foreground, #fff);
  margin-bottom: 0.5rem;
}

.error-state p {
  color: var(--muted-foreground, #94a3b8);
  margin-bottom: 1.5rem;
}

/* Mobile */
@media (max-width: 640px) {
  .feasibility-step,
  .feasibility-results {
    padding: 1rem;
  }
  
  .step-question {
    font-size: 1.25rem;
  }
  
  .option-card {
    flex-wrap: wrap;
  }
  
  .option-warning {
    margin: 0.5rem 0 0 0;
    width: 100%;
  }
  
  .results-summary {
    grid-template-columns: 1fr;
  }
  
  .results-actions {
    flex-direction: column;
  }
  
  .results-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* Number input */
.step-number-input {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.number-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card, #1e1a2e);
  border: 2px solid var(--border, #2e2a3e);
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  transition: border-color 0.2s;
}

.number-input-wrapper:focus-within {
  border-color: var(--primary, #a855f7);
}

.number-input {
  background: transparent;
  border: none;
  color: var(--foreground, #fff);
  font-size: 2rem;
  font-weight: 600;
  width: 150px;
  text-align: center;
  outline: none;
}

.number-input::placeholder {
  color: var(--muted-foreground, #64748b);
  font-weight: 400;
}

.number-suffix {
  color: var(--muted-foreground, #94a3b8);
  font-size: 1.25rem;
}

/* Hide number input spinners */
.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.number-input[type=number] {
  -moz-appearance: textfield;
}

/* Custom size input */
.custom-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--secondary, #1a1625);
  border-radius: 0.5rem;
}

.custom-size-input {
  flex: 1;
  background: var(--card, #1e1a2e);
  border: 2px solid var(--border, #2e2a3e);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--foreground, #fff);
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  width: 120px;
}

.custom-size-input:focus {
  border-color: var(--primary, #a855f7);
}

.custom-input-suffix {
  color: var(--muted-foreground, #94a3b8);
  font-size: 1rem;
}

/* Hide number input spinners */
.custom-size-input::-webkit-outer-spin-button,
.custom-size-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.custom-size-input[type=number] {
  -moz-appearance: textfield;
}

/* FSR Guidance Banner */
.fsr-guidance-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 1rem;
}

.fsr-icon {
  padding: 0.625rem;
  background: rgba(168, 85, 247, 0.2);
  border-radius: 0.5rem;
  color: var(--primary, #a855f7);
}

.fsr-content {
  flex: 1;
}

.fsr-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground, #fff);
  margin-bottom: 0.25rem;
}

.fsr-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary, #a855f7);
  line-height: 1.2;
}

.fsr-detail {
  font-size: 0.75rem;
  color: var(--muted-foreground, #94a3b8);
  margin-top: 0.25rem;
}

/* Sensitivity Analysis */
.sensitivity-analysis {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.sensitivity-analysis h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.sensitivity-note {
  font-size: 0.875rem;
  color: var(--muted-foreground, #6b7280);
  margin-bottom: 1rem;
}

.sensitivity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.sensitivity-table th,
.sensitivity-table td {
  padding: 0.75rem 0.5rem;
  text-align: right;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.sensitivity-table th:first-child,
.sensitivity-table td:first-child {
  text-align: left;
}

.sensitivity-table th {
  font-weight: 600;
  color: var(--muted-foreground, #6b7280);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sensitivity-table .scenario-worst td:first-child { color: #ef4444; }
.sensitivity-table .scenario-base { background: rgba(124, 58, 237, 0.05); }
.sensitivity-table .scenario-base td:first-child { font-weight: 600; }
.sensitivity-table .scenario-best td:first-child { color: #22c55e; }

.sensitivity-legend {
  font-size: 0.75rem;
  color: var(--muted-foreground, #6b7280);
  margin-top: 0.75rem;
  text-align: center;
}

.text-success { color: #22c55e; }
.text-danger { color: #ef4444; }
