/* 予約システム用CSS */
/* 基本フォームスタイル */
.form-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.form-table th {
    text-align: left;
    padding: 12px;
    width: 25%;
    font-weight: 600;
    vertical-align: top;
}

.form-table td {
    padding: 10px;
}

/* フォーム要素のスタイル */
.form-table input[type="date"],
.form-table input[type="time"],
.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="tel"],
.form-table select,
.form-table textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    max-width: 400px;
}

.form-table textarea {
    min-height: 100px;
    resize: vertical;
}

.form-table select {
    height: 38px;
    background-color: #fff;
}

/* 必須項目のスタイル */
.form-table input:required,
.form-table select:required {
    border-left: 3px solid #0073aa;
}

/* 時間スロット関連のスタイル */
.time-slots-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.time-slot {
    display: inline-block;
    padding: 8px 12px;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.time-slot:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.time-slot.selected {
    background-color: #0073aa;
    color: white;
    border-color: #005a87;
}

.time-slot.unavailable {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

/* カレンダー関連のスタイル */
.ui-state-holiday a.ui-state-default {
    background-color: #ffeeee !important;
    color: #ff0000 !important;
}

/* DatePickerカスタマイズ */
#datepicker {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 20px;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

.ui-datepicker {
    width: 100%;
    max-width: 320px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px;
}

.ui-datepicker .ui-datepicker-header {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 6px 6px 0 0;
    padding: 8px;
}

.ui-datepicker .ui-datepicker-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 2.3em;
    line-height: 1.8em;
}

.ui-datepicker .ui-datepicker-prev, 
.ui-datepicker .ui-datepicker-next {
    top: 8px;
}

.ui-datepicker .ui-datepicker-prev-hover, 
.ui-datepicker .ui-datepicker-next-hover {
    top: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

.ui-datepicker th {
    padding: 10px 0;
    color: #333;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
}

.ui-datepicker-calendar {
    width: 100%;
    border-collapse: collapse;
}

.ui-datepicker td {
    padding: 1px;
    text-align: center;
}

.ui-datepicker td a {
    display: block;
    padding: 8px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
}

.ui-datepicker td a.ui-state-default {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    color: #333;
}

.ui-datepicker td a.ui-state-highlight {
    background: #e7f5ff;
    border: 1px solid #b8dcff;
}

.ui-datepicker td a.ui-state-active {
    background: #0073aa;
    color: white;
    border: 1px solid #005a87;
}

.ui-datepicker td a.ui-state-hover {
    background: #e0e0e0;
}

.ui-datepicker td.ui-state-disabled {
    opacity: 0.3;
}

.ui-datepicker td.ui-datepicker-unselectable.ui-state-disabled {
    opacity: 0.3;
    background: #f9f9f9;
}

/* 曜日の色を設定 */
.ui-datepicker-calendar .ui-datepicker-week-end:first-child a {
    color: #ff0000; /* 日曜日は赤色 */
}

.ui-datepicker-calendar .ui-datepicker-week-end:last-child a {
    color: #0000ff; /* 土曜日は青色 */
}

/* 予約フォーム関連のスタイル */
#reservation-form {
    display: none;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#reservation-form h3 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 20px;
}

#submit-reservation {
    margin-top: 15px;
}

#submit-reservation p {
    margin-bottom: 15px;
}

#submit-reservation label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

#submit-reservation input[type="text"],
#submit-reservation input[type="email"],
#submit-reservation input[type="tel"],
#submit-reservation select,
#submit-reservation textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    margin-top: 3px;
}

#submit-reservation input:required,
#submit-reservation select:required {
    border-left: 3px solid #0073aa;
}

#submit-reservation textarea {
    min-height: 100px;
    resize: vertical;
}

#submit-reservation button[type="submit"] {
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: block;
    margin-top: 10px;
}

#submit-reservation button[type="submit"]:hover {
    background-color: #005a87;
}

#time-slots {
    margin-top: 20px;
}

/* 時間スロットのタイトル部分 */
#time-slots h4 {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* 予約ボタンのスタイル */
.reservation-submit-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reservation-submit-btn:hover {
    background-color: #005a87;
}

/* 日付選択部分のスタイル */
.date-picker-container {
    margin-bottom: 20px;
}

.date-picker-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

/* 予約カレンダー全体のコンテナ */
#reservation-calendar {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#reservation-calendar h2 {
    text-align: center;
    color: #0073aa;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
}

/* カレンダーの月名と年の表示スタイルを調整 */
.ui-datepicker-title {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* フロントエンド予約フォームのスタイル */
.reservation-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.reservation-form-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.reservation-section {
    margin-bottom: 30px;
}

.reservation-section h3 {
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
    margin-bottom: 15px;
    color: #0073aa;
}

/* メッセージ関連のスタイル */
.error {
    color: #ff0000;
    font-weight: bold;
}

.reservation-success {
    color: #008000;
    font-weight: bold;
    padding: 10px;
    background-color: #f0fff0;
    border: 1px solid #d0e9c6;
    border-radius: 4px;
}

.reservation-confirmation {
    padding: 15px;
    background-color: #e7f5ff;
    border-left: 4px solid #0073aa;
    margin-bottom: 20px;
}

.reservation-error {
    padding: 15px;
    background-color: #ffe7e7;
    border-left: 4px solid #aa0000;
    margin-bottom: 20px;
}

/* 予約結果表示エリア */
#reservation-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

#reservation-result p {
    margin: 0;
    padding: 0;
}

#reservation-result .error {
    background-color: #ffe7e7;
    border-left: 4px solid #aa0000;
    padding: 10px;
    border-radius: 4px;
}

/* 送信中メッセージのスタイル */
#reservation-result p:not(.error):not(.reservation-success) {
    color: #666;
    font-style: italic;
}

/* カレンダー下の予約案内 */
.calendar-instructions {
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    color: #666;
}

.calendar-instructions strong {
    color: #0073aa;
}

/* 時間スロットのタイトル部分 */
#time-slots h4 {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* カレンダーの月名と年の表示スタイルを調整 */
.ui-datepicker-title {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* レスポンシブ対応 */
@media screen and (max-width: 782px) {
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }
    
    .form-table th {
        padding-bottom: 0;
    }
    
    .time-slots-container {
        justify-content: center;
    }
    
    .time-slot {
        margin: 3px;
        padding: 6px 10px;
    }
    
    #reservation-form {
        padding: 15px;
    }
    
    #submit-reservation button[type="submit"] {
        width: 100%;
    }
    
    #reservation-calendar {
        padding: 15px;
    }
    
    .ui-datepicker {
        font-size: 13px;
    }
    
    .ui-datepicker td a {
        padding: 6px;
    }
}

/* 小さい画面でのさらなる調整 */
@media screen and (max-width: 480px) {
    #datepicker, 
    .ui-datepicker {
        max-width: 100%;
    }
    
    .time-slot {
        padding: 5px 8px;
        margin: 2px;
        font-size: 13px;
    }
    
    .ui-datepicker .ui-datepicker-title {
        font-size: 14px;
    }
    
    .ui-datepicker th {
        font-size: 11px;
        padding: 5px 0;
    }
}