/* ===== リセット・基本設定 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: #333;
}

/* ===== コンテナ ===== */


h2 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

h3 {
    font-size: 22px;
    margin: 0;
    color: #2c3e50;
}

.container{
    width: 760px;
    padding: 0 20px;
    margin: 60px auto;
}

/* ===== カレンダーヘッダー ===== */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 5px;
}

.nav-link {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: #3498db;
    color: #fff;
}

/* ===== 凡例 ===== */
.legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.box {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.full-box {
    background: #dfe6e9;
}

/* ===== カレンダーテーブル ===== */
.calendar {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.calendar th {
    background: #34495e;
    color: #fff;
    padding: 12px;
    font-weight: normal;
    font-size: 14px;
}

.calendar th.sunday {
    background: #e74c3c;
}

.calendar th.saturday {
    background: #3498db;
}

.calendar td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
    min-height: 120px;
    background: #fff;
    position: relative;
}

.calendar td.empty {
    background: #f8f9fa;
}

.calendar td.day {
    transition: background 0.2s;
}

.calendar td.past {
    background: #f1f3f4;
    opacity: 0.7;
}

.calendar td.full {
    background: #f8f9fa;
}

.date-number {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
}

.status {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
    font-weight: bold;
}

.past-label {
    color: #95a5a6;
}

.holiday-name {
    font-size: 11px;
    color: #e67e22;
    margin-top: 3px;
}

.reserve-btn {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 5px;
    transition: background 0.3s;
}

.reserve-btn:hover {
    background: #2980b9;
}

.availability {
    font-size: 11px;
    color: #95a5a6;
    margin-top: 5px;
}

/* ===== 時間スロット表示 ===== */
.time-slots {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.time-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 12px;
    background: #f8f9fa;
}

.time-slot.available {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}

.time-slot.reserved {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #9e9e9e;
}

.time-text {
    font-weight: bold;
    color: #2c3e50;
}

.capacity-text {
    font-size: 10px;
    color: #666;
    margin-left: 4px;
}

.reserved-label {
    font-size: 10px;
    background: #e0e0e0;
    color: #757575;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
}

.reserve-time-btn {
    background: #3498db;
    color: #fff;
    padding: 3px 8px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    transition: background 0.3s;
    white-space: nowrap;
}

.reserve-time-btn:hover {
    background: #2980b9;
}

/* ===== リンク ===== */
.links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
    margin-bottom: 60px;
}

.cancel-link {
    color: #e74c3c;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.cancel-link:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* ===== フォーム ===== */
.selected-date {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.selected-date p {
    margin: 0;
    font-size: 16px;
}

.reservation-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.required {
    color: #e74c3c;
    font-size: 12px;
    margin-left: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}
.form-group input[type="number"]{
    width: 80px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
}

.note {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* ===== ボタン ===== */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

/* ===== 確認画面 ===== */
.confirm-message {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.confirm-table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
    border-collapse: collapse;
}

.confirm-table th,
.confirm-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.confirm-table th {
    background: #ecf0f1;
    font-weight: bold;
    width: 30%;
}

/* ===== 完了画面 ===== */
.success-message {
    background: #d5f4e6;
    border: 2px solid #27ae60;
    color: #27ae60;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message p {
    margin: 5px 0;
}

.error-message {
    background: #fadbd8;
    border: 2px solid #e74c3c;
    color: #c0392b;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.reservation-info {
    margin: 30px 0;
}

.reservation-info h2 {
    margin-bottom: 15px;
    font-size: 20px;
}

.notice {
    background: #fff3cd;
    border-left: 4px solid #f39c12;
    padding: 15px;
    margin: 20px 0;
}

.notice h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #e67e22;
}

.notice p {
    margin: 5px 0;
    font-size: 14px;
}

.notice a {
    color: #e67e22;
    font-weight: bold;
}

/* ===== キャンセル画面 ===== */
.cancel-description {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
.container{
    width: 100%;
}
    .calendar-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar th,
    .calendar td {
        padding: 6px 3px;
        font-size: 11px;
    }
    
    .calendar td {
        min-height: auto;
    }
    
    .date-number {
        font-size: 14px;
    }
    
    .time-slots {
        gap: 3px;
    }
    
    .time-slot {
        padding: 3px 4px;
        font-size: 10px;
    }
    
    .reserve-time-btn {
        padding: 2px 6px;
        font-size: 10px;
    }
    
    .reserved-label {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    .confirm-table th, .confirm-table td{
        width: 100%;
        display: block;
    }
    .confirm-table th {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .calendar td {
        min-height: auto;
        padding: 4px 2px;
    }
    
    .time-slot {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .reserve-time-btn {
        width: 100%;
        text-align: center;
    }
    
    .legend {
        flex-direction: column;
        gap: 10px;
    }
}
