/* グローバルスタイル */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0; 
    background-color: #f4f4f4;
    font-size: 14px;
    /* 全体の文字サイズを調整 */
    line-height: 1.4;
    box-sizing: border-box;
}

.wrapper {
    display: flex;
    min-height: 100vh;
    height: 100%;
}



/* 全体レイアウト */
.container {
    width: 100%;
    margin-top: 0;
    /* margin-left: 3%; */
    box-sizing: border-box;
    padding: 0 0 0 20px ; 
    /* text-align: center; */
}

.form-container {
    width: 70%;
    margin: 0% 15% 10% 15%;
    /* text-align: center; */
}

.table-wrapper {
    max-width: 95%;
    margin: 0 auto; 
    overflow-x: auto; 
    margin-bottom: 1.5em;
    position: relative;
}

.table-scroll {
    overflow-x: auto;
    max-width: 100%;
    white-space: nowrap;
}

/* 横スクロールバーを画面下部に固定 */
.table-scrollbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 16px; /* スクロールバー高さ */
    overflow-x: auto;
    overflow-y: hidden;
    background-color: #f5f5f5; /* 見やすい背景色 */
    z-index: 9999;
    box-sizing: border-box;
    border-top: 1px solid #ccc;
}

/* スクロールバーの幅を決めるための擬似要素 */
.table-scrollbar::before {
    content: '';
    display: block;
    height: 1px;
    width: var(--table-width);
}

.table {
    width: 100%;
    table-layout: auto;
    min-width:100%;
    border-collapse: collapse;
    background-color: #fff;
}

.table th,
.table td {
    white-space: nowrap;
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 0.9em;
}
.table th:last-child,
.table td:last-child {
    min-width: 40px;
}

.table thead th {
    position: sticky;
    top: 0;
    background-color: #f9f9f9;
    z-index: 2;
}

.history-form table td {
    white-space: pre-line; /* 改行だけ保持し、空白は無視 */
    word-wrap: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
    margin: 0;
    padding: 4px 6px;
}
.history-form table th {

    vertical-align: top;
}
.history-form table tr {
    vertical-align: top;
}

/* ボタンスタイル */
button {
    padding: 6px 10px;
    /* ボタンの余白をさらに調整 */
    border: none;
    cursor: pointer;
    margin: 0 3px;
    /* ボタン間の余白を縮小 */
    /* font-size: 12px; */
}

.button-c {
    /* background-color: #b0c4de; */
    background-color: #0073b7;
    color: #ffffff;
    /* margin-bottom: 0.5rem; */
    border: none;
    padding: 6px 12px;
    border: none;
    text-decoration: none;
}

.giftshow {
    font-size: 16px;
    border-radius: 4px;
}

.active-button {
    background-color: #c82333;
    color: #ffffff;
    /* font-size: 8px; */
    font-size: smaller;
    margin: 0%;
    padding: 3px 5px 3px 5px;
}

.delete-button {
    background-color: #c82333;
    color: white;
}

.search-button {
    padding: 3px 6px 2px 6px;
    font-size: small;
}

.edit-button {
    background-color: #0073b7;
    color: white;
    font-size: 1em;
    padding: 0.4em 0.5em;
}

button:hover {
    opacity: 0.9;
}

/*テキストボックスとラベルの位置*/
.textarea-group {
    margin-bottom: 0.2em;
}

.textarea-group label {
    display: block;
    margin-bottom: 0.1em;
}

.textarea-group textarea {
    width: 50%;
    height: 35px;
    padding: 4px;
    font-size: 1em;
}

/* 操作履歴テーブル */
.log-table {
    border-collapse: collapse; /* 枠線を重ねて表示 */
    width: 50%;
}

.log-table th,
.log-table td {
    padding: 3px; /* 余白をさらに縮小 */
    font-size: 15px; /* 文字サイズを小さく調整 */
    white-space: normal;
    border: 1px solid #000; /* ← 枠線を追加 */
}

.log-table th {
    background-color: #0073b7;
    color: white;
}

.log-table td {
    background-color: #f9f9f9;
}

.log-table tr:nth-child(even) td {
    background-color: #f2f2f2;
}

/* ボタン配置 */
.button-group-1 {
    margin-top: 10px;
    /* 上部の余白をさらに縮小 */
    text-align: right;
}

.button-group-2 {
    margin-top: 10px;
    /* 上部の余白をさらに縮小 */
    text-align: center;
}

/* 詳細テーブル */
.detail-table-container {
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
    margin-top: 5px;
    /* 上部余白を縮小 */
}

.detail-table th,
.detail-table td {
    padding: 3px;
    /* 余白をさらに縮小 */
    font-size: 11px;
    min-width: 70px;
    /* 最小幅を狭める */
}

/* サイドバー */
.sidebar {
    width: 200px;
    background-color: #d3d3d3;
    padding: 10px;
    height: auto;
}

/* サイドバー項目 */
.sidebar li {
    margin-bottom: 3px;
    padding: 3px;
    font-size: 11px;
}

/* タイトルバー */
.title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    /* 余白をさらに縮小 */
    font-size: 12px;
}

.business-form {
    width: 70%;
    margin: 0% 15%;
}

/* 入力フィールドの調整 */
.business-form input,
.business-form select,
.business-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 5px;
    /* 余白をさらに減らす */
    font-size: 12px;
    padding: 3px;
}

.giftshowform {
    width: 50%;
    overflow-x: auto;
    margin-bottom: 1.5em;
    border-radius: 5px;
}

.giftshowtable {
    width: 50%;
    table-layout: auto;
    min-width: 50%;
    border-collapse: collapse;
    background-color: #fff;
    
}

.giftshowtable th{
    border: 1px solid #999;
    width: 140px;
    padding: 10px;
    text-align: center;      
    vertical-align: middle;      
    white-space: normal;
    font-size: 14px;
}
.giftshowtable td {
    border: 1px solid #999;
    padding: 10px;
    text-align: left !important;          /* 左寄せ */
    vertical-align: top;
    white-space: pre-line; 
    word-wrap: break-word;
    font-size: 14px;
}

.vendorshowtable {
    width: 40%;
    table-layout: auto;
    min-width: 40%;
    border-collapse: collapse;
    background-color: #fff;
    
}

.vendorshowtable th{
    border: 1px solid #999;
    width: 145px;
    padding: 10px;
    text-align: center;          
    vertical-align: middle;
    white-space: normal;       /* 折り返し有効 */
    font-size: 14px;
}
.vendorshowtable td {
    border: 1px solid #999;
    padding: 10px;
    text-align: left !important;          /* 左寄せ */
    vertical-align: top;
    white-space: pre-line; 
    word-wrap: break-word;       /* 折り返し有効 */
    font-size: 14px;
}

.logout-button {
    padding: 5px 10px;
    font-size: 0.9em;
    background-color: #c82333;
    color: white;
    border: none;
    cursor: pointer;
}

.main-content {
    padding: 20px;
    text-align: center;
}

.main-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.menu-button {
    background-color: #ddd;
    border: none;
    padding: 20px 40px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.menu-button:hover {
    background-color: #bbb;
}

.admin-section {
    border-top: 1px solid #aaa;
    padding-top: 20px;
    margin-top: 20px;
}

.admin-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.admin-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}


.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f4;
}

.login-box {
    width: 300px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #ffffff;
    text-align: center;
    margin-top: 50px;
}

.login-box h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #333;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 1em;
}


.login-box button {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    background-color: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 3px;
}

input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.highlight {
    background-color: yellow !important;
    font-weight: bold;
}

.system-form select,
.system-form input {
    margin-bottom: 0.4rem;

}

.selectbox {
    display: block;
    width: 600px;
}

.image-gallery {
    display: flex;
    align-items: baseline;
    gap: 10px;
    text-align: center;
    justify-content: center;
    margin: 0 auto;
    flex-wrap: wrap;
}

.image-item.hidden {
    display: none;
}

.slide-button {
    background-color: #eee;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    height: 100%;
}

.image-gallery-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0% auto 3%;
}

.image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-number {
    font-size: 12px;
    margin-top: 5px;
    color: #555;
}

.image-item a.btn {
    font-size: 12px;
    padding: 4px 8px;
    text-decoration: none;
    background-color: #0073b7;
    color: white;
    border-radius: 4px;
}

.image-item a.btn:hover {
    background-color: #005f96;
}

.btn-primary {
    background-color: #0073b7;
}

.btn-primary:hover {
    background-color: #005f96;
}

.btn-secondary {
    background-color: gray;
}

.btn-light {
    background-color: #0d6efd;
}

.btn-secondary:hover {
    background-color: rgba(128, 128, 128, 0.644);
}

.btn {
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.btn-sm {
    font-size: 0.8rem;
}

.btn-danger {
    background-color: #f30000;
}

.btn-danger:hover {
    background-color: #960000;
}

.alert .alert-danger {
    background-color: #960000;
}

.alert .alert-success {
    background-color: #07b401;
    color: #07b401;
}

.table-font-sm {
    font-size: 0.9rem;
}

.table-font-md {
    font-size: 1rem;
}

.table-font-lg {
    font-size: 1.1rem;
}

.mg-b05 {
    margin-bottom: 0.5%;
}

.mg-b1 {
    margin-bottom: 0.2%;
}

.mg-t1 {
    margin-top: 1%;
}

.font-md {
    font-size: 1rem;
}

.font-sm {
    font-size: 0.9rem;
}


/*項目更新用ドロップボックス*/
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 100%;
    max-width: calc(100vw - 20px);
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ccc;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    z-index: 1000;
}

.dropdown label {
    display: block;
    margin: 4px 0;
    white-space: nowrap;
}

.dropdown-toggle {
    background-color: #007BFF;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.update-button-wrapper {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 12px 12px;
    /* ← 余白を増やす */
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    text-align: right;
    border-top: 1px solid #ccc;
    z-index: 0;
}

.update-button {
    background-color: #28a745;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.business-show {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.title-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.page-title {
    font-size: 24px;
    margin: 0;
}

.subscription-link {
    font-size: 14px;
    padding: 6px 12px;
    height: 36px; /* h1と高さを揃える場合に調整 */
    display: flex;
    align-items: center;
}

.special-note-checkbox {
    display: flex;
    align-items: center; /* ←ここを 'flex-start' にすると上揃え */
    gap: 6px; /* チェックボックスとテキストの間隔 */
}

.expired-vendor {
    background-color: #f0f0f0;
    color: #888;
}

.spacer-hr {
    border: none;        /* 線を消す */
    height: 50px;        /* 任意の高さの余白 */
    margin: 0;           /* 上下マージンを調整 */
    background: none;    /* 念のため背景もなし */
}