/* ダッシュボード用カスタムCSS */

/* ===== RESPONSIVE DESIGN ===== */

/* 入居者別喫食率グラフの横スクロール対応 */
#residentRateChartContainer {
    /* スクロールバーのスタイリング（Webkit系ブラウザ） */
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) rgba(243, 244, 246, 0.5);
}

#residentRateChartContainer::-webkit-scrollbar {
    height: 8px;
}

#residentRateChartContainer::-webkit-scrollbar-track {
    background: rgba(243, 244, 246, 0.5);
    border-radius: 4px;
}

#residentRateChartContainer::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 4px;
}

#residentRateChartContainer::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.7);
}

/* ===== TOUCH OPTIMIZATION ===== */

/* タッチデバイス用の最適化 */
@media (hover: none) and (pointer: coarse) {
    /* タップ可能領域の最小サイズ: 44x44px (Apple HIG) */
    button, 
    a,
    .clickable {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* タップ時のハイライト無効化 */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* スクロールの慣性 */
    .overflow-x-auto,
    .overflow-y-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    /* タップ領域の視覚的フィードバック */
    button:active,
    a:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* スマートフォン横向き対応 */
@media (max-height: 500px) and (orientation: landscape) {
    /* ヘッダー縮小 */
    header {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* グラフ高さ調整 */
    .relative.h-48,
    .relative.h-56,
    .relative.h-64 {
        height: 150px !important;
    }
    
    /* クイックアクションボタン縮小 */
    .min-h-\[80px\],
    .min-h-\[100px\] {
        min-height: 60px !important;
    }
}

/* ===== ACCESSIBILITY ===== */

/* フォーカス可視化 */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* フォーカス時のスキップリンク表示 */
.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    padding: 1rem;
    background: #3b82f6;
    color: white;
}

/* ===== PRINT OPTIMIZATION ===== */

@media print {
    /* ヘッダー・ナビゲーション非表示 */
    header,
    nav,
    button {
        display: none !important;
    }
    
    /* グラフを見やすく */
    .bg-white {
        border: 1px solid #e5e7eb;
    }
    
    /* ページブレーク制御 */
    .bg-white.rounded-lg.shadow {
        page-break-inside: avoid;
    }
}
