/**
 * responsive.css - Mobile-first overrides, touch target sizing, and responsive grid layouts
 */

/* Desktop & Large Screens */
@media (min-width: 1024px) {
  .exam-question-card.split-layout {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* Tablet / Medium Screens */
@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.75rem 1.25rem;
  }

  .exam-question-card.split-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .reading-passage-pane {
    max-height: 380px;
  }

  .scratchpad-drawer {
    width: 100%;
    right: 0;
    left: 0;
    height: 60vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .formula-card {
    max-height: 90vh;
  }
}

/* Mobile Screens (Phones / iPhone Safari) */
@media (max-width: 640px) {
  :root {
    --header-height: 56px;
  }

  .app-main {
    padding: 1rem 0.75rem 4rem;
  }

  .header-inner {
    padding: 0 0.75rem;
  }

  .main-nav {
    display: none; /* Mobile navigation simplified */
  }

  .brand-grade {
    display: none;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions button {
    width: 100%;
  }

  .subject-grid {
    grid-template-columns: 1fr;
  }

  .delprov-header-box {
    padding: 1.25rem 1rem;
  }

  .delprov-options-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .mode-toggle-group, .difficulty-filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .custom-select {
    width: 100%;
  }

  .delprov-card {
    padding: 1.25rem 1rem;
  }

  .dp-card-header {
    flex-wrap: wrap;
  }

  .dp-time-badge {
    margin-left: auto;
  }

  .dp-card-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .dp-card-actions button {
    width: 100%;
  }

  .exam-question-card {
    padding: 1.25rem 1rem;
  }

  .hide-mobile {
    display: none !important;
  }

  .exam-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.08);
  }

  .question-navigator-pills {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav-btn-group {
    order: 1;
  }

  .submit-btn-group {
    order: 2;
  }

  .view-exam {
    padding-bottom: 5rem;
  }

  .results-summary-cards {
    grid-template-columns: 1fr;
  }

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

  .results-actions button {
    width: 100%;
  }

  .pl-grid {
    flex-direction: column;
    gap: 0.6rem;
  }

  .rubric-table th, .rubric-table td {
    padding: 0.5rem;
  }

  /* Safe tap target sizes */
  button, .mc-option-card, .btn-tool-pill {
    min-height: 44px;
  }
}
