
@charset "utf-8";

body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: khaki;
}

h1 {
    text-align: center;
}
h2 {
    text-align: center;
    margin-bottom: 0px;
}

p {
    margin-top: 3px;
    margin-bottom: 3px;
    text-align: center;
}

.small {
    text-align: center;
    font-size: 12px;
}

.container {
    max-width: 1200px;
    min-width: 375px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    border: none;
    background: #f0f0f0;
    margin-right: 4px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.tab.active {
    background: #007bff;
    color: white;
}

.tab:hover:not(.active) {
    background: #e0e0e0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.month-filter {
    width: fit-content;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 5px auto;
}

.month-filter label {
    margin-right: 10px;
    font-weight: bold;
}

.hemisphere-filter{
    width: fit-content;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 5px auto;

}
.hemisphere-filter label {
    margin-right: 10px;
    font-weight: bold;
}

.period-filter {
    margin-left: 10px;
    padding-left: 10px;
}

.price-multiplier {
    width: fit-content;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 5px auto;
}

.price-multiplier label {
    font-weight: bold;
    color: cornflowerblue;
}

/* テーブルコンテナ - 横スクロール対応 + 縦スクロール対応 */
.table-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 20px auto;
    overflow: hidden;
    width: 480px;
    max-width: 90%;
    max-height: 400px; /* スクロール高さを制限 */
    overflow-y: auto; /* 縦スクロール有効 */
    overflow-x: auto; /* 横スクロール有効 */
}

/* テーブル基本スタイル */
.product-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    min-width: 580px; /* テーブルの最小幅 */
}

/* ヘッダー固定 */
.product-table thead {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.product-table th {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
    position: sticky;
    top: 0;
    font-size: 14px;
}

.product-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
    font-size: 12px;
    height: 45px;
    vertical-align: middle;
}

/* 列幅の調整 */
.product-table th:nth-child(1),
.product-table td:nth-child(1) {
    width: 100px;
    min-width: 100px;
}

.product-table th:nth-child(2),
.product-table td:nth-child(2) {
    width: 70px;
    min-width: 70px;
    /*text-align: right;*/
}

.product-table th:nth-child(3),
.product-table td:nth-child(3) {
    width: 70px;
    min-width: 70px;
    text-align: center;
}

.product-table th:nth-child(4),
.product-table td:nth-child(4) {
    width: 80px;
    min-width: 80px;
    /*text-align: right;*/
}

.product-table th:nth-child(5),
.product-table td:nth-child(5) {
    width: 60px;
    min-width: 60px;
    text-align: center;
}

.product-table th:nth-child(6),
.product-table td:nth-child(6) {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

.product-table th:nth-child(7),
.product-table td:nth-child(7) {
    width: 150px;
    min-width: 150px;
}

.quantity-input {
    width: 50px;
    padding: 4px;
    text-align: right;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.price-input {
    width: 80px;
    padding: 4px;
    text-align: right;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.total-price {
    font-weight: bold;
    color: #007bff;
}

.global-controls {
    width: fit-content;
    margin: 25px auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.grand-total {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 10px;
}

.tab-totals {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab-totals div {
    font-size: 16px;
    font-weight: bold;
    color: #007bff;
}

.reset-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-danger {
    background: #007bff;
    color: white;
}

.btn-danger:hover {
    background: #0056b3;
}



/* モバイル対応 */
/*@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .table-container {
        width: 100%;
        max-width: 100%;
    }
    
    .product-table {
        min-width: 500px;
    }
    
    .tabs {
        justify-content: center;
    }
    
    .tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .tab-totals {
        flex-direction: column;
        gap: 5px;
    }
}
*/

.link-container {
  white-space: nowrap; /* 改行させない */
  text-align: center;      /* 中央揃え */
}

.link-container a {
  display: inline-block;
  margin-right: 15px;
}

/* 最後のリンクの右の余白を消す場合（任意） */
.link-container a:last-child {
  margin-right: 0;
}

.price-highlight {
    color: cornflowerblue;
    font-weight: bold;
}