/**
 * Blokkskjema - Responsive Styles
 * Mobile-first breakpoints
 */

/* ============================================
   TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
  .bs-blocks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   MOBILE LANDSCAPE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  :root {
    --space-6: 1.25rem;
    --space-8: 1.5rem;
    --space-10: 2rem;
  }

  .container {
    padding: 0 var(--space-4);
  }

  /* Header */
  .bs-header {
    padding: var(--space-8) 0 var(--space-6);
  }

  .bs-header__title {
    font-size: var(--text-2xl);
  }

  .bs-header__subtitle {
    font-size: var(--text-base);
  }

  /* Controls */
  .bs-controls__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .bs-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .bs-filter-divider {
    display: none;
  }

  .bs-filter-dropdown {
    width: 100%;
  }

  .bs-filter-dropdown__btn {
    width: 100%;
    min-width: unset;
  }

  .bs-filter-dropdown__menu {
    width: 100%;
  }

  /* Blocks */
  .bs-blocks-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .bs-block__fag-liste {
    min-height: auto;
  }

  /* Modal */
  .bs-modal {
    padding: 10px;
  }

  #bs-modal-content {
    max-height: none;
    border-radius: var(--border-radius-lg);
  }

  .bs-modal__hero {
    height: 160px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  }

  .bs-modal__hero.no-image {
    padding: 20px;
  }

  .bs-modal__hero-content {
    padding: 15px 20px;
  }

  .bs-modal__hero-content h2 {
    font-size: 1.4rem;
  }

  .bs-modal__body {
    padding: 20px;
  }

  .bs-modal__vimeo {
    margin: 15px;
  }
}

/* ============================================
   MOBILE PORTRAIT (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  .bs-header__badge {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
  }

  .bs-filter-dropdown__btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  .bs-filter-dropdown__item {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  .bs-block__header {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .bs-blokk-fag-item {
    padding: 0.15rem 0.3rem;
    font-size: 0.7rem;
  }

  .bs-blokk-fag-timer {
    font-size: 0.65rem;
  }

  .bs-fag-info-btn {
    min-width: 28px;
    min-height: 28px;
    padding: 6px;
  }

  .bs-fag-info-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  .bs-blokk-fag-item:hover {
    border-color: var(--border-subtle);
    box-shadow: none;
  }

  .bs-blokk-fag-item:active {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
  }

  .bs-filter-dropdown__btn:hover {
    background: var(--bg-card);
    border-color: var(--border-default);
  }

  .bs-filter-dropdown__btn:active {
    background: var(--bg-subtle);
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .bs-controls,
  .bs-modal-backdrop,
  .bs-modal,
  .bs-footer {
    display: none !important;
  }

  .bs-header {
    background: none;
    border: none;
  }

  .bs-blocks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .bs-block {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .bs-block--disabled {
    display: block !important;
    opacity: 0.5;
  }
}
