/**
 * 取扱型番実績ページ スタイル
 */

/* コンテナ */
.parts-history {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 説明文 */
.history-description {
    font-size: 15px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ===== 年月フィルター ===== */
.history-filter {
    margin-bottom: 24px;
}

.history-filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.history-month-select {
    padding: 10px 40px 10px 16px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    appearance: auto;
    min-width: 180px;
}

.history-month-select:focus {
    border-color: var(--pointColor, #ff7830);
    outline: none;
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background-color: #555;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-filter:hover {
    background-color: #333;
}

.btn-link-own-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none;
    background-color: var(--pointColor, #ff7830);
    border: 2px solid var(--pointColor, #ff7830);
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-link-own-stock:hover {
    background-color: var(--pointColor-hover, #e06820);
    border-color: var(--pointColor-hover, #e06820);
    color: #fff;
}

/* ===== テーブル年月ヘッダー ===== */
.history-table-month-header {
    background-color: #888;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    padding: 14px 24px;
    border-radius: 8px 8px 0 0;
    text-align: left;
}

/* ===== 2列テーブルレイアウト ===== */
.history-table-wrapper {
    display: flex;
    gap: 0;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.history-table-column {
    flex: 1;
    min-width: 0;
}

.history-table-column + .history-table-column {
    border-left: none;
}

/* ===== テーブル ===== */
.parts-history-table {
    width: 100%;
    border-collapse: collapse;
}

.parts-history-table thead {
    background-color: #3a3a3a;
    color: #fff;
}

.parts-history-table thead th {
    padding: 10px 14px;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
}

.parts-history-table thead th.col-action {
    text-align: left;
}

.parts-history-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
}

.parts-history-table tbody tr:hover {
    background-color: #f8f9fa;
}

.parts-history-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.parts-history-table tbody tr:nth-child(even):hover {
    background-color: #f0f4f8;
}

.parts-history-table tbody td {
    padding: 8px 14px;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
}

.parts-history-table tbody td.col-manufacturer {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.parts-history-table tbody td.col-part-number {
    font-weight: 600;
    color: #1a1a1a;
    word-break: break-all;
    text-align: left;
}

.parts-history-table tbody td.col-action {
    text-align: left;
    white-space: nowrap;
    width: 160px;
}

/* ===== 見積依頼ボタン（検索結果と共通デザイン） ===== */
.btn-add-quote {
    background-color: #ffffff;
    color: var(--pointColor, #ff7830);
    padding: 6px 30px;
    padding-left: 40px;
    border: 2px solid var(--pointColor, #ff7830);
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
    min-width: 170px;
    text-align: center;
    box-sizing: border-box;
    display: block;
    width: 100%;
}

.btn-add-quote::after {
    content: "\f0fe"; /*Square Plus Icon*/
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--pointColor, #ff7830);
    transition: color 0.2s;
}

.btn-add-quote:hover {
    background-color: var(--pointColor, #ff7830);
    color: #ffffff;
}

.btn-add-quote:hover::after {
    color: #ffffff;
}

.btn-add-quote.added {
    background-color: var(--pointColor, #ff7830);
    border-color: var(--pointColor, #ff7830);
    color: #ffffff;
}

.btn-add-quote.added::after {
    content: "\f00c";
    font-weight: 900;
    color: #ffffff;
}

.btn-add-quote.added:hover {
    background-color: var(--pointColor-hover, #e06820);
    border-color: var(--pointColor-hover, #e06820);
}

/* ページネーションは shared の .mitsukaru-pagination に統合済み（pagination.css）
   履歴は補足情報を上部に積むため .mitsukaru-pagination--stacked を併用する */

/* ===== 空メッセージ ===== */
.history-empty {
    background: #fff;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .parts-history {
        padding: 0 12px;
    }

    .history-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .history-month-select {
        width: 100%;
        min-width: unset;
    }

    .btn-filter {
        justify-content: center;
    }

    .btn-link-own-stock {
        margin-left: 0;
        justify-content: center;
    }

    /* モバイルでは1列レイアウト */
    .history-table-wrapper {
        flex-direction: column;
    }

    .history-table-column + .history-table-column {
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .parts-history-table thead {
        display: none;
    }

    .parts-history-table tbody td {
        display: block;
        padding: 4px 14px;
        font-size: 13px;
    }

    .parts-history-table tbody td.col-manufacturer {
        max-width: unset;
        padding-top: 10px;
        color: #888;
        font-size: 12px;
    }

    .parts-history-table tbody td.col-part-number {
        font-size: 15px;
    }

    .parts-history-table tbody td.col-action {
        text-align: left;
        padding-bottom: 10px;
    }

    .parts-history-table .btn-add-quote {
        width: 100%;
    }

    .parts-history-table tbody tr {
        border-bottom: 1px solid #e0e0e0;
    }
}
