/* reservation-form 内の input と textarea のスタイルを調整 */
.reservation-form input#reservationName,
.reservation-form input#numberOfAdults,
.reservation-form input#numberOfChildren,
.reservation-form textarea#purpose {
    width: calc(100% - 20px); /* Padding adjustment */
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* パディングとボーダーをwidthに含める */
}

.reservation-form textarea#purpose {
    resize: vertical; /* 垂直方向のみリサイズ可能にする */
    min-height: 80px; /* 最小高さを設定 */
}

/* ユーザー認証モーダル内の入力フィールドのスタイル */
.user-modal-content input#registerNameInput,
.user-modal-content input#registerEmailInput,
.user-modal-content input#registerPasswordInput,
.user-modal-content input#registerPhoneInput, /* ★この行を追加 */
.user-modal-content input#loginEmailInput,
.user-modal-content input#loginPasswordInput {
    width: calc(100% - 20px); /* パディングを考慮した幅 */
    padding: 12px; /* 上下のパディングを少し増やす */
    margin-bottom: 15px; /* 下のマージンを少し増やす */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* パディングとボーダーをwidthに含める */
}

/* ヘッダー */
.header {
    background-color: #4CAF50;
    color: white;
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
    font-size: 1.8em;
}

.user-menu-container {
    position: relative;
    display: flex;
    align-items: center;
}

.user-icon {
    font-size: 2em;
    cursor: pointer;
    margin-left: 15px;
}

.header-login-button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.header-login-button:hover {
    background-color: #1976D2;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%; /* ヘッダーのすぐ下に表示 */
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    min-width: 200px;
    z-index: 1000;
    color: #333;
    text-align: left;
}

.user-dropdown-menu p {
    margin: 5px 0;
    font-size: 0.95em;
}

.user-dropdown-menu strong {
    color: #4CAF50;
}

.user-dropdown-menu button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.user-dropdown-menu button:hover {
    background-color: #d32f2f;
}


/* 全体的なレイアウト */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
}

.reservation-calendar-container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.week-navigation button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.week-navigation button:hover {
    background-color: #0056b3;
}

.week-navigation span {
    font-size: 1.2em;
    font-weight: bold;
}

.reservation-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.reservation-table th,
.reservation-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

.reservation-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.reservation-table td.time-cell {
    background-color: #f9f9f9;
    font-weight: bold;
    width: 80px; /* 時間列の幅を固定 */
}

.reservation-table td.available {
    background-color: #e6ffe6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reservation-table td.available:hover {
    background-color: #c6ffc6;
}

.reservation-table td.reserved-by-me {
    background-color: #90EE90; /* 自分の予約は明るい緑 */
    color: #333;
    font-weight: bold;
    cursor: pointer; /* クリック可能にする */
}

.reservation-table td.reserved-by-other,
.reservation-table td.past-time {
    background-color: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
}

.reservation-table td.selected-slot {
    background-color: #ffe0b2; /* 選択されたスロットの色 */
    border: 2px solid #ff9800;
}

/* 予約フォーム */
.reservation-form {
    width: 90%;
    max-width: 600px;
    margin: 30px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.reservation-form h2 {
    text-align: center;
    color: #4CAF50;
    margin-bottom: 25px;
}

.reservation-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.reservation-form input[type="text"],
.reservation-form input[type="number"],
.reservation-form textarea {
    width: calc(100% - 22px); /* Borderとpaddingを考慮 */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* パディングとボーダーをwidthに含める */
}

#selectedDateTimeDisplay {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.1em;
    color: #666;
    font-weight: bold;
}

.reservation-form button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    transition: background-color 0.3s ease;
}

.reservation-form button:hover {
    background-color: #45a049;
}


/* ユーザー認証モーダル */
.user-profile-section {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1500;
}

.user-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
}

.user-modal-content h2 {
    color: #4CAF50;
    margin-bottom: 20px;
}

.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.auth-tabs button {
    background-color: #eee;
    border: 1px solid #ddd;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.auth-tabs button:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border-right: none;
}

.auth-tabs button:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.auth-tabs button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

#closeAuthModalButton {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.8em;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
}

#closeAuthModalButton:hover {
    color: #666;
}

/* ユーザー認証フォーム内のラベルとボタン */
#registerView label,
#loginView label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

#registerView p,
#loginView p {
    margin-bottom: 20px;
    color: #666;
}

#registerButton,
#loginButton {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em; /* フォントサイズを大きくする */
    width: 100%; /* 幅を親要素に合わせる */
    margin-top: 20px; /* 上のマージンを増やす */
    transition: background-color 0.3s ease;
}

#registerButton:hover,
#loginButton:hover {
    background-color: #45a049;
}

/* 予約詳細モーダル */
.reservation-detail-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
}

.detail-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.detail-modal-content h2 {
    color: #4CAF50;
    margin-bottom: 20px;
}

.detail-modal-content p {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.detail-modal-content strong {
    color: #333;
}

.detail-modal-content button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.detail-modal-content button#closeDetailModalButton {
    background-color: #ccc;
    color: #333;
    margin-left: 10px;
}

.detail-modal-content button#cancelReservationButton:hover {
    background-color: #d32f2f;
}

.detail-modal-content button#closeDetailModalButton:hover {
    background-color: #bbb;
}