/**
 * カスタムスタイル
 */

/* 基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* 入力フィールド */
.input-field {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-field-sm {
    width: 100%;
    padding: 0.375rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.input-field-sm:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* ボタン */
.btn-primary {
    padding: 0.625rem 1.25rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.btn-secondary-sm {
    padding: 0.375rem 0.75rem;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-secondary-sm:hover {
    background-color: #e5e7eb;
}

.btn-danger-sm {
    padding: 0.375rem 0.75rem;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-danger-sm:hover {
    background-color: #dc2626;
}

.btn-chart {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-chart-active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-chart-inactive {
    background-color: white;
    color: #374151;
    border-color: #d1d5db;
}

.btn-chart-inactive:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

/* テーブル */
.table-header {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.table-cell {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    white-space: nowrap;
}

/* チャートコンテナ */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* レスポンシブ調整 */
@media (max-width: 1024px) {
    .chart-container {
        height: 300px;
    }
}

@media (max-width: 640px) {
    .chart-container {
        height: 250px;
    }
    
    .table-header,
    .table-cell {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    /* スマホでのスクロールヒント */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    .overflow-x-auto::after {
        content: '⇔ スワイプで見れます';
        position: absolute;
        right: 0;
        bottom: 0;
        background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        color: #6b7280;
        pointer-events: none;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}
