/* Legal Pages Shared Stylesheet - Matching StrideNavigation App Design */

/* CSS Variables matching the mobile app */
:root {
  --ion-color-primary: #3880ff;
  --ion-color-primary-rgb: 56, 128, 255;
  --ion-color-primary-shade: #3171e0;
  --ion-text-color: #000000;
  --ion-color-medium: #92949c;
  --primary-gradient: linear-gradient(135deg, var(--ion-color-primary), var(--ion-color-primary-shade));
  --success-color: #10b981;
  --error-color: #ef4444;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --ion-text-color: #ffffff;
    --ion-color-medium: #9ca3af;
  }
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--ion-text-color);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  }
}

/* Language selector header */
.language-header {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
}

@media (max-width: 400px) {
  .language-header {
    top: 15px;
    right: 15px;
  }
}

/* Main container */
.legal-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  animation: fadeIn 0.5s ease-out;
}

.legal-wrapper {
  width: 100%;
  max-width: 800px;
  animation: slideUp 0.6s ease-out;
}

/* Logo section matching the app */
.logo-section {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: slideDown 0.6s ease-out;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: var(--primary-gradient);
  border-radius: 20px;
  color: white;
  box-shadow: 0 8px 32px rgba(var(--ion-color-primary-rgb), 0.3);
  transform: rotate(-5deg);
  font-size: 2rem;
  font-weight: bold;
}

.logo-icon::before {
  content: 'S';
  transform: rotate(5deg);
}

.app-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ion-text-color);
  margin: 0 0 0.5rem;
  letter-spacing: -0.5px;
}

.app-subtitle {
  font-size: 1rem;
  color: var(--ion-color-medium);
  margin: 0;
}

/* Content card */
.legal-card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 2rem;
  animation: slideUp 0.6s ease-out;
}

@media (prefers-color-scheme: dark) {
  .legal-card {
    background: #2d2d2d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  }
}

.card-header {
  padding: 2.5rem 2rem 1rem;
  text-align: center;
  background: var(--primary-gradient);
  color: white;
}

.card-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.5px;
}

.card-header .last-updated {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
}

.card-content {
  padding: 2rem;
  color: #1a1a1a;
}

@media (prefers-color-scheme: dark) {
  .card-content {
    color: #ffffff;
  }
}

/* Typography */
.card-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ion-color-primary);
  margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--ion-color-primary);
  padding-bottom: 0.5rem;
}

.card-content h2:first-child {
  margin-top: 0;
}

.card-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--ion-text-color);
}

.card-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: inherit;
}

.card-content ul, .card-content ol {
  margin: 0 0 1rem 1.5rem;
}

.card-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Contact info styling */
.contact-info {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border-left: 4px solid var(--ion-color-primary);
}

@media (prefers-color-scheme: dark) {
  .contact-info {
    background: #374151;
  }
}

.contact-info h3 {
  color: var(--ion-color-primary);
  margin-top: 0;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: var(--ion-color-primary);
  text-decoration: none;
  font-weight: 500;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Back button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ion-color-primary);
  background: white;
  border: 2px solid var(--ion-color-primary);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(var(--ion-color-primary-rgb), 0.1);
}

@media (prefers-color-scheme: dark) {
  .back-button {
    background: #2d2d2d;
  }
}

.back-button:hover {
  background: var(--ion-color-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--ion-color-primary-rgb), 0.3);
}


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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .legal-container {
    padding: 1rem 0.5rem;
  }
  
  .legal-card {
    border-radius: 16px;
    margin: 0 0 1rem;
  }
  
  .card-header {
    padding: 2rem 1.5rem 1rem;
  }
  
  .card-header h1 {
    font-size: 1.75rem;
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .card-content h2 {
    font-size: 1.3rem;
  }
  
  .logo-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .app-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 400px) {
  .card-header {
    padding: 1.5rem 1rem 1rem;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .card-header h1 {
    font-size: 1.5rem;
  }
  
  .back-button {
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
  }
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .legal-card {
    box-shadow: none !important;
    border: 1px solid #ddd;
  }
  
  .card-header {
    background: #f8f9fa !important;
    color: black !important;
  }
  
  .back-button {
    display: none;
  }
  
  .logo-section {
    display: none;
  }
}