/* header-style.css */
/* ナビゲーションバー共通スタイル - 黒背景バージョン - 大きなロゴ対応 */

/* ナビゲーションバーの基本スタイル */
header.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background-color: #212529 !important; /* 強制的に黒背景を適用 */
}

/* ナビバーブランド（ロゴ）のスタイル - 大きく */
.navbar-brand {
    padding: 0;
    margin-right: 1.5rem;
}

.navbar-brand img {
    height: 38px !important; /* 必要に応じて高さを調整 */
    width: auto;
}

/* バーの高さを大きなロゴに合わせて調整 */
.navbar-dark {
    min-height: 75px; /* ロゴの高さに合わせてバーの高さを調整 */
}

/* ドロップダウンメニューのホバー効果 */
.navbar .dropdown:hover > .dropdown-menu {
    display: block;
}

/* ドロップダウンメニューのスタイル調整 */
.navbar .dropdown-menu {
    margin-top: 0;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    border: none;
    background-color: #343a40 !important; /* !important を追加 */
    opacity: 1 !important; /* 完全に不透明に */
}

/* Bootstrap 5のドロップダウン対応 */
.navbar .dropdown-menu-dark {
    background-color: #343a40 !important;
    opacity: 1 !important;
}

.navbar .dropdown-item {
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.85);
}

.navbar .dropdown-item:hover, 
.navbar .dropdown-item:focus {
    background-color: #495057;
    color: #fff;
}

/* アクティブなナビゲーション項目のスタイル */
.navbar .nav-link.active {
    color: #fff;
    font-weight: 500;
}

/* アイコンのスタイル */
.navbar .nav-link i {
    margin-right: 0.25rem;
}

/* ナビゲーションリンクのホバー効果 */
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar .nav-link:hover {
    color: #fff;
}

/* モバイル対応 */
@media (max-width: 992px) {
    .navbar .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        margin-bottom: 0.5rem;
        background-color: #343a40 !important; /* 背景色を黒に修正し !important を追加 */
        opacity: 1 !important;
    }
    
    .navbar .navbar-nav {
        padding-top: 0.5rem;
    }
    
    .navbar .navbar-nav .nav-item {
        margin-bottom: 0.25rem;
    }
    
    /* モバイル表示時もロゴを大きく保持 */
    .navbar-brand img {
        max-height: 38px;
    }
}

/* 開発中アイテムのスタイル */
.navbar .dropdown-item.dev {
    position: relative;
    color: rgba(255, 255, 255, 0.6);
}

.navbar .dropdown-item.dev::after {
    content: "開発中";
    font-size: 0.7rem;
    color: #212529;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    position: absolute;
    right: 0.5rem;
}

/* ページタイトル（h1）のサイズ・余白を小さくする - 共通スタイル */
h1 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0.25rem !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* ページタイトル（h2）のサイズ・余白を小さくする */
h2 {
    font-size: 1.5rem !important; /* 通常より小さいサイズ */
    margin-bottom: 0.5rem !important; /* 下余白を少なく */
    margin-top: 0.25rem !important; /* 上余白も非常に少なく */
    padding: 0 !important; /* パディングをなし */
    line-height: 1.2 !important; /* 行の高さも縮小 */
}

/* PC版のコンパクト表示設定 - 共通スタイル拡張 */
@media (min-width: 992px) {
    /* 見出しのサイズ調整 */
    h1 {
        font-size: 1.25rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important; /* PC版ではさらに小さく */
    }
	
	table, .table td, .table th {
	    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
	    font-size: 0.75rem !important; /* = 12px */
	    font-weight: 400 !important;
	  }
    
    /* 商品追加・編集ページ向け特別対応 */
    .container h1.mb-4,
    .row .col-12 h1.mb-4 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* 商品一覧ページの特別対応 - products.html専用 */
    .d-flex.justify-content-between.align-items-center.mb-4 h1 {
        font-size: 1.25rem !important;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
    }
    
    /* 商品一覧ページのマージン調整 - products.html専用 */
    .d-flex.justify-content-between.align-items-center.mb-4 {
        margin-bottom: 0.5rem !important;
    }
    
    /* 商品追加ページのマージン調整 */
    .container .row.mb-4,
    .container-fluid .row.mb-4 {
        margin-bottom: 0.5rem !important;
    }
    
    /* コンテナの余白調整 */
    .container.py-4,
    .container-fluid.py-4 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* 全体のフォントサイズを小さくする */
    body {
        font-size: 0.75rem !important; /* 12px - 標準の16pxから4px小さい */
    }
    
    /* フォーム要素も同様に調整 */
    .form-control, 
    .form-select,
    .input-group-text,
    .btn {
        font-size: 0.75rem !important;
    }
    
    /* フォームラベルも同じく調整 */
    .form-label {
        font-size: 0.75rem !important;
    }
    
    /* フォームテキスト（ヘルプテキスト）も調整 */
    .form-text {
        font-size: 0.7rem !important; /* ヘルプテキストはさらに小さく */
    }
    
    /* ナビゲーションメニューのフォントサイズ調整 */
    .navbar .nav-link {
        font-size: 0.75rem !important; /* 12px */
    }
    
    .navbar .dropdown-item {
        font-size: 0.75rem !important; /* 12px */
        padding: 0.4rem 0.75rem !important; /* パディングも少し縮小 */
    }
    
    /* マージンとパディングを縮小 */
    .card {
        margin-bottom: 0.75rem !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    /* フォームグループの間隔を縮小 */
    .mb-3 {
        margin-bottom: 0.5rem !important;
    }
    
    /* 行間の調整 */
    .row {
        margin-bottom: 0.5rem !important;
    }
    
    /* 行の中のカラム間の余白を縮小 */
    .row > [class*="col-"] {
        padding-right: 0.5rem !important;
        padding-left: 0.5rem !important;
    }
    
    /* テーブルの表示をコンパクトに */
    .table td, 
    .table th {
        padding: 0.4rem !important;
        font-size: 0.75rem !important;
    }
    
    /* フォームセクションの下部マージンを縮小 */
    .form-section {
        margin-bottom: 1rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* セクションタイトルのサイズ調整 */
    .form-section-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* ボタンの余白調整 */
    .btn {
        padding: 0.25rem 0.5rem !important;
    }
    
    /* ナビゲーションバーのコンパクト化 */
    header.navbar {
        padding: 0.25rem 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* ナビゲーションバーの高さ調整 */
    .navbar-dark {
        min-height: 60px !important; /* 高さを少し縮小 */
    }
    
    /* インプットグループの調整 */
    .input-group {
        margin-bottom: 0.5rem !important;
    }
    
    /* バッジのサイズ調整 */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.2em 0.5em !important;
    }
    
    /* アラートのパディング調整 */
    .alert {
        padding: 0.5rem 0.75rem !important;
        margin-bottom: 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    /* リストグループのパディング調整 */
    .list-group-item {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    /* フォームチェックの調整 */
    .form-check {
        min-height: 1.2rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .form-check-input {
        width: 0.9rem !important;
        height: 0.9rem !important;
        margin-top: 0.15rem !important;
    }
    
    .form-check-label {
        font-size: 0.75rem !important;
    }
}

/* 中間サイズのブレークポイント対応 - ナビゲーションメニュー調整 */
@media (min-width: 768px) and (max-width: 991px) {
    /* ナビゲーションリンクのフォントサイズを小さく */
    .navbar .nav-link {
        font-size: 0.75rem !important; /* 12px */
        padding: 0.25rem 0.4rem !important; /* パディングを縮小 */
    }
    
    /* ドロップダウンリンクも同様に調整 */
    .navbar .dropdown-item {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.5rem !important;
    }
    
    /* アイコンと文字の間隔を縮小 */
    .navbar .nav-link i {
        margin-right: 0.15rem !important;
    }
    
    /* ナビゲーションバーのブランド（ロゴ）の余白調整 */
    .navbar-brand {
        margin-right: 0.5rem !important;
    }
    
    /* 項目間の余白を減らす */
    .navbar-nav .nav-item {
        margin-right: 0 !important;
    }
    
    /* ドロップダウンのキャレット（▼マーク）の余白調整 */
    .dropdown-toggle::after {
        margin-left: 0.2em !important;
    }
    
    /* 必要に応じてドロップダウンメニューの幅を調整 */
    .navbar .dropdown-menu {
        min-width: 8rem !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
  table, .table td, .table th {
    font-size: 0.75rem !important;  /* = 12px */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
    font-weight: 400 !important;
  }
}
