/* ===================================
   MIDDLETON SURVEY - ENHANCED STYLES
   =================================== */

/* Main Container - Increased base font size */
.mdc-survey {
  max-width: 780px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem; /* Increased from 1rem */
  line-height: 1.6;
  color: #333;
}

/* Logo Centering */
.mdc-survey .logo,
.mdc-survey .logo img {
  display: block;
  margin: 0 auto 2rem;
  text-align: center;
  max-width: 100%;
  height: auto;
}

.mdc-survey .logo img {
  max-width: 300px;
  width: 100%;
}

/* Force logo centering - more specific */
.webform-submission-form .logo {
  text-align: center !important;
  display: block !important;
  margin: 0 auto 2rem !important;
}

.webform-submission-form .logo img,
.webform-submission-form img[src*="OTOF"] {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 300px !important;
}

/* Typography - Larger sizes */
.mdc-survey h1,
.mdc-survey .webform-wizard-page-title {
  font-size: 2.25rem; /* Increased from 2rem */
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: #c8102e;
  line-height: 1.3;
}

.mdc-survey h2 {
  font-size: 1.75rem; /* Increased from 1.5rem */
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: #2c3e50;
  border-bottom: 3px solid #c8102e;
  padding-bottom: 0.5rem;
}

.mdc-survey h3 {
  font-size: 1.5rem; /* Increased from 1.25rem */
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: #34495e;
}

.mdc-survey h4 {
  font-size: 1.25rem; /* Increased from 1.1rem */
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: #555;
}

/* Form Items - Better Spacing */
.mdc-survey .form-item,
.mdc-survey .webform-element-help-container {
  margin-bottom: 1.75rem;
}

.mdc-survey .form-item:last-child {
  margin-bottom: 0;
}

/* Labels - Larger */
.mdc-survey .form-item label,
.mdc-survey fieldset legend {
  display: block;
  font-size: 1.2rem; /* Increased from 1.05rem */
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.mdc-survey .form-required {
  color: #c8102e;
  font-weight: 700;
}

/* Descriptions - Larger */
.mdc-survey .description,
.mdc-survey .form-item .description {
  font-size: 1rem; /* Increased from 0.9rem */
  color: #666;
  margin-top: 0.4rem;
  line-height: 1.5;
}

.mdc-survey .description strong {
  color: #444;
}

/* PRIVACY POLICY CHECKBOX - PROMINENT STYLING */
.mdc-survey .form-item:has(input[name="data_storage_agreement"]),
.mdc-survey #edit-data-storage-agreement,
.mdc-survey [data-drupal-selector="edit-data-storage-agreement"] {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border: 3px solid #f57c00;
  border-radius: 12px;
  padding: 1.75rem;
  margin: 2rem 0 !important;
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.2);
}

.mdc-survey .form-item:has(input[name="data_storage_agreement"]) label,
.mdc-survey #edit-data-storage-agreement label {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: #e65100 !important;
  margin-bottom: 1rem !important;
}

.mdc-survey .form-item:has(input[name="data_storage_agreement"]) .description,
.mdc-survey #edit-data-storage-agreement .description {
  font-size: 1.1rem !important;
  color: #444 !important;
  background: #fff;
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid #f57c00;
  margin-top: 0.75rem !important;
}

.mdc-survey .form-item:has(input[name="data_storage_agreement"]) .description strong,
.mdc-survey #edit-data-storage-agreement .description strong {
  color: #e65100 !important;
  font-size: 1.15rem !important;
}

.mdc-survey .form-item:has(input[name="data_storage_agreement"]) .description a,
.mdc-survey #edit-data-storage-agreement .description a {
  color: #c8102e;
  font-weight: 700;
  text-decoration: underline;
  font-size: 1.15rem;
}

.mdc-survey input[name="data_storage_agreement"] {
  width: 1.5rem !important;
  height: 1.5rem !important;
  margin-right: 0.75rem !important;
  cursor: pointer;
  accent-color: #f57c00 !important;
}

/* Text Inputs - Larger */
.mdc-survey input[type="text"],
.mdc-survey input[type="email"],
.mdc-survey input[type="tel"],
.mdc-survey input[type="number"],
.mdc-survey select {
  width: 100%;
  padding: 0.875rem 1.125rem; /* Increased padding */
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1.125rem; /* Increased from 1rem */
  font-family: inherit;
  transition: all 0.2s ease;
  background: #fff;
}

.mdc-survey input[type="text"]:focus,
.mdc-survey input[type="email"]:focus,
.mdc-survey input[type="tel"]:focus,
.mdc-survey input[type="number"]:focus,
.mdc-survey select:focus {
  outline: none;
  border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* Textareas - Larger */
.mdc-survey textarea {
  width: 100%;
  padding: 0.875rem 1.125rem; /* Increased padding */
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1.125rem; /* Increased from 1rem */
  font-family: inherit;
  min-height: 120px; /* Increased from 100px */
  resize: vertical;
  transition: all 0.2s ease;
}

.mdc-survey textarea:focus {
  outline: none;
  border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* Checkboxes & Radio Buttons - Larger */
.mdc-survey input[type="checkbox"],
.mdc-survey input[type="radio"] {
  width: 1.375rem; /* Increased from 1.25rem */
  height: 1.375rem;
  margin-right: 0.625rem;
  cursor: pointer;
  accent-color: #c8102e;
}

.mdc-survey .form-checkboxes .form-item,
.mdc-survey .form-radios .form-item {
  margin-bottom: 0.875rem; /* Increased spacing */
  display: flex;
  align-items: flex-start;
}

.mdc-survey .form-checkboxes label,
.mdc-survey .form-radios label {
  font-weight: 400;
  font-size: 1.125rem; /* Added explicit size */
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

/* Better Checkbox/Radio Container */
.mdc-survey .form-checkboxes,
.mdc-survey .form-radios {
  padding: 1.25rem; /* Increased padding */
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* Buttons - Larger */
.mdc-survey .webform-button--next,
.mdc-survey .webform-button--previous,
.mdc-survey .webform-button--submit,
.mdc-survey input[type="submit"],
.mdc-survey button[type="submit"] {
  background: #c8102e;
  color: #ffffff;
  padding: 1rem 2.5rem; /* Increased padding */
  border-radius: 50px;
  border: none;
  font-weight: 700;
  font-size: 1.25rem; /* Increased from 1rem */
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.2);
  display: inline-block;
  text-decoration: none;
}

.mdc-survey .webform-button--next:hover,
.mdc-survey .webform-button--submit:hover,
.mdc-survey input[type="submit"]:hover,
.mdc-survey button[type="submit"]:hover {
  background: #a50d25;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(200, 16, 46, 0.3);
}

.mdc-survey .webform-button--previous {
  background: #6c757d;
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

.mdc-survey .webform-button--previous:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3);
}

/* Button Container */
.mdc-survey .webform-actions {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid #e9ecef;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

/* Messages & Alerts - Larger text */
.mdc-survey .messages {
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  background: #f8f9fa;
  font-size: 1.125rem; /* Added explicit size */
}

.mdc-survey .messages--status {
  background: #e7f3ff;
  border-left-color: #2f6fad;
  color: #1a4d7d;
}

.mdc-survey .messages--warning {
  background: #fff8e1;
  border-left-color: #f57c00;
  color: #8f4700;
}

.mdc-survey .messages--error {
  background: #ffebee;
  border-left-color: #c62828;
  color: #7f0000;
}

.mdc-survey .messages__title {
  display: none;
}

.mdc-survey .webform-message {
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  background: #e7f3ff;
  border-left: 4px solid #2f6fad;
  font-size: 1.125rem; /* Added explicit size */
}

.mdc-survey .webform-message p:last-child {
  margin-bottom: 0;
}

/* Details/Sections */
.mdc-survey details,
.mdc-survey .webform-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e9ecef;
}

.mdc-survey details summary {
  font-size: 1.5rem; /* Increased from 1.25rem */
  font-weight: 700;
  color: #c8102e;
  cursor: pointer;
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.mdc-survey details summary:hover {
  background: rgba(200, 16, 46, 0.05);
}

.mdc-survey details[open] summary {
  margin-bottom: 1.5rem;
}

/* Progress Bar */
.mdc-survey .webform-progress {
  margin-bottom: 2rem;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
}

.mdc-survey .webform-progress-bar {
  height: 14px; /* Increased from 12px */
  background: #e9ecef;
  border-radius: 50px;
  overflow: hidden;
  margin: 1rem 0;
}

.mdc-survey .webform-progress-bar .bar {
  height: 100%;
  background: linear-gradient(90deg, #c8102e 0%, #a50d25 100%);
  transition: width 0.4s ease;
  border-radius: 50px;
}

.mdc-survey .webform-progress-percentage {
  font-weight: 700;
  color: #c8102e;
  font-size: 1.25rem; /* Increased from 1.1rem */
}

/* Conditional Fields - Smooth Transitions */
.mdc-survey .form-item {
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* Error Styling */
.mdc-survey .form-item--error input,
.mdc-survey .form-item--error textarea,
.mdc-survey .form-item--error select {
  border-color: #c62828;
}

.mdc-survey .form-item--error label {
  color: #c62828;
}

.mdc-survey .form-item .error {
  color: #c62828;
  font-size: 1rem; /* Increased from 0.9rem */
  margin-top: 0.4rem;
  display: block;
  font-weight: 600;
}

/* Likert Tables */
.mdc-survey table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 1.125rem; /* Added explicit size */
}

.mdc-survey table th,
.mdc-survey table td {
  padding: 0.875rem; /* Increased padding */
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.mdc-survey table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.mdc-survey table tr:last-child td {
  border-bottom: none;
}

.mdc-survey table tr:hover {
  background: #f8f9fa;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .mdc-survey {
    margin: 1rem;
    padding: 1.5rem 1rem;
    font-size: 1.0625rem; /* Slightly smaller on mobile but still larger than default */
  }
  
  .mdc-survey h1,
  .mdc-survey .webform-wizard-page-title {
    font-size: 1.75rem;
  }
  
  .mdc-survey h2 {
    font-size: 1.5rem;
  }
  
  .mdc-survey .webform-actions {
    flex-direction: column-reverse;
  }
  
  .mdc-survey .webform-button--next,
  .mdc-survey .webform-button--previous,
  .mdc-survey .webform-button--submit,
  .mdc-survey input[type="submit"],
  .mdc-survey button[type="submit"] {
    width: 100%;
    text-align: center;
  }
  
  .mdc-survey .logo img {
    max-width: 200px;
  }
}

/* Print Styles */
@media print {
  .mdc-survey {
    box-shadow: none;
    margin: 0;
  }
  
  .mdc-survey .webform-button--next,
  .mdc-survey .webform-button--previous {
    display: none;
  }
}

/* Focus visible for accessibility */
.mdc-survey *:focus-visible {
  outline: 3px solid #c8102e;
  outline-offset: 2px;
}