/* 表の実幅が画面幅を超えるとSafariがページ全体を縮小表示する。
   このときコンテナだけが画面幅のまま組まれてヘッダが左に寄ってしまうため、
   コンテナを内容幅まで広げてヘッダと表の右端を揃える */
@media (max-width: 767.98px) {
    .container {
        width: max-content;
        min-width: 100%;
    }
}

table {
    border-collapse: collapse;
    width: 80%;
    margin: 20px 0;
}

th,
td {
    border: 1px solid #aaa;
    padding: 8px;
    text-align: center;
}

th {
    background-color: #f2f2f2;
}

.cookie-btn {
    margin: 10px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}

.driver-cell {
    cursor: pointer;
}

td.red {
    background-color: rgb(255, 228, 228);
}
td.yellow {
    background-color: rgb(255, 239, 174);
}
td.blue {
    background-color: rgb(185, 211, 249);
}

tr.locked {
    background-color: rgb(243, 243, 243);
}

/* 開催日以外に表示する案内 */
.event-notice {
    margin: 40px 0;
    padding: 40px 24px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    text-align: center;
}

.event-notice-date {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

.event-notice-text {
    margin: 0;
    font-size: 1rem;
    color: #6c757d;
}

/* ロゴが管理画面への入口。押せることが分かるようにする */
.logo-link {
    cursor: pointer;
}

/* クリックすると名前を変更できることを示す */
.name-editable {
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

/* 名前変更のモーダル */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1050;
}

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

.modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px;
    width: 100%;
    max-width: 360px;
}

.modal-card h5 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.modal-note {
    margin: 0 0 14px;
    font-size: .8rem;
    color: #6c757d;
    line-height: 1.6;
}

.modal-card input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.modal-card input[type="text"]:focus {
    outline: 2px solid #0d6efd;
    outline-offset: -1px;
}

.modal-error {
    margin: 8px 0 0;
    min-height: 1.2em;
    font-size: .82rem;
    color: #dc3545;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.modal-buttons button {
    flex: 1;
    padding: 10px;
    font-size: .95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.modal-buttons .btn-ok {
    color: #fff;
    background: #0d6efd;
    border: none;
}

.modal-buttons .btn-cancel {
    color: #212529;
    background: #f0f2f5;
    border: 1px solid #dee2e6;
}
