/**
 * Responsive design styles for SIA Radio Training Simulator
 */

/* Base responsive adjustments */
@media (max-width: 1024px) {
  .content-container {
    max-width: 90%;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .content-container {
    max-width: 95%;
    padding: 1.25rem;
    margin: 0.75rem auto;
  }
  
  h1 {
    font-size: 1.75rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  .nav-tabs {
    flex-wrap: wrap;
  }
  
  .tab-button {
    flex: 1 1 calc(50% - 0.5rem);
    margin-bottom: 0.5rem;
    min-width: 120px;
  }
}

@media (max-width: 640px) {
  .content-container {
    max-width: 100%;
    padding: 1rem;
    margin: 0.5rem auto;
    border-radius: 0.75rem;
  }
  
  h1 {
    font-size: 1.5rem !important;
  }
  
  h2 {
    font-size: 1.25rem !important;
  }
  
  .tab-button {
    flex: 1 1 100%;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  
  /* Adjust header layout */
  header {
    padding-right: 2.5rem; /* Make room for keyboard help button */
  }
  
  /* Adjust flashcards */
  .flashcard {
    height: 200px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  /* Adjust quiz options */
  .quiz-option {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  /* Adjust call structure components */
  .call-component {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem;
  }
  
  .drop-zone {
    min-height: 3rem;
    margin-bottom: 0.5rem;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  /* Increase tap target sizes */
  button, 
  .tab-button,
  .quiz-option,
  .response-option,
  .call-component {
    min-height: 44px; /* Apple's recommended minimum touch target size */
  }
  
  /* Add more space between interactive elements */
  .quiz-option,
  .response-option {
    margin-bottom: 0.75rem;
  }
  
  /* Make drag and drop more touch-friendly */
  .call-component {
    padding: 0.75rem 1rem;
  }
  
  .drop-zone {
    min-height: 3.5rem;
    margin-bottom: 0.75rem;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .content-container {
    padding: 0.75rem;
    margin: 0.5rem auto;
  }
  
  header {
    margin-bottom: 0.75rem !important;
  }
  
  h1 {
    font-size: 1.25rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  .nav-tabs {
    margin-bottom: 0.75rem;
  }
  
  /* Optimize for horizontal space */
  .flashcard-container {
    max-width: 50%;
    margin: 0 auto;
  }
  
  /* Two-column layout for quiz options */
  #options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .quiz-option {
    flex: 1 1 calc(50% - 0.5rem);
    margin-bottom: 0;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  /* Already dark themed, but could add specific dark mode adjustments here */
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  #three-bg {
    display: none;
  }
  
  .content-container {
    background: white;
    box-shadow: none;
    margin: 0;
    padding: 1cm;
  }
  
  .nav-tabs,
  button:not(.print-button) {
    display: none;
  }
}
