:root {
    --color-error: #EF4444;
    --color-navy: #00004f;
    --main-color: #DC4906;
    --border: #ddd;
    --cancel-back-color: whitesmoke;
}

/*
    match_list.htmlのスタイル
*/

#btn-my-reservation {
    margin: 0 10px;
    border-radius: 20px;
    padding: 5px 10px;
}

.date-display {
    text-align: center;
    justify-content: center;
    display: flex;
    margin-top: 5px;
}

.date-row {
    display: inline-flex;
    align-items: center;
    /*gap: 8px;*/
    /* viewとiconの間隔 */
    border: 1px solid #d0d7e2;
}

#date_view {
    display: inline-block;
    padding: 0px 10px;
    font-size: var(--font-size-x-large);
    cursor: pointer;
    user-select: none;
}

.round-btn-area {
    margin: auto 15px 0 15px;
    align-items: center;
    justify-content: center;
}

.round-btn {
    --btn-size: 28px;
    --btn-color: #1976d2;
    --btn-color-hover: #0d47a1;
    --icon-color: #fff;

    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--btn-size);
    height: var(--btn-size);
    border-radius: 50%;
    background: var(--btn-color);
    color: var(--icon-color);
    border: none;
    cursor: pointer;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: background 0.15s ease, transform 0.05s ease;
}

.round-btn:focus-visible{ 
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.35);
}

.round-btn:hover{
    background: var(--btn-color-hover);
}

.round-btn:active {
    transform: scale(0.98);
}

.round-btn::before,
.round-btn::after {
    content: "";
    position: absolute;
    background: var(--icon-color);
    border-radius: 2px;
}

.round-btn.minus::before {
    width: 14px;
    height: 2px;
}

.round-btn.plus::before {
    width: 14px;
    height: 2px;
}

.round-btn.plus::after {
    width: 2px;
    height: 14px;
}

.round-btn::before,
.round-btn::after {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.calendar-icon {
    width: 30px;
    height: 37.5px;
    background: #fff;
    border: none;
    cursor: pointer;
    /* 下のurl内のfill="%23"部分がカラーコードの#に対応するので、その後6桁で指定する */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="%23000000"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6c0-1.1-.9-2-2-2zm0 15H5V9h14v10z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

.calendar-icon:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

#note_text {
    color: var(--color-error);
    font-size: 17px;
    margin-bottom: 0rem;
}

/* カレンダーUIがdate_viewerに重ならないように調整 */
/* カレンダーUIが画面内に収まるように調整 */
#date_picker_anchor {
    display: flex;
    justify-content: center;
    height: 1px;
    position: relative;
}

#date_picker {
    opacity: 0;             /* 透明にする    */
    pointer-events: none;   /* 誤クリック防止 */
    width: 50%;
    max-width: 50vh;
    height: 1;
    border: none;
    font-size: 25px;
    z-index: 1000;
}

.disp-name-myself {
    margin-left: auto;
    margin-right: auto;
    padding: 2px 4px;
    border-radius: 8px;
    font-size: 12px;
    color: darkgray;
    border: 2px solid darkgray;
}
.disp-name-other {
    margin-left: auto;
    margin-right: auto;
    padding: 2px 4px;
    border-radius: 8px;
    font-size: 12px;
    color: red;
    border: 2px solid red;
}

.reserve-filter {
    display: flex;
    align-items: center;
    margin-top: 4px;
    font-size: 13px;
}

.reserve-list {
    max-height: 535px;
    overflow: auto;
    margin: 5px;
}

.reserve {
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 5px;
    background: #ffffff;
}

.reserve-header {
    display: grid;
    grid-template-columns: 0.1fr 0.7fr auto 0.15fr;
    align-items: center;
    /*gap: 3px;*/
    font-size: 24px;
    color: #616161;
    /*background-color: #F4F4F4;*/
    border-bottom: 1px solid var(--border);
    border-left: 4px solid #DC4906;
    /*box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);*/
}

.reserve-header-left {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
    /*gap: 8px;*/
    /*margin-left: 10px;*/
    min-width: 0;
    /* background: #e9f4ff; */
}

.reserve-header-setting {
    display: flex;
    justify-content: center;
    font-size: 24px;
    color: #616161;
    /*background-color: #F4F4F4;*/
    border-bottom: 1px solid var(--border);
    border-left: 4px solid #DC4906;
    /*box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);*/
}

.reserve_title {
    font-weight: 800;
}

.destination {
    min-width: 100px;
    font-weight: 500;
    white-space: nowrap;
}

.arr_time {
    color: #666;
    white-space: nowrap;
}

.toggle-btn {
    /*display: inline-flex;*/
    /*color: #A6A6A6;*/
    margin-left: 5px;
    border: none;
    cursor: pointer;
}

.table-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
}

.table-item {
    display: grid;
    grid-template-columns: 68px 4fr 3fr;
    /* icon | origin+time | seats | button 一列でこの形にしたい */
    align-items: center;
    padding: 4px 4px;
    column-gap: 5px;
    border: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    font-size: 1.9rem;
    color: #666;
}

.table-item .icon {
    width: 28px;
    height: 28px;
    justify-self: start;
    display: grid;
    place-items: center;
}

.icon[aria-label="joined"] {
    display: grid;
    color: #056EFF;
    place-items: center;
    border: 2px solid #000;
    background: #fafafa;
    font-weight: 700;
}

.icon[aria-label="closed"] {
    display: grid;
    font-size: 100%;
    color: var(--color-error);
    place-items: center;
    border: none;
    font-weight: 700;
}

.table-item .origin-time {
    grid-column: 2;
    display: inline-flex;
    gap: 4px;
    white-space: nowrap;
    align-items: baseline;
    min-width: 0;
}


.table-item .origin {
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-item .time {
    margin-left: 4px;
    /*font-size: 12px;*/
    color: #444;
}

.table-item .seats {
    grid-column: 3;
    font-size: 1.6rem;
    text-align: center;
    color: #999;
}

.seats-num {
    font-size: 16px;
    color: #000;
    white-space: nowrap;
}

.reserved-header .seats_closed {
    font-size: 18px;
    color: #000;
}

.seats_full {
    font-size: 18px;
    /*text-align: center;*/
    color: #616161;
}

.table-item .check-btn,
.table-item .reserve-btn {
    grid-column: 4;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 27px;
    font-size: 12px;
    white-space: nowrap;
}

.button.button-primary {
    margin: 0px;
}

/* .is-closed {
    background-color: #A6A6A6;
    color: #000;
}

.is-closed .seats {
    color: #000;
    font-size: 18px;
} */

.is-hidden {
    display: none !important;
}

/* .table-item.is-full {
    background-color: #A6A6A6;
}

.table-item.is-full .seats {
    font-weight: 600;
    font-size: 18px;
    color: #000;
}

.table-item.is-full .button {
    visibility: none;
} */

.table-item.is-full {
    background-color: darkgray;
}

.table-item.is-full.is-joined {
    background-color: #FFF2CC;
}

.table-item.is-joined, 
.table-item.is-joined.is-closed {
    background-color: #FFF2CC;
}
#errorArea {
    text-align: center;
    background: #fdecea;
    color: #611a15;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    margin: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}


/* reserve_check.shtmlのスタイル*/
#alert-box {
                position: fixed; /* 画面に固定 */
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%); /* 完全中央寄せ */
                background-color: #fff8e1; /* 警告っぽい淡黄色 */
                color: #d32f2f; /* 赤系の文字色 */
                border: 2px solid #d32f2f;
                padding: 20px 30px;
                font-weight: bold;
                z-index: 9999; /* 最前面に表示 */
                box-shadow: 0 4px 8px rgba(0,0,0,0.3);
                width: 350px;
                text-align: center;
                border-radius: 8px;
}

.fare-style {
    font-size: var(--font-size-x-large);
    font-weight: bold;
    color: var(--color-navy);
    margin: 0;
}

.seat-style {
    text-align: center;
    text-decoration: underline;
    font-size: var(--font-size-x-large);
    font-weight: bold;
    color: var(--color-navy);
}

.major_item_check {
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-x-large);
    font-weight: bold;
    color: var(--base-color);
    background-color: var(--color-navy);
    border-radius: 0.25rem;
    margin-top: 1rem;
}

.btn-back {
    width: 150px;
    /* 横幅を固定 */
    padding: 1rem;
    text-align: center;
    /* テキストを中央揃え */
    display: block;
    /* ブロック要素にして */
    /*margin-left: 1rem 0;*/
}


.crayon-underline {
    text-decoration: underline;
    text-decoration-color: #FFD700;
    /* ゴールド系の黄色 */
    text-decoration-thickness: 4px;
    /* 下線の太さ */
    text-underline-offset: 2px;
    /* 下線と文字の間隔 */
}


.stack-area-check {
  position: relative;
  width: 100%;
  height: 56px;            /* ボタンの高さに合わせて調整 */
}

/* 両フォーム共通：同じ位置に重ねる */
/* .bottom-button-area-check {
  position: absolute;
  left: 0; top: 0; width: 100%;
} */


/* 表示制御 */
.show {
  opacity: 1;
  /*z-index: 2;*/
  pointer-events: auto;    /* クリック可能 */
  transition: opacity .2s ease;
}
.hide {
  opacity: 0;
  z-index: 1;
  pointer-events: none;    /* クリック無効（背面） */
  transition: opacity .2s ease;
}

/* reserve_cancel.shtmlのスタイル*/
body,
html {
    height: 100dvh;
    margin: 0;
}

/* 画面中央に配置するための設定 */
.cancel-box-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    padding: 20px 0;
}

/* 角丸の四角形 */
.box {
    width: 400px;
    height: 250px;
    background: var(--cancel-back-color);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    margin: 20px;
    /* 上下左右40pxの余白 */
}