/* Ghana Realty Connect - Valuation Widget Styles
 * Sprint 4 Task 3: AI property valuation widget
 */

.valuation-widget {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  margin: 40px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.valuation-header {
  text-align: center;
  margin-bottom: 32px;
}

.valuation-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.valuation-subtitle {
  font-size: 16px;
  color: #6b7280;
}

/* Form Styles */
.valuation-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.valuation-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.valuation-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.valuation-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.valuation-select,
.valuation-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  background: #ffffff;
  transition: all 0.2s ease;
}

.valuation-select:focus,
.valuation-input:focus {
  outline: none;
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.valuation-select:hover,
.valuation-input:hover {
  border-color: #9ca3af;
}

/* Button */
.valuation-button {
  width: 100%;
  padding: 16px 32px;
  background: #e53e3e;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.valuation-button:hover:not(:disabled) {
  background: #c53030;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229, 62, 62, 0.3);
}

.valuation-button:active:not(:disabled) {
  transform: translateY(0);
}

.valuation-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading Spinner */
.valuation-loader {
  display: inline-block;
}

.valuation-spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

.valuation-spinner-track {
  stroke: rgba(255, 255, 255, 0.3);
}

.valuation-spinner-head {
  stroke: #ffffff;
  stroke-dasharray: 50;
  stroke-dashoffset: 25;
  stroke-linecap: round;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Result Display */
.valuation-result {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.valuation-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.valuation-result-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.valuation-confidence {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.valuation-confidence-high {
  background: #d1fae5;
  color: #065f46;
}

.valuation-confidence-medium {
  background: #fef3c7;
  color: #92400e;
}

.valuation-confidence-low {
  background: #fee2e2;
  color: #991b1b;
}

/* Estimate Display */
.valuation-estimate {
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  color: #ffffff;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.valuation-range {
  margin-bottom: 16px;
}

.valuation-range-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  opacity: 0.9;
}

.valuation-range-values {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 28px;
  font-weight: 700;
}

.valuation-range-separator {
  opacity: 0.7;
}

.valuation-avg {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.valuation-avg-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  opacity: 0.9;
}

.valuation-avg-value {
  font-size: 20px;
  font-weight: 600;
}

/* Details */
.valuation-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.valuation-detail-item {
  background: #f9fafb;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.valuation-detail-label {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.valuation-detail-value {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* Actions */
.valuation-actions {
  display: flex;
  gap: 12px;
}

.valuation-action-btn {
  flex: 1;
  padding: 14px 24px;
  background: #e53e3e;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.valuation-action-btn:hover {
  background: #c53030;
  transform: translateY(-1px);
}

.valuation-action-secondary {
  background: #ffffff;
  color: #e53e3e;
  border: 2px solid #e53e3e;
}

.valuation-action-secondary:hover {
  background: #fef2f2;
}

/* Error Display */
.valuation-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-top: 24px;
  animation: slideIn 0.3s ease-out;
}

.valuation-error-icon {
  width: 48px;
  height: 48px;
  color: #dc2626;
  stroke-width: 2;
}

.valuation-error p {
  color: #991b1b;
  font-size: 15px;
  text-align: center;
  margin: 0;
}

.valuation-error-dismiss {
  padding: 8px 20px;
  background: #ffffff;
  color: #dc2626;
  border: 1px solid #dc2626;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.valuation-error-dismiss:hover {
  background: #fef2f2;
}

/* Responsive Design */
@media (max-width: 768px) {
  .valuation-widget {
    padding: 24px 16px;
    margin: 20px 0;
  }

  .valuation-title {
    font-size: 24px;
  }

  .valuation-subtitle {
    font-size: 14px;
  }

  .valuation-inputs {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .valuation-range-values {
    flex-direction: column;
    gap: 8px;
    font-size: 24px;
  }

  .valuation-range-separator {
    display: none;
  }

  .valuation-actions {
    flex-direction: column;
  }

  .valuation-details {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .valuation-button,
  .valuation-actions {
    display: none;
  }

  .valuation-widget {
    box-shadow: none;
    border: 2px solid #e5e7eb;
  }
}
