/* ==========================================================================
   Wortschatz B1 - Responsive Design & Mobile Ergonomics
   ========================================================================== */

@media (max-width: 900px) {
  .search-wrapper {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 60px;
  }

  .categories-bar-wrapper {
    top: 60px;
  }

  .brand-logo .logo-text {
    font-size: 1.05rem;
  }

  .search-wrapper {
    display: none; /* Accessible from dedicated search tab or modal on mobile */
  }

  .stats-grid-row {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Transform table grid to mobile card layout */
  .vocab-table-header {
    display: none;
  }

  .vocab-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1.1rem 1rem;
    position: relative;
  }

  .vocab-row .row-num {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
  }

  .vocab-row .word-ar {
    font-size: 1.15rem;
    padding-left: 2.5rem;
  }

  .vocab-row .word-de-container,
  .vocab-row .word-ar-container {
    justify-content: flex-start;
  }

  .vocab-row .word-de,
  .vocab-row .word-ar-container .word-ar {
    font-size: 1.1rem;
    padding: 0.45rem 1rem;
    width: 100%;
    justify-content: center;
  }

  .row-actions {
    justify-content: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.25rem;
  }

  .action-btn-correct,
  .action-btn-wrong {
    width: 100%;
    height: 48px; /* Large touch target */
    font-size: 1.3rem;
    border-radius: var(--radius-md);
  }

  .modal-content {
    padding: 1.25rem;
    width: 95%;
  }

  .notifications-dropdown {
    width: 300px;
    right: auto;
    left: -60px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-grid-row {
    grid-template-columns: 1fr 1fr;
  }

  .stat-box .stat-value {
    font-size: 1.2rem;
  }

  .topic-title-group h2 {
    font-size: 1.25rem;
  }

  .completed-banner-card {
    padding: 2rem 1rem;
  }

  .completed-icon {
    font-size: 3rem;
  }
}
