/* 共通スタイル - 全ページで使用 */

/* 基本フォントサイズを小さく */
body {
    font-size: 0.875rem;
    line-height: 1.4;
}

h1, .h1 { font-size: 1.5rem; }
h2, .h2 { font-size: 1.35rem; }
h3, .h3 { font-size: 1.2rem; }
h4, .h4 { font-size: 1.1rem; }
h5, .h5 { font-size: 1rem; }
h6, .h6 { font-size: 0.9rem; }

/* ヘッダー共通スタイル */
#mainHeader {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background-color: #ffffff !important;
    border-bottom: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0.25rem 0 !important; /* ヘッダーを狭める - 全ページで統一 */
    transition: all 0.3s ease;
}

/* ヘッダー内のcontainer-fluidのpaddingを統一 */
#mainHeader .container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ナビゲーション共通スタイル */
.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
}

/* カード共通スタイル */
.card {
    border: none;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.card-body {
    padding: 1rem;
}

.card-header {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* ボタン共通スタイル */
.btn {
    transition: all 0.3s ease;
    border-radius: 6px;
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* バッジ共通スタイル */
.badge {
    font-size: 0.65rem;
    padding: 0.35em 0.6em;
}

/* テーブル共通スタイル */
.table {
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    padding: 0.5rem;
    font-size: 0.75rem;
}

.table tbody td {
    padding: 0.5rem;
    vertical-align: middle;
}

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

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

/* レスポンシブ対応 */
@media (max-width: 768px) {
    body {
        font-size: 0.8rem;
    }
    
    /* コンテナのパディングはmain.cssで統一管理 */
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* ヘッダーのモバイル対応 */
    #mainHeader .container-fluid {
        padding: 0 0.5rem !important; /* 上下のpaddingは0.25remを維持 */
    }
    
    #mainHeader .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }
    
    #mainHeader .d-flex.align-items-center:last-child {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    #mainHeader .btn {
        font-size: 0.7rem;
        padding: 0.375rem 0.5rem;
        flex: 1 1 auto;
        min-width: calc(50% - 0.25rem);
    }
    
    #mainHeader .btn i {
        margin-right: 0.25rem;
    }
    
    #mainHeader h1.h4 {
        font-size: 1rem;
    }
    
    .d-flex.align-items-center .btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.375rem;
    }
}

/* ローディングスピナー */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* ステータスアイコン */
.bg-success { background-color: #28a745 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-primary { background-color: #007bff !important; }

/* カスタム色 */
.bg-purple { background-color: #9146ff !important; }
.text-purple { color: #9146ff !important; }

/* テキスト色 */
.text-primary { color: #007bff !important; }
.text-secondary { color: #6c757d !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #17a2b8 !important; }
.text-muted { color: #6c757d !important; }

/* Buy Me a Coffee スタイル */
.buy-me-a-coffee-container {
    margin-top: 1rem;
    text-align: center;
}

.buy-me-a-coffee-container iframe {
    border: none;
    max-width: 100%;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .buy-me-a-coffee-container {
        margin-top: 0.75rem;
    }
}
