/* PulseQR Custom Styles */

/* High contrast emergency theme */
.emergency-page {
  font-size: 18px;
  line-height: 1.6;
}

.emergency-page h1,
.emergency-page h2,
.emergency-page h3 {
  font-weight: bold;
}

/* Emergency buttons with enhanced visibility */
.emergency-btn {
  font-size: 1.25rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  min-height: 60px;
}

.emergency-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.emergency-btn-911 {
  background-color: #dc2626;
  color: white;
}

.emergency-btn-911:hover {
  background-color: #b91c1c;
}

.emergency-btn-ice {
  background-color: #2563eb;
  color: white;
}

.emergency-btn-ice:hover {
  background-color: #1d4ed8;
}

/* Medical info cards */
.medical-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.condition-card {
  background-color: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.allergy-card {
  background-color: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 1rem;
  border-radius: 0.5rem;
}

.medication-card {
  background-color: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 1rem;
  border-radius: 0.5rem;
}

.device-card {
  background-color: #f3e8ff;
  border-left: 4px solid #8b5cf6;
  padding: 1rem;
  border-radius: 0.5rem;
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
  .emergency-btn {
    transition: none;
  }
  
  .emergency-btn:hover {
    transform: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .medical-card {
    border: 2px solid #000;
  }
  
  .emergency-btn {
    border: 2px solid #000;
  }
}

/* Print styles for emergency cards */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .medical-card {
    border: 1px solid #000;
    break-inside: avoid;
    margin-bottom: 1rem;
  }
  
  .emergency-btn {
    border: 2px solid #000;
    background: white !important;
    color: black !important;
  }
}

/* Form enhancements */
.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
  border-bottom: none;
}

.form-label-required::after {
  content: " *";
  color: #dc2626;
}

/* Dashboard improvements */
.dashboard-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: box-shadow 0.3s ease;
}

.dashboard-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.qr-display {
  text-align: center;
  padding: 2rem;
}

.qr-placeholder {
  width: 200px;
  height: 200px;
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background-color: #f9fafb;
}

/* Audit log styling */
.audit-log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.audit-log-event {
  font-weight: 500;
  color: #374151;
}

.audit-log-time {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .emergency-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 1.25rem;
  }
  
  .medical-card {
    padding: 1rem;
  }
  
  .dashboard-card {
    padding: 1rem;
  }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  border: 2px solid #f3f4f6;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 0.5rem;
}

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

/* Error states */
.error-message {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.success-message {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

/* Emergency header styling */
.emergency-header {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.emergency-header h1 {
  font-size: 1.75rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Contact card styling */
.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.contact-card:last-child {
  border-bottom: none;
}

.contact-info h4 {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.contact-info p {
  font-size: 0.875rem;
  color: #6b7280;
}

.contact-phone {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.contact-phone:hover {
  background-color: #bfdbfe;
}