/* Enhanced UI Styles for DemoCaaS1 */

/* Common Form Styles */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #4a6fa5;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
  border-color: #4a6fa5;
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
  outline: none;
}

/* Select Styling */
select.form-control {
  padding-right: 2.5rem;
}

/* Textarea Styling */
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* File Upload Styling */
.file-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 0.5rem;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.file-label {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  background-color: #f0f2f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  color: #4a6fa5;
}

.file-label:hover {
  background-color: #e0e2e5;
  border-color: #ccc;
}

.file-name {
  flex: 1;
  font-size: 0.9rem;
  color: #666;
  padding: 0.5rem 0;
}

/* Help Text */
.help-text {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

/* Radio and Checkbox Styling */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.radio input {
  margin-right: 0.5rem;
  cursor: pointer;
}

/* Registration Wizard Enhancements */
.registration-wizard {
  max-width: 850px;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.wizard-progress {
  margin-bottom: 2rem;
}

.progress-bar {
  height: 6px;
  background-color: #e9ecef;
  border-radius: 3px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: #4a6fa5;
  border-radius: 3px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
}

.step {
  position: relative;
  text-align: center;
  font-size: 0.9rem;
  color: #6c757d;
  flex: 1;
}

.step:before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  background-color: #e9ecef;
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  border: 2px solid transparent;
  line-height: 20px;
  text-align: center;
  font-weight: bold;
  color: white;
}

.step[data-step="1"]:before { content: "1"; }
.step[data-step="2"]:before { content: "2"; }
.step[data-step="3"]:before { content: "3"; }
.step[data-step="4"]:before { content: "4"; }

.step.active {
  color: #4a6fa5;
  font-weight: 500;
}

.step.active:before {
  background-color: #4a6fa5;
  border-color: #4a6fa5;
}

.step.completed:before {
  background-color: #4a6fa5;
  border-color: #4a6fa5;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.wizard-step h3 {
  color: #4a6fa5;
  margin-bottom: 0.5rem;
}

.step-description {
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.wizard-tip {
  display: flex;
  align-items: flex-start;
  background-color: #f8f9fa;
  border-left: 4px solid #4a6fa5;
  padding: 1rem;
  border-radius: 0 4px 4px 0;
  margin: 1.5rem 0;
}

.tip-icon {
  color: #4a6fa5;
  font-size: 1.2rem;
  margin-right: 1rem;
}

.tip-content {
  flex: 1;
  font-size: 0.9rem;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.btn {
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: #4a6fa5;
  color: white;
  border: 1px solid #4a6fa5;
}

.btn-primary:hover {
  background-color: #3d5d8a;
  border-color: #3d5d8a;
}

.btn-secondary {
  background-color: white;
  color: #4a6fa5;
  border: 1px solid #ddd;
}

.btn-secondary:hover {
  border-color: #4a6fa5;
  background-color: #f8f9fa;
}

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

/* Review Summary */
.review-summary {
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 1.5rem;
}

.review-section {
  margin-bottom: 1.5rem;
}

.review-section:last-child {
  margin-bottom: 0;
}

.review-section h4 {
  color: #4a6fa5;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.review-item {
  display: flex;
  margin-bottom: 0.5rem;
}

.review-label {
  font-weight: 500;
  width: 150px;
  color: #495057;
}

.review-value {
  flex: 1;
}

/* Analysis Section Enhancements */
.analysis-results {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.analysis-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(74, 111, 165, 0.2);
  border-radius: 50%;
  border-top-color: #4a6fa5;
  margin-bottom: 1rem;
}

.analysis-status {
  display: flex;
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #4a6fa5;
}

.analysis-status .label {
  font-weight: 500;
  width: 150px;
  color: #495057;
}

.analysis-status .value {
  flex: 1;
  font-weight: 500;
}

.analysis-status .value.safe {
  color: #28a745;
}

.analysis-status .value.warning {
  color: #ffc107;
}

.analysis-status .value.danger {
  color: #dc3545;
}

.analysis-details {
  margin-bottom: 1.5rem;
}

.analysis-details h4 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #4a6fa5;
}

.analysis-details ul {
  padding-left: 1.5rem;
}

.analysis-details li {
  margin-bottom: 0.5rem;
}

/* Audio Analysis Results */
.file-info {
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.info-item {
  display: flex;
  margin-bottom: 0.5rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item .label {
  font-weight: 500;
  width: 150px;
  color: #495057;
}

.info-item .value {
  flex: 1;
}

/* Waveform Visualization Enhancement */
.waveform-container {
  margin: 20px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 20px;
  background-color: #f8f9fa;
}

.waveform-visualization {
  position: relative;
  height: 150px;
  margin-bottom: 10px;
}

.waveform {
  display: flex;
  align-items: flex-end;
  height: 100px;
  gap: 2px;
  padding-bottom: 20px;
}

.waveform-bar {
  background-color: #4a6fa5;
  width: 4px;
  border-radius: 2px 2px 0 0;
}

.waveform-bar.high-risk {
  background-color: #dc3545;
}

.waveform-bar.medium-risk {
  background-color: #ffc107;
}

.waveform-bar.low-risk {
  background-color: #28a745;
}

.timeline {
  display: flex;
  justify-content: space-between;
  padding-top: 5px;
  border-top: 1px solid #ddd;
}

.time-marker {
  font-size: 0.8rem;
  color: #6c757d;
}

.waveform-legend {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.legend-color.high-risk {
  background-color: #dc3545;
}

.legend-color.medium-risk {
  background-color: #ffc107;
}

.legend-color.low-risk {
  background-color: #28a745;
}

/* Success Message */
.submission-success {
  text-align: center;
  padding: 2rem 0;
}

.success-icon {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 1rem;
}

.registration-details {
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
  margin: 1.5rem 0;
  text-align: left;
  display: inline-block;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .progress-steps {
    font-size: 0.8rem;
  }
  
  .step:before {
    width: 20px;
    height: 20px;
    line-height: 16px;
    font-size: 0.7rem;
  }
  
  .review-item {
    flex-direction: column;
  }
  
  .review-label {
    width: 100%;
    margin-bottom: 0.25rem;
  }
  
  .analysis-status {
    flex-direction: column;
  }
  
  .analysis-status .label {
    width: 100%;
    margin-bottom: 0.25rem;
  }
  
  .info-item {
    flex-direction: column;
  }
  
  .info-item .label {
    width: 100%;
    margin-bottom: 0.25rem;
  }
  
  .waveform-legend {
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  .radio-group {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .wizard-tip {
    flex-direction: column;
  }
  
  .tip-icon {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  
  .wizard-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn {
    width: 100%;
  }
}
