/* EpiGenetics USA Patient Intake Form - Styles */

:root {
  --primary-color: #1a237e; /* Dark blue from logo */
  --secondary-color: #e53935; /* Red from logo */
  --accent-color: #3949ab; /* Lighter blue */
  --light-bg: #f5f5f5;
  --dark-text: #333;
  --light-text: #fff;
  --border-color: #ddd;
  --success-color: #4caf50;
  --error-color: #f44336;
  --warning-color: #ff9800;
  --info-color: #2196f3;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: var(--light-bg);
  padding: 0;
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header Styles */
header {
  background-color: #fff;
  padding: 20px 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.logo {
  max-width: 300px;
  height: auto;
  margin-bottom: 15px;
}

.company-info {
  margin-top: 10px;
  font-size: 0.9rem;
}

h1 {
  color: var(--primary-color);
  margin: 10px 0;
  font-size: 2rem;
}

/* Form Styles */
.form-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(26, 35, 126, 0.2);
  padding: 30px;
  margin-bottom: 30px;
}

.form-section {
  display: none;
  margin-bottom: 30px;
}

.form-section.active {
  display: block;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.section-header {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  margin-top: 5px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.checkbox-group, .radio-group {
  margin-top: 10px;
}

.checkbox-group label, .radio-group label {
  display: flex;
  align-items: center;
  font-weight: normal;
  margin-bottom: 5px;
}

input[type="checkbox"], input[type="radio"] {
  margin-right: 10px;
}

.rating-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.rating-item {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.rating-item input {
  margin-right: 5px;
}

.instructions {
  background-color: #e8eaf6;
  border-left: 4px solid var(--primary-color);
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.instructions p {
  margin: 0;
}

/* Navigation Buttons */
.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--light-text);
}

.btn-primary:hover {
  background-color: var(--accent-color);
}

.btn-secondary {
  background-color: #9e9e9e;
  color: var(--light-text);
}

.btn-secondary:hover {
  background-color: #757575;
}

.btn-submit {
  background-color: var(--success-color);
  color: var(--light-text);
}

.btn-submit:hover {
  background-color: #43a047;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 10px;
  margin: 20px 0;
  overflow: hidden;
}

.progress-bar {
  height: 10px;
  background-color: var(--primary-color);
  width: 0;
  transition: width 0.3s ease;
}

/* Form Validation */
.error-message {
  color: var(--error-color);
  font-size: 0.9rem;
  margin-top: 5px;
  display: none;
}

input.error, select.error, textarea.error {
  border: 1px solid var(--error-color);
}

/* Gender-specific sections */
.female-only, .male-only {
  display: none;
}

/* Table Styles for Symptom Ratings */
.symptom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.symptom-table th, .symptom-table td {
  padding: 10px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.symptom-table th {
  background-color: var(--primary-color);
  color: var(--light-text);
}

.symptom-table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.symptom-table .rating-cell {
  text-align: center;
}

/* Submission Section */
.submission-section {
  margin-top: 40px;
}

.consent {
  margin: 30px 0;
}

.consent label {
  display: flex;
  align-items: flex-start;
}

.consent input {
  margin-right: 10px;
  margin-top: 5px;
}

/* Company Footer */
.company-footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
}

/* Loading Spinner */
.spinner {
  display: none;
  width: 40px;
  height: 40px;
  margin: 20px auto;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
  display: none;
  background-color: var(--success-color);
  color: var(--light-text);
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .form-container {
    padding: 15px;
  }
  
  .header-content {
    flex-direction: column;
  }
  
  .logo {
    max-width: 200px;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .form-navigation {
    flex-direction: column;
    gap: 10px;
  }
  
  .form-navigation .btn {
    width: 100%;
  }
  
  .symptom-table {
    font-size: 0.9rem;
  }
  
  .symptom-table th, .symptom-table td {
    padding: 8px 5px;
  }
  
  .rating-scale {
    flex-direction: column;
  }
  
  .rating-item {
    margin-right: 0;
    margin-bottom: 5px;
  }
}

/* Print Styles */
@media print {
  .form-navigation, .progress-container {
    display: none;
  }
  
  .form-section {
    display: block;
    page-break-inside: avoid;
  }
  
  .form-container {
    box-shadow: none;
  }
  
  body {
    background-color: white;
  }
  
  .btn {
    display: none;
  }
}
