/**
 * ========================================
 * 12-responsive.css
 * ========================================
 * Назначение: Адаптивность для разных устройств
 * Размер: ~250 строк
 * ========================================
 */

/* ========== Mobile (до 640px) ========== */
@media (max-width: 640px) {
  /* Header */
  .header {
    height: 60px;
  }
  
  .header__title {
    font-size: var(--text-lg);
  }
  
  .header__version {
    display: none;
  }
  
  /* Hero Section */
  .hero {
    padding: var(--spacing-2xl) 0;
  }
  
  .hero__title {
    font-size: var(--text-2xl);
  }
  
  .hero__subtitle {
    font-size: var(--text-base);
  }
  
  /* Upload Zone */
  .upload-zone {
    height: 300px;
    max-width: 100%;
  }
  
  .upload-zone__icon {
    width: 60px;
    height: 60px;
  }
  
  .upload-zone__title {
    font-size: var(--text-base);
  }
  
  .upload-zone__button {
    width: 100%;
  }
  
  /* File Info */
  .file-info__process {
    font-size: var(--text-base);
  }
  
  /* Progress Section */
  .progress-section {
    padding: var(--spacing-lg);
  }
  
  .progress-section__title {
    font-size: var(--text-xl);
  }
  
  .progress-percentage {
    font-size: var(--text-2xl);
  }
  
  .progress-step__title {
    font-size: var(--text-sm);
  }
  
  /* Result Section */
  .result-section {
    padding: var(--spacing-lg);
  }
  
  .result__title {
    font-size: var(--text-2xl);
  }
  
  .result__info {
    grid-template-columns: 1fr;
  }
  
  .result__actions {
    flex-direction: column;
  }
  
  .result__button--primary,
  .result__button--secondary {
    width: 100%;
    min-width: auto;
  }
  
  /* History Sidebar */
  .history-sidebar {
    width: 100%;
    top: 60px;
    height: calc(100vh - 60px);
  }
  
  /* Modal */
  .modal {
    width: 95%;
    padding: var(--spacing-lg);
  }
  
  .modal__title {
    font-size: var(--text-xl);
  }
  
  .modal__footer {
    flex-direction: column;
  }
  
  .modal__button--primary,
  .modal__button--secondary {
    width: 100%;
  }
  
  /* Grid */
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  /* Spacing */
  .section {
    padding: var(--spacing-xl) 0;
  }
  
  /* Typography */
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
}

/* ========== Tablet (641px - 1024px) ========== */
@media (min-width: 641px) and (max-width: 1024px) {
  /* Container */
  .container {
    max-width: 90%;
  }
  
  /* Upload Zone */
  .upload-zone {
    max-width: 500px;
  }
  
  /* Result Info */
  .result__info {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* History Sidebar */
  .history-sidebar {
    width: 300px;
  }
  
  /* Grid */
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  /* Spacing */
  :root {
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2.25rem;
    --spacing-3xl: 3rem;
  }
}

/* ========== Desktop (1025px+) ========== */
@media (min-width: 1025px) {
  /* Максимальные размеры уже заданы в основных стилях */
  
  /* Grid */
  .grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  /* Hover эффекты активны по умолчанию */
}

/* ========== Touch Device Detection ========== */
@media (hover: none) {
  /* Убираем hover эффекты для touch устройств */
  .upload-zone:hover {
    transform: none;
    box-shadow: none;
  }
  
  .result__card:hover {
    transform: none;
  }
  
  .history-item:hover {
    transform: none;
  }
  
  /* Увеличиваем размер кнопок для удобства */
  button,
  .header__theme-toggle,
  .modal__close,
  .file-info__remove {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ========== Landscape Mode (Mobile) ========== */
@media (max-width: 1024px) and (orientation: landscape) {
  .main {
    padding-top: 80px;
  }
  
  .upload-zone {
    height: 250px;
  }
  
  .history-sidebar {
    width: 280px;
  }
}

/* ========== Print Styles ========== */
@media print {
  .header,
  .history-sidebar,
  .history-toggle,
  .modal-backdrop,
  .upload-zone,
  .file-info__process {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .result-section,
  .progress-section {
    border: 1px solid black;
    page-break-inside: avoid;
  }
}

