/* カレンダー全体のスタイル */
.calendar-container {
    max-width: 900px;
    margin: 20px auto;
    text-align: center;
}

/* カレンダーのタイトル */
.calendar-title {
    font-size: 1.8em;
    margin-bottom: 15px;
}

/* 前月・次月のナビゲーションリンク */
.calendar-nav {
    text-decoration: none;
    font-size: 1.3em;
    color: #333;
    margin: 0 15px;
}

.calendar-nav:hover {
    color: #007bff;
}

/* カレンダー表のスタイル */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    table-layout: fixed;
    border: 1px solid #ccc;
}

/* 曜日ヘッダー */
.calendar-header {
    background-color: #f8f9fa;
    padding: 12px;
    font-weight: bold;
    border: 1px solid #ccc;
    font-size: 1.2em;
}

/* 各セル */
.calendar-day {
    width: 14.28%;
    height: 140px;
    vertical-align: top;
    position: relative;
    padding: 8px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1em;
}

/* クリック時のハイライト */
.calendar-day:hover {
    background-color: #e6e6e6;
}

/* 日曜の背景色 */
.calendar-sunday {
    background-color: #ffcccc !important;
    color: red;
    font-weight: bold;
}

/* 土曜の背景色 */
.calendar-saturday {
    background-color: #cce5ff !important;
    color: #0000ff;
}

/* 祝日の背景色 */
.calendar-holiday {
    background-color: #ffcccc !important;
    color: #ff0000;
    font-weight: bold;
}

/* 日付の表示 */

/* 今日の日付のスタイル（最優先で適用） */
.calendar-today {
    background-color: #f4ea92 !important;
    font-weight: bold;
    border: 3px solid #d4af37; /* ゴールド枠で目立たせる */
    color: #000 !important;
}

.date-number {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 1.2em;
    font-weight: bold;
}

/* 祝日名を日付の下に配置 */
.holiday-box {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em;
    color: #ff0000;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

/* 予定を中央に配置 */
.event-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 1em;
    font-weight: bold;
    width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

/* アイコンを横並びで下部に配置 */
.icons {
    position: absolute;
    bottom: -75px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1em;
    display: flex;
    justify-content: center;
    gap: 5px;
}

/* モーダルのオーバーレイ */
#modalOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* モーダルのスタイル */
#eventModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    width: 450px;
    border-radius: 8px;
}

/* フォーム内の入力欄 */
#eventModal input,
#eventModal textarea,
#eventModal select {
    width: 100%;
    padding: 6px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* 保存ボタン */
#eventModal button {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

/* 保存ボタンのホバー時 */
#eventModal button:hover {
    background-color: #0056b3;
}

/* キャンセルボタン */
#closeModal {
    background-color: #ccc;
    margin-left: 10px;
    font-size: 1em;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* 今日の日付のスタイル（最優先で適用） */
.calendar-today {
    background-color: #ffeb3b !important;
    font-weight: bold;
    border: 3px solid #d4af37; /* ゴールド枠で目立たせる */
    color: #000 !important;
}

/* 予定の文字色を適用 */
.event-text {
    font-weight: bold;
}

/* 予定ボックスのレイアウト */
.event-box {
    position: relative;
    text-align: center;
    font-size: 0.9em;
    font-weight: bold;
}

/* アイコンを下部に配置 */
.icons {
    position: relative;
    font-size: 1em;
    display: flex;
    justify-content: center;
    gap: 5px;
}

/* 全体のレイアウト */
.body-container {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* ヘッダー */
.header-flex-form {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #BDADD6;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

/* フォームのコンテナ */
.form-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 350px;
    position: relative;
    top: 50px;
}

/* タイトル */
.form-title {
    margin-bottom: 15px;
    color: #333;
}

/* ラベル */
.form-label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-top: 10px;
    text-align: left;
}

/* 入力フィールド */
.form-input {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* エラーメッセージ */
.error-message {
    color: red;
    font-size: 14px;
    margin-bottom: 10px;
}

/* フォームのボタン */
.form-button {
    width: 100%;
    padding: 10px;
    background-color: #5c67f2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 16px;
}

.form-button:hover {
    background-color: #4a54e1;
}

/* フォームのリンク */
.form-link {
    margin-top: 15px;
    font-size: 14px;
}

.form-link-text {
    color: #5c67f2;
    text-decoration: none;
}

.form-link-text:hover {
    text-decoration: underline;
}

/* ======== カレンダー選択ページのデザイン ======== */
.calendar-select-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 400px;
    position: relative;
    top: 50px;
}

/* タイトル */
.calendar-select-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #333;
}

/* グループカレンダーのタイトル */
.calendar-group-title {
    font-size: 1.4em;
    margin-top: 10px;
    color: #555;
}

/* カレンダーの選択肢 */
.calendar-option {
    display: block;
    font-size: 1.2em;
    color: #222;
    margin-top: 10px;
    text-align: left;
    cursor: pointer;
}

/* 選択フォーム */
.calendar-select-form {
    text-align: left;
}

/* ボタン */
.calendar-select-button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 16px;
}

.calendar-select-button:hover {
    background-color: #0056b3;
}

/* グループがないときの表示 */
.calendar-no-group {
    font-size: 1em;
    color: #777;
}

/* ログアウトリンク */
.logout-link {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    color: #5c67f2;
    text-decoration: none;
}

.logout-link:hover {
    text-decoration: underline;
}