/* Report Page Styles */
.report-page {
  min-height: 100vh;
  background-color: #f8f9fb;
  padding: 4rem 0;
  margin-top: 64px; /* Account for fixed navbar */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
}

.page-header .description {
  font-size: 1.125rem;
  color: #4a5568;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Form Styles */
.report-form {
  background-color: white;
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-top: 2.5rem;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 1rem;
  padding-bottom: 0;
}

.form-section h2 {
  color: #2d3748;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  position: relative;
  display: inline-block;
}

.form-section h2:after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: #3182ce;
  border-radius: 3px;
}

/* Form Fields */
.form-group {
  margin-bottom: 1.75rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.625rem;
  color: #4a5568;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  color: #2d3748;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  background-color: #fff;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: #cbd5e0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%234A5568' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Contact Methods */
.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.contact-method:hover {
  background-color: #edf2f7;
}

.contact-method input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #3182ce;
  cursor: pointer;
}

.contact-method span {
  font-size: 0.95rem;
  color: #4a5568;
  font-weight: 500;
}

/* File Upload */
.file-upload {
  border: 2px dashed #e2e8f0;
  border-radius: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
  background-color: #f7fafc;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.file-upload:hover {
  border-color: #cbd5e0;
  background-color: #edf2f7;
}

.file-upload input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload:before {
  content: 'Drag files here or click to upload';
  color: #3182ce;
  font-weight: 500;
  display: block;
  margin-bottom: 0.75rem;
}

.file-upload:after {
  content: '';
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%233182ce' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 0.75rem;
}

.file-info {
  color: #718096;
  font-size: 0.875rem;
  margin-top: 0.75rem;
  line-height: 1.5;
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.preview-item {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-item img,
.preview-item video {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.preview-item audio {
  width: 100%;
  padding: 0.5rem;
}

.preview-item .remove-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background-color: rgba(255, 255, 255, 0.9);
  color: #e53e3e;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.2s;
}

.preview-item .remove-btn:hover {
  background-color: #fff;
  transform: scale(1.1);
}

.preview-item .file-type {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.25rem 0.5rem;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.75rem;
  text-align: center;
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: #3182ce;
  color: white;
  box-shadow: 0 2px 4px rgba(49, 130, 206, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
  transition: left 0.7s;
}

.btn-primary:hover {
  background-color: #2b6cb0;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(43, 108, 176, 0.3);
}

.btn-primary:hover:before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
}

/* Required Field Indicator */
.form-group label[for]:after {
  content: "*";
  color: #e53e3e;
  margin-left: 0.25rem;
}

/* Optional field marker */
.form-group:has(input:not([required])) label[for]:after,
.form-group:has(textarea:not([required])) label[for]:after,
.form-group:has(select:not([required])) label[for]:after {
  content: " (optional)";
  color: #718096;
  font-size: 0.85rem;
  font-weight: normal;
  margin-left: 0.25rem;
}

/* Focus within for groups */
.form-group:focus-within label {
  color: #3182ce;
}

/* Error state */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #e53e3e;
}

.form-group.error .error-message {
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Success state */
.form-group.success input,
.form-group.success select,
.form-group.success textarea {
  border-color: #38a169;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .report-page {
    padding: 3rem 0;
  }

  .report-form {
    padding: 2rem 1.5rem;
  }

  .page-header h1 {
    font-size: 1.875rem;
  }

  .page-header .description {
    font-size: 1rem;
  }

  .form-section h2 {
    font-size: 1.25rem;
  }

  .contact-methods {
    flex-direction: column;
    gap: 0.75rem;
  }

  .contact-method {
    width: 100%;
  }

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

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .report-page {
    padding: 2rem 0;
  }

  .report-form {
    padding: 1.5rem 1.25rem;
    margin-top: 1.5rem;
  }

  .form-section {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  .upload-preview {
    grid-template-columns: 1fr 1fr;
  }
}

/* Accessibility Improvements */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(49, 130, 206, 0.4);
  outline-offset: 2px;
}

/* Form field animations */
.form-group input,
.form-group select,
.form-group textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  transform: translateY(-1px);
}

/* Emergency level custom styling */
#emergency-level option[value="critical"] {
  color: #e53e3e;
}

#emergency-level option[value="high"] {
  color: #dd6b20;
}

#emergency-level option[value="medium"] {
  color: #d69e2e;
}

#emergency-level option[value="low"] {
  color: #38a169;
}

/* Custom highlight and selection */
::selection {
  background-color: rgba(49, 130, 206, 0.2);
}