/* リセットとベースのスタイル */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

.container {
    max-width: 600px;
    margin: 0 auto 200px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #e63946;
    font-size: 24px;
    margin-bottom: 10px;
}

h2 {
    font-size: 18px;
    color: #555;
}

/* フォームスタイル */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 姓名入力フィールド */
.name-fields {
    display: flex;
    gap: 10px;
}

.name-fields .form-group {
    flex: 1;
}

/* カレンダースタイル */
.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    background-color: #4CAF50;
    color: white;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 日付範囲表示の改善 */
#date-range {
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    margin: 0 15px;
    min-width: 200px;
}

/* 前後ボタンの改善 */
#prev-week, #next-week {
    background-color: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 15px;
    cursor: pointer;
    width: 60px;
    height: 36px;
    border-radius: 15%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

#prev-week:hover, #next-week:hover {
    background-color: rgba(255,255,255,0.3);
}

.calendar-header button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.calendar-grid {
    display: table;
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.week-day {
    display: table-row;
    text-align: center;
    background-color: #f2f2f2;
}

.week-day span {
    display: table-cell;
    padding: 5px;
    width: calc(100% / 7);
    font-weight: bold;
    font-size: 0.9em;
}

.date-row {
    display: table-row;
    text-align: center;
    background-color: #f8f8f8;
}

.date-cell {
    display: table-cell;
    padding: 5px;
    border-bottom: 1px solid #ddd;
    width: 14.28%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9em;
    font-weight:bold;
}

.time-row {
    display: table-row;
}

/* テーブルセルのスタイル - 均一の幅に設定 */
.time-cell {
    display: table-cell;
    padding: 10px 0px;
    text-align: center;
    border: 1px solid #ddd;
    width: 12.5%;
    height: 30px;
    vertical-align: middle;
    position: relative;
    font-size: 0.9rem; /* フォントサイズも少し小さく */
}

/* 時間ラベル */
.time-label {
    font-weight: bold;
    background-color: #f2f2f2;
    width: auto; /* 時間列は自動幅で内容に合わせる */
    min-width: 60px; /* 最小幅を設定 */
    white-space: nowrap; /* 時間表示が折り返されないようにする */
}

.available {
    cursor: pointer;
}

.weekend {
    background-color: #fff0f0;
}

/* ポップアップスタイル */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
}

.popup h3 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
    color: #e63946;
}

.popup p {
    margin-bottom: 10px;
}

.popup-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.popup-buttons button {
    flex: 1;
    padding: 15px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin: 0 8px;
}

#back-btn {
    background-color: #f2f2f2;
    color: #333;
}

#submit-btn {
    background-color: #4CAF50;
    color: white;
}

#submit-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* ユーティリティ */
.hidden {
    display: none;
}

/* ボタン */
.button-group {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}


/* SMS認証関連スタイル */
#verification-area {
    margin: 20px 0;
    text-align: center;
}

.verify-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 14px 0;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin: 10px 0;
    font-weight: bold;
    transition: background-color 0.3s;
}

.verify-btn:hover {
    background-color: #45a049;
}

#verification-code {
    width: 100%;
    padding: 15px;
    font-size: 20px;
    text-align: center;
    letter-spacing: 5px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin: 15px 0;
}

#verification-status {
    margin: 10px 0;
    font-weight: bold;
}

#code-input-area {
    margin-top: 15px;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
        width: 95%;
    }
    
    .popup-content {
        width: 95%;
        padding: 20px;
    }
    
    /* 人数選択改善 */
    select#people, select#course {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center;
        background-size: 20px;
        border-radius: 5px;
        border: 1px solid #ddd;
    }
    
    .calendar-container {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .calendar-grid {
        min-width: 550px;
    }
    .time-cell {
        padding: 10px 0;
        font-size: 0.8rem;
    }
    .popup-buttons button {
        padding: 15px 0;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 16px;
    }
}

/* 曜日の色分け */
.saturday {
    color: #0066cc;
}

.sunday {
    color: #e63946;
}

/* 本日ボタンの改善 */
#today-btn {
    background-color: rgba(255,255,255,0.8);
    color: #4CAF50;
    border: none;
    font-size:16px;
    border-radius: 4px;
    padding: 6px 12px;
    margin: 0 0 15px 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

#today-btn:hover {
    background-color: white;
}

/* 〇印のスタイル */
.available::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    background-color: transparent;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ×印のスタイル */
.unavailable::before {
    content: "×";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
}

/* -印のスタイル */
.closed::before {
    content: "-";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
}

/* コース選択関連のスタイル */
.course-details {
    margin: 15px 0;
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 15px;
}

.course-detail {
    border-left: 4px solid #4CAF50;
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.course-detail h3 {
    margin-top: 0;
    color: #333;
    font-size: 16px;
}

.course-detail .price {
    color: #e63946;
    font-weight: bold;
    margin: 5px 0;
}

.course-detail .description {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

/* コース画像のスタイル（修正） */
.course-image-container {
    text-align: center;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 6px;
}

.course-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 6px;
    transition: transform 0.3s;
    display: block;
    margin: 0 auto;
}

.course-image:hover {
    transform: scale(1.02);
}

/* 電話予約リンクのスタイル */
.tel-required {
    cursor: pointer;
    background-color: #fff8e1 !important; /* 薄い黄色の背景 */
}

.tel-link {
    color: #e63946 !important;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tel-link:hover {
    text-decoration: underline;
}

/* 「×」印の表示をオーバーライド */
.tel-required::before {
    content: none !important;
}

/* 電話予約リンクのスタイル */
.tel-required {
    cursor: pointer;
    background-color: #fff8e1 !important; /* 薄い黄色の背景 */
}

.tel-link {
    color: #e63946 !important;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tel-link:hover {
    text-decoration: underline;
}

/* 「×」印の表示をオーバーライド */
.tel-required::before {
    content: none !important;
}

/* イントロセクションのスタイル（修正） */
.intro-section {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    overflow: hidden;
}

.intro-images {
    text-align: center;
    margin-bottom: 20px;
    overflow: hidden;
}

.intro-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 6px;
    transition: transform 0.3s;
}

.intro-image:hover {
    transform: scale(1.02);
}

.intro-text h3 {
    color: #e63946;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
}

.intro-text p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #333;
}

@media (max-width: 600px) {
    .intro-image {
        max-width: 100%;
    }
    
    .course-image {
        max-width: 100%;
    }
}

.date-cell.sunday.today-column {
    border-bottom: 2px solid #4CAF50;
}
