/* コース予約フォーム CSS */

.crf-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Meiryo, メイリオ, Osaka, 'MS PGothic', arial, helvetica, sans-serif;
}

.crf-container h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

.crf-field {
    margin-bottom: 20px;
}

.crf-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.required {
    color: #e74c3c;
}

.crf-field input,
.crf-field select,
.crf-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.crf-field input:focus,
.crf-field select:focus,
.crf-field textarea:focus {
    border-color: #e74c3c;
    outline: none;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.crf-field input:disabled,
.crf-field select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.seat-info {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.seat-info {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.seat-info .error {
    color: #dc3545;
    font-weight: bold;
}

.seat-info .success {
    color: #28a745;
    font-weight: bold;
}

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

/* 時間帯空き状況表示 */
.time-slot-info {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.availability-summary h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    text-align: center;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.seat-status {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.counter-status,
.table-status {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.seat-type {
    display: block;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.available-count {
    display: inline-block;
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin: 0 4px;
}

.seat-unit {
    font-size: 14px;
    color: #6c757d;
}

.counter-status .available-count {
    color: #007bff;
}

.table-status .available-count {
    color: #28a745;
}

/* 空きがない場合のスタイル */
.available-count[data-count="0"] {
    color: #dc3545;
}

.seat-notice {
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    font-size: 14px;
}

.seat-notice.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.crf-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crf-submit-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.crf-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.crf-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.crf-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.crf-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* カレンダー CSS */
.crf-calendar-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 20px 10px;
    position: relative;
    min-height: 60px;
}

.calendar-nav {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#prev-month {
    left: 10px;
}

#next-month {
    right: 10px;
}

.calendar-nav:hover {
    background: #2980b9;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#calendar-title {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.calendar-grid {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #34495e;
}

.weekday {
    padding: 15px;
    text-align: center;
    color: white;
    font-weight: bold;
    border-right: 1px solid #2c3e50;
}

.weekday:last-child {
    border-right: none;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 60px;
    padding: 10px;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover:not(.disabled) {
    background: #ecf0f1;
}

.calendar-day.selected {
    background: #3498db;
    color: white;
}

.calendar-day.today {
    background: #ffe6e6;
    color: #dc3545;
    font-weight: bold;
    border: 2px solid #dc3545;
}

.calendar-day.disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
}

.calendar-day.other-month {
    color: #bdc3c7;
}

.day-number {
    font-size: 16px;
}

/* 予約可能期間情報 CSS */
.booking-period-info {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e8, #f0f8ff);
    border-radius: 8px;
    border-left: 4px solid #27ae60;
    text-align: center;
}

.booking-period-text {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.booking-period-text strong {
    color: #27ae60;
    font-size: 18px;
}

.calendar-icon {
    font-size: 18px;
    color: #27ae60;
    font-weight: bold;
}

/* 予約一覧 CSS */
.crf-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.crf-login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.list-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.list-filters input,
.list-filters select,
.list-filters button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.list-filters button {
    background: #007cba;
    color: white;
    cursor: pointer;
}

.list-filters button:hover {
    background: #005a87;
}

.reservation-table-container {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.reservation-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.reservation-table th,
.reservation-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.reservation-table th {
    background: #f8f9fa;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.reservation-table tr:hover {
    background: #f8f9fa;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.logout-section {
    margin-top: 20px;
    text-align: center;
}

.logout-section button {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.logout-section button:hover {
    background: #c82333;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .crf-container {
        padding: 15px;
        margin: 10px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar-day {
        min-height: 40px;
        font-size: 14px;
    }
    
    .booking-period-info {
        margin-top: 15px;
        padding: 12px;
    }
    
    .booking-period-text {
        font-size: 14px;
        flex-direction: column;
        gap: 5px;
    }
    
    .booking-period-text strong {
        font-size: 16px;
    }
    
    .list-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reservation-table {
        font-size: 14px;
    }
    
    .reservation-table th,
    .reservation-table td {
        padding: 8px;
    }
    
    /* カレンダーヘッダーのスマホ対応 */
    .calendar-header {
        padding: 0 5px;
        margin-bottom: 15px;
    }
    
    #calendar-title {
        font-size: 20px;
    }
    
    .calendar-nav {
        background: #3498db !important;
        color: white !important;
        border: none !important;
        padding: 10px 12px !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        font-size: 16px !important;
        font-weight: bold !important;
        min-width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1 !important;
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
        transition: all 0.3s ease !important;
    }
    
    /* ナビゲーションボタンをより確実に左右端に配置 */
    #prev-month {
        left: 5px !important;
    }
    
    #next-month {
        right: 5px !important;
    }
    
    /* スマホ表示でのホバー効果 */
    .calendar-nav:hover {
        background: #2980b9 !important;
        transform: translateY(-50%) scale(1.05) !important;
        box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    }
    
    /* カレンダーヘッダーの調整 */
    .calendar-header {
        padding: 15px 5px !important;
        margin: 15px 0 !important;
        position: relative !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 50px !important;
    }
    
    #calendar-title {
        font-size: 20px !important;
        position: static !important;
        transform: none !important;
        left: auto !important;
    }
    
    /* 時間帯空き状況のレスポンシブ対応 */
    .seat-status {
        flex-direction: column;
        gap: 10px;
    }
    
    .availability-summary h4 {
        font-size: 14px;
    }
    
    .available-count {
        font-size: 20px;
    }
}
