/* client/client-app.css */

body {
    font-family: "Biz UDPGothic", "Noto Sans JP", sans-serif;
}

/* プルトゥリフレッシュ無効化 */
body, html {
    overscroll-behavior-y: contain;
}

/* Vue.js クローク */
[v-cloak] {
    display: none;
}

/* ============================================
   共通スライドパネルスタイル（検索・詳細情報）
   ============================================ */

/* 基本スタイル */
.slide-panel {
    max-height: 100vh;
    overflow-y: auto;
}

/* Vue transition: 表示時のアニメーション */
.panel-slide-enter-active {
    animation: slideDownIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Vue transition: 非表示時のアニメーション */
.panel-slide-leave-active {
    animation: slideUpOut 0.3s cubic-bezier(0.4, 0, 0.6, 1);
}

/* 上からスルスルと降りてくる */
@keyframes slideDownIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 上にスーッと上がって消える */
@keyframes slideUpOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* スムーズスクロール（パネル用） */
.slide-panel::-webkit-scrollbar {
    width: 6px;
}

.slide-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.slide-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.slide-panel::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* タッチ操作のフィードバック */
.cursor-pointer {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* ヘッダーのタッチエリア 拡大する場合は 1.5rem など */
header.cursor-pointer {
    padding-bottom: 1rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* フィールド用スタイル */
.field-label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
}

.field-description {
    font-size: 0.875rem;
    color: #4b5563;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e3a8a;
}

.section-description {
    font-size: 0.875rem;
    color: #1e40af;
    margin-top: 0.5rem;
}

.subsection-title {
    font-weight: 500;
    color: #065f46;
}

.subsection-description {
    font-size: 0.875rem;
    color: #047857;
    margin-top: 0.25rem;
}

/* スライダーカスタマイズ */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
}

/* フォーカススタイル */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* カードホバーエフェクト */
.hover\:shadow-xl {
    transition: all 0.2s ease-in-out;
}

/* アニメーション */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* テキスト省略 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* プリント用スタイル */
@media print {
    header,
    button,
    .bg-yellow-50,
    .shadow-md,
    .shadow-lg {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .bg-gradient-to-br {
        background: white !important;
    }
}

/* アクセシビリティ改善 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* カスタムチェックボックス・ラジオボタン */
input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* グラデーション背景 */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
}

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* タッチデバイス最適化 - ラジオ/チェックボックスは除外 */
@media (hover: none) and (pointer: coarse) {
    button,
    a,
    input[type="text"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        min-height: 44px;
    }
    
    button,
    a {
        min-width: 44px;
    }
}

/* ローディングインジケーター */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* カード影エフェクト */
.card-shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card-shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* トランジション */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* モーダル・ポップアップ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-in-out;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* オフラインインジケーター */
.offline-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ef4444;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideUp 0.3s ease-in-out;
}

/* ダークモード対応（将来の拡張用） */
@media (prefers-color-scheme: dark) {
    /* ダークモードのスタイルをここに追加可能 */
}