/**
 * Cassiopeia HTSprout - 無障礙增強與列印樣式
 *
 * 包含：
 * - 鍵盤焦點指示器增強
 * - 高對比模式支援
 * - 減少動畫支援
 * - 列印樣式
 *
 * @package     Joomla.Site
 * @subpackage  Templates.cassiopeia_htsprout
 * @copyright   Copyright (C) 2026 HTSprout. All rights reserved.
 * @license     GNU General Public License version 2 or later
 */

/* ============================================
   6. 無障礙焦點增強
   ============================================ */
body.keyboard-nav *:focus {
  outline: 3px solid var(--focus-color) !important;
  outline-offset: 2px !important;
}

/* ============================================
   8. 高對比模式支援
   ============================================ */
@media (prefers-contrast: high) {
  .btn {
    border-width: 3px;
  }
}

/* ============================================
   9. 減少動畫（尊重使用者偏好）
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 列印樣式 ── */

/* ============================================
   11. 列印樣式
   ============================================ */
@media print {
  a[href]::after {
    content: " (" attr(href) ")";
  }

  .no-print {
    display: none !important;
  }

  /* 列印時新聞列表 */
  .news-item {
    break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: 8px;
  }

  .news-item__date--badge {
    background: #f0f0f0 !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@media print {
  .article-gallery__arrows {
    display: none;
  }

  .article-gallery__track {
    flex-wrap: wrap;
    overflow: visible;
    height: auto;
  }
}

@media print {
  .gallery-lightbox {
    display: none !important;
  }
}
