@charset "utf-8";

/* 基本レイアウト */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* テーブルスタイル */
.table-bordered {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.rows {
    font-weight: 600;
    text-align: center;
    padding: 1rem;
    white-space: nowrap;
    background-color: #f8f9fa;
    width: 180px;
}

/* カード要素 */
.card {
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hover-highlight {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.hover-highlight:hover {
    background-color: #e9ecef;
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* アイコンとバッジ */
.icon-standard {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.icon-bookmark {
    width: 24px;
    height: 24px;
}

.badge {
    padding: 0.5em 0.8em;
    border-radius: 4px;
    font-weight: 500;
}

/* ステータス表示 */
.status-badge {
    display: inline-block;
    padding: 0.4em 0.8em;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
}

/* 基本的なステータスの色 - standard.cssと統一 */
.normal { background-color: #8cc580!important; }
.limited { background-color: #f7c36f!important; }
.stop { background-color: #f07171!important; }
.discontinued { background-color: #333333!important; }
.transfer { background-color: #7399c9!important; }
.unannounced { 
    background-color: #ffffff!important;
    border: 1px solid black;
    color: black;
}

/* 販売中止状態の場合のフィルター（販売中止バッジ以外） */
.status-badge.normal.discontinued,
.status-badge.limited.discontinued,
.status-badge.stop.discontinued {
    filter: brightness(85%) saturate(70%);
}

/* バーコード表示エリア */
.barcode-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.barcode-container:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* コピー機能 */
.copymark-position {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.copymark-position img {
    width: 22px;  /* standard-iconと同じサイズに */
    height: 22px;
    object-fit: contain;
}

.copymark-position:hover {
    opacity: 1;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .rows {
        width: 120px;
        font-size: 0.9rem;
    }
    
    td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .package-forms-container {
        flex-direction: column;
    }
}

/* 追加情報表示 */
.additional-info {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    background: #f8f9fa;
    color: #495057;
    margin-right: 0;
}

.info-badge i {
    font-size: 0.9rem;
}

/* トースト通知 */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1050;
}

.toast {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 0.9rem;
}

.toast-body {
    padding: 1rem;
}

/* カード内のセクション */
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
}

/* コード表示の改善 */
.code-display {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    color: #212529;
}

/* 過去の告知リスト */
.history-list-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.history-list-item:last-child {
    border-bottom: none;
}

/* 日付情報のスタイル */
.date-info {
    min-width: 200px;
}

/* ステータスグループのスタイル */
.status-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* レスポンシブ対応 */
@media (max-width: 991px) { /* lg breakpoint */
    .history-list-item .d-lg-flex {
        flex-direction: column;
    }

    .d-flex.align-items-center.flex-grow-1 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    .date-info {
        min-width: auto;
        margin-bottom: 0.5rem;
    }

    /* ステータスグループは横並びを維持し、アイコンを別行に */
    .status-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    /* ステータスと2軸分類を含むコンテナ */
    .status-badges {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        width: 100%;
    }

    /* 備考アイコングループ */
    .remarks-group {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        width: 100%;
    }
}

/* 詳細情報バッジ */
.detail-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

/* アイコンの配置調整 */
.icon-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* レスポンシブ対応の強化 */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .history-list-item > div {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .history-list-item .date-info {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
}

/* アニメーション効果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* ツールチップの改善 */
.tooltip {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* 背景色の調整 */
body {
    background-color: #f8f9fa;
}

/* 詳細情報の調整 */
.detail-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.detail-info .text-muted {
    min-width: 80px;
}

.detail-info .fw-medium {
    margin-left: 0.5rem;
}

/* バッジグループの調整 */
.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* コードラベルの改善 */
.code-label {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* モーダル関連のスタイルを追加 */
.barcode-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1060;
    justify-content: center;
    align-items: center;
}

.barcode-modal.show {
    display: flex;
}

.barcode-modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    position: relative;
    max-width: 90%;
    width: auto;
    text-align: center;
}

.barcode-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0.5rem;
    line-height: 1;
}

.barcode-modal-close:hover {
    color: #343a40;
}

.barcode-modal canvas {
    max-width: 100%;
    height: auto;
}

/* 包装情報のスタイル */
.package-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    width: 100%;
}

.package-info {
    font-size: 0.9rem;
    color: #212529;
    padding: 0.25rem 0;
}

/* バッジの小サイズ調整 */
.status-badge.small {
    font-size: 0.9rem;
    padding: 0.4em 0.8em;
}

/* 2軸分類バッジのスタイル */
.status-badge.small.bg-secondary {
    font-size: 0.9rem;
    padding: 0.4em 0.8em;
}

/* バーコード拡大アイコン */
.zoom-icon {
    font-size: 1rem;
    color: #6c757d;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.barcode-container:hover .zoom-icon {
    opacity: 1;
}

/* バーコードタイトル部分 */
.barcode-title {
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
}

/* バーコードコンテナのタイトル部分 */
.barcode-container .d-flex {
    min-height: 24px;
    padding-right: 1.5rem;
}

/* 日付情報のレイアウト */
.date-container {
    display: flex;
    gap: 1rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .date-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* アイコングループのレイアウト */
.icon-group {
    display: flex;
    flex-wrap: nowrap;  /* 横並びを維持 */
    gap: 0.5rem;
    align-items: center;
    overflow-x: auto;   /* 必要に応じて横スクロール */
    padding-bottom: 0.5rem;  /* スクロールバー用の余白 */
    -webkit-overflow-scrolling: touch;  /* スムーズスクロール（iOS用） */
}

/* スクロールバーのカスタマイズ */
.icon-group::-webkit-scrollbar {
    height: 4px;
}

.icon-group::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.icon-group::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

/* 告知履歴のレイアウト */
.history-list-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.history-list-item:last-child {
    border-bottom: none;
}

/* 日付情報のスタイル */
.date-info {
    min-width: 200px;
}

/* レスポンシブ対応 */
@media (max-width: 991px) { /* lg breakpoint */
    .history-list-item .d-lg-flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    .date-info {
        min-width: auto;
    }

    /* ステータスとアイコンのコンテナ */
    .d-flex.align-items-center.gap-2 {
        flex-wrap: wrap;
    }
}

/* アイコングループのスタイル追加 */
.remarks-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
