/* RettX Public SOS Page - Standalone Styles */
/* No dependencies - system fonts only */

:root {
  --sos-primary: #6B2D8B;
  --sos-accent: #E91E63;
  --sos-gradient-start: #6B2D8B;
  --sos-gradient-end: #E91E63;
  --sos-text: #333333;
  --sos-text-light: #666666;
  --sos-bg: #FAFAFA;
  --sos-white: #FFFFFF;
  --sos-border: #E0E0E0;
  --sos-danger: #D32F2F;
  --sos-warning: #F57C00;
  --sos-success: #388E3C;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--sos-text);
  background-color: var(--sos-bg);
  min-height: 100vh;
}

/* Header */
.sos-header {
  background: linear-gradient(135deg, var(--sos-gradient-start) 0%, var(--sos-gradient-end) 100%);
  color: var(--sos-white);
  padding: 1rem 1rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: flex;
  justify-content: center;
}

.brand-logo {
  height: 48px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

@media (min-width: 480px) {
  .brand-logo {
    height: 56px;
    max-width: 240px;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--sos-white);
  color: var(--sos-danger);
  padding: 0.35rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.pill span {
  font-size: 0.9rem;
}

.sos-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.sos-logo-text {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sos-logo-text span {
  color: rgba(255, 255, 255, 0.9);
}

.sos-tagline {
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 300;
}

.sos-badge {
  display: inline-block;
  background: var(--sos-white);
  color: var(--sos-danger);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 0.75rem;
  letter-spacing: 0.5px;
}

/* Main Content */
.sos-main {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

/* Patient Card */
.sos-patient-card {
  background: var(--sos-white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 1rem;
}

.sos-patient-header {
  background: linear-gradient(135deg, var(--sos-gradient-start) 0%, var(--sos-gradient-end) 100%);
  color: var(--sos-white);
  padding: 1rem;
}

.sos-patient-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.sos-patient-id {
  font-size: 0.875rem;
  opacity: 0.9;
}

.sos-patient-body {
  padding: 1rem;
}

.sos-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--sos-border);
}

.sos-info-row:last-child {
  border-bottom: none;
}

.sos-info-label {
  color: var(--sos-text-light);
  font-size: 0.875rem;
}

.sos-info-value {
  font-weight: 500;
  text-align: right;
}

/* Section Cards */
.sos-section {
  background: var(--sos-white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  overflow: hidden;
}

.sos-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  font-weight: 600;
  font-size: 1rem;
  border-bottom: 1px solid var(--sos-border);
}

.sos-section-header--danger {
  background: #FFEBEE;
  color: var(--sos-danger);
}

.sos-section-header--warning {
  background: #FFF3E0;
  color: var(--sos-warning);
}

.sos-section-header--info {
  background: #F3E5F5;
  color: var(--sos-primary);
}

.sos-section-header--success {
  background: #E8F5E9;
  color: var(--sos-success);
}

.sos-section-body {
  padding: 1rem;
}

.sos-section-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* Lists */
.sos-list {
  list-style: none;
}

.sos-list-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--sos-border);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.sos-list-item:last-child {
  border-bottom: none;
}

.sos-list-bullet {
  color: var(--sos-primary);
  font-weight: bold;
}

/* Contact Card */
.sos-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--sos-border);
}

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

.sos-contact-icon {
  width: 40px;
  height: 40px;
  background: var(--sos-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sos-contact-info {
  flex: 1;
}

.sos-contact-name {
  font-weight: 500;
}

.sos-contact-role {
  font-size: 0.75rem;
  color: var(--sos-text-light);
}

.sos-contact-phone {
  font-weight: 600;
  color: var(--sos-primary);
  text-decoration: none;
}

.sos-contact-phone:hover {
  text-decoration: underline;
}

/* Call Button */
.sos-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  background: var(--sos-success);
  color: var(--sos-white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin-top: 0.5rem;
}

.sos-call-btn:hover {
  opacity: 0.9;
}

/* Footer */
.sos-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--sos-text-light);
  font-size: 0.75rem;
}

.sos-footer-link {
  color: var(--sos-primary);
  text-decoration: none;
}

.sos-footer-link:hover {
  text-decoration: underline;
}

/* Diagnosis highlight */
.sos-diagnosis {
  background: linear-gradient(135deg, var(--sos-gradient-start) 0%, var(--sos-gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* Utility */
.sos-text-muted {
  color: var(--sos-text-light);
}

.sos-text-small {
  font-size: 0.875rem;
}

/* Print styles */
@media print {
  .sos-header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .sos-call-btn {
    display: none;
  }
}

/* High contrast / reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --sos-border: #000000;
  }
}