/* 예약 페이지 스타일 */

#reserve.sub_wrap {
    padding: 60px 0;
    min-height: 600px;}


/* 컨텐츠 영역 */
.content-area {margin-top: 30px;}
.content-section {display: none;}
.content-section.active {display: block;}

/* 예약 컨테이너 */
.reserve-container .form-title {
    font-size: 21px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    margin-top: 40px;}
.reserve-container .form-title.agreement-title {
    display: grid; 
    grid-template-columns: 1fr auto auto; 
    gap: 10px;
    border-bottom: solid 1px #ddd;
    margin-bottom: -1px;
    position: relative;}
.reserve-container .reserve-calendar {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    justify-items: center;
    border: 1px solid #e0e0e0;
    background-color: #ffffff;}
.reserve-container .calendar-section {width: 100%;}
.reserve-container .calendar-section .calendar-wrap {padding: 20px; max-width: 460px; margin: 0 auto;}
.reserve-container .reserve-form-section {width: 100%; border-left: solid 1px #ddd;}
.reserve-container .form-wrap,
.reserve-inquiry .form-wrap {border: solid 1px #ddd; padding: 40px 60px; background-color: #fff;}

@media screen and (max-width: 1024px) {
    .reserve-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .reserve-container .calendar-section {
        grid-row: 1;
    }
    
    .reserve-container .reserve-form-section {
        grid-row: 2;
    }
    
    .reserve-container .reserve-info-area {
        grid-row: 3;
    }
}

/* 캘린더 섹션 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.calendar-nav-btn {
    border-radius: 4px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;}
.calendar-nav-btn:hover {background: #e0e0e0; border-color: #bbb;}
.calendar-body {display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;position: relative;}
.calendar-weekday {
    text-align: center;
    font-weight: 600;
    color: #666;
    padding: 10px 0;
    font-size: 14px;}
.calendar-weekday:first-child::after {
    content: '';
    border-top: solid 1px #666666;
    display: block;
    width: 100%;
    height: 1px;
    position: absolute;
    margin-top: 10px;
}

.calendar-day {
    aspect-ratio: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    background: #fff;
    pointer-events: none;}
.calendar-day.empty {
    border: none;
    cursor: default;
    background: transparent;}
.calendar-day.past {
    color: #ccc;
    background: #f9f9f9;
    cursor: not-allowed;}
.calendar-day.available {
    background: #ffe2c3;
    border: 1px solid #ffe2c3;
    color: #895041;
    font-weight: 600;
    pointer-events: auto;}
.calendar-day.available:hover {background: #c1732f; color: #fff;}
.calendar-day.selected {
    background: #c1732f;
    color: #fff;
    border-color: #c1732f;
    font-weight: 700;}
.calendar-day.unavailable {
    color: #ccc;
    background: #f5f5f5;
    cursor: not-allowed;}

/* 예약 폼 섹션 */
.reserve-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.selected-date-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;}
.selected-date-info h3 span {color: #d2691e;}
.no-date-selected {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* 시간 선택 */
.time-selection {
    margin-bottom: 25px;
}

.time-selection h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.time-slots {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3px;
    margin-bottom: 20px;
}

.time-slot-btn {
    padding: 18px 5px;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.time-slot-btn:hover:not(:disabled) {border-color: #c1732f; color: #c1732f;}
.time-slot-btn.selected {
    border-color: #c1732f;
    background: #c1732f;
    color: #fff !important;
    font-weight: 700;
}

.time-slot-btn.full {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

.time-slot-btn:disabled {
    cursor: not-allowed;
}

.no-slots, .error {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

.error {
    color: #d32f2f;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
}

.form-group label {display: block; font-size: 16px; font-weight: 500; color: #333;}
.form-group label .required {color: #db8c3e; margin-left: 3px;}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="date"] {
    width: 100%;
    max-width: 380px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="date"]:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-group input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* 생년월일 입력 필드 */
.birthdate-inputs {
    display: flex;
    align-items: center;
    gap: 8px;}
.birthdate-inputs input[type="text"] {
    flex: 0 0 auto;
    width: 80px;
    text-align: center;}
.birthdate-inputs #birth-year {width: 120px;}
.birthdate-inputs #birth-month,
.birthdate-inputs #birth-day {width: 80px;}
.birthdate-separator {
    font-size: 16px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;}
.dong-inputs {display: flex; align-items: center; gap: 5px;}
.dong-inputs input[type="text"] {width: 120px; text-align: center;}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 버튼 */
.content-section .btn-wrap {text-align: center; margin: 20px auto;}
.btn-reserve, .btn-inquiry {
    background: #134a69;
    color: #fff;
    font-size: 24px;
    font-weight: 500;
    display: inline-flex;
    border-radius: 40px;
    height: 70px;
    width: 400px;
    justify-content: center;
    align-items: center;
    margin: 10px;
    position: relative;
}

.btn-reserve:hover, .btn-inquiry:hover {background: #0d3750;}

/* 예약 폼 섹션 구조 */
.reserve-form-section {
    display: flex;
    flex-direction: column;
}

.reserve-selection-area {padding: 27px;}

.reserve-info-area h4 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px !important;
}

.agreement-toggle-btn {
    padding: 6px 12px;
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: scaleX(1.8);
}


.time-selection-wrapper {
    margin-top: 33px;
}

/* 개인정보 수집 및 이용 동의 */
.privacy-agreement h4 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.agreement-content {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 20px 40px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.agreement-content p {
    margin: 8px 0;
}

.agreement-content strong {
    color: #333;
    font-weight: 600;
}

.agreement-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    color: #d32f2f;
    font-size: 12px;
}

.checkbox-group {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    opacity: 1;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #1a73e8;
    flex-shrink: 0;
    margin-right: 5px !important;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: 2px solid rgba(26, 115, 232, 0.3);
    outline-offset: 2px;
}

.checkbox-label span {
    line-height: 1.5;
    flex: 1;
}

@media screen and (max-width: 1024px) {
    .reserve-form-section {
        margin-top: 20px;
    }
}

/* 예약 조회 섹션 */
.reserve-inquiry {
    max-width: 600px;
    margin: 0 auto;}
.reserve-inquiry h3 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.inquiry-form {
    margin-bottom: 30px;
}

.inquiry-result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.inquiry-result h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.reservation-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reservation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s;
}

.reservation-item:hover {box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);}
.reservation-item.cancelled {
    background: #f5f5f5;
    opacity: 0.7;}

.reservation-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;}
.reservation-info p strong {
    color: #333;
    font-weight: 600;
    margin-right: 8px;
}

.btn-cancel {
    padding: 10px 20px;
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;}
.btn-cancel:hover {background: #b71c1c;}
.no-reservation {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* 반응형 디자인 */
@media screen and (max-width: 768px) {
    .tab-item {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .calendar-section {max-width: 100%;}
    .calendar-title {font-size: 16px;}
    .calendar-day {font-size: 12px; padding: 5px;}
    .selected-date-info h3 {
        font-size: 14px;
    }
    .reserve-selection-area {
        padding: 10px;}
    .time-selection h4 {
            font-size: 14px;}
    .time-slot-btn {padding: 15px 3px; font-size: 12px;}
    
    .time-slots {grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));}
    .form-row {grid-template-columns: 1fr;}
    
    .birthdate-inputs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .birthdate-inputs input[type="text"] {
        width: 70px;
    }
    
    .birthdate-inputs #birth-year {
        width: 90px;
    }
    
    .birthdate-inputs #birth-month,
    .birthdate-inputs #birth-day {
        width: 50px;
    }
    
    .birthdate-separator {
        font-size: 12px;
    }
    
    .reservation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .btn-cancel {
        width: 100%;
    }
    .reserve-container .reserve-calendar {grid-template-columns: 1fr;}
    .reserve-container .calendar-section .calendar-wrap {padding: 5px;}    
    .no-date-selected {font-size: 14px;}
    .reserve-container .form-title {font-size: 14px;}
    .reserve-container .form-wrap, .reserve-inquiry .form-wrap {padding: 20px 10px;}
    .form-group {grid-template-columns: 1fr;}
    .form-group label {font-size: 14px;}
    .btn-reserve, .btn-inquiry {font-size: 12px; border-radius: 6px; height: 35px; width: calc(50% - 5px); margin: 1px;}
    .form-group input[type="text"], .form-group input[type="tel"], .form-group input[type="date"] {padding: 10px 10px;}
    .reserve-container .form-title.agreement-title {border-bottom:none; margin-bottom: 60px;}
    .reserve-container .form-title.agreement-title .checkbox-group {
        position: absolute;
        bottom: -50px;
        border-bottom: solid 1px #ddd;
        padding-bottom: 10px;}
    .agreement-content {margin-top: 40px; padding: 10px; line-height: 1.3; font-size: 12px;}
    .dong-inputs input[type="text"] {width: 100px;}
    .reserve-inquiry h3 {font-size: 16px;}
}

