/* 신청서 폼 스타일 */

.form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

.form-subtitle {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.form-hook-message {
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CC 100%);
    border-left: 4px solid #FFB800;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #856404;
    text-align: center;
    line-height: 1.6;
}

.application-form {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-section {
    margin-bottom: 40px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

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

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-label .required {
    color: #FF6B6B;
    margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4ECDC4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 13px;
    color: #999;
    margin-top: 6px;
    line-height: 1.4;
}

/* 체크박스 그룹 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #4ECDC4;
}

.checkbox-item label {
    font-size: 15px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

/* 라디오 버튼 그룹 */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.radio-item {
    display: flex;
    align-items: center;
}

.radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #4ECDC4;
}

.radio-item label {
    font-size: 15px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

/* 요일/시간 선택 */
.time-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.time-chip {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #F8F9FA;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.time-chip input[type="checkbox"] {
    display: none;
}

.time-chip:hover {
    background: #F0F0F0;
}

.time-chip input[type="checkbox"]:checked + label {
    font-weight: 700;
}

.time-chip.checked {
    background: #E8F8F7;
    border-color: #4ECDC4;
    color: #4ECDC4;
    font-weight: 700;
}

/* 약관 동의 */
.terms-section {
    background: #F8F9FA;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.terms-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.terms-item:last-child {
    margin-bottom: 0;
}

.terms-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #4ECDC4;
}

.terms-item label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
}

.terms-link {
    color: #4ECDC4;
    text-decoration: underline;
    margin-left: 4px;
}

/* 제출 버튼 */
.form-submit {
    margin-top: 40px;
    text-align: center;
}

.submit-button {
    width: 100%;
    max-width: 400px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* 부모용 색상 */
.parent-page .submit-button {
    background: linear-gradient(135deg, #FFD93D 0%, #FFC837 100%);
    color: #333;
}

.parent-page .submit-button:hover {
    background: linear-gradient(135deg, #FFC837 0%, #FFB800 100%);
}

.parent-page .form-input:focus,
.parent-page .form-select:focus,
.parent-page .form-textarea:focus {
    border-color: #FFD93D;
    box-shadow: 0 0 0 3px rgba(255, 217, 61, 0.1);
}

.parent-page .checkbox-item input[type="checkbox"],
.parent-page .radio-item input[type="radio"],
.parent-page .terms-item input[type="checkbox"] {
    accent-color: #FFD93D;
}

.parent-page .time-chip.checked {
    background: #FFF9E6;
    border-color: #FFD93D;
    color: #FFB800;
}

.parent-page .terms-link {
    color: #FFB800;
}

/* 치료사용 색상 */
.therapist-page .submit-button {
    background: linear-gradient(135deg, #4ECDC4 0%, #44B8B0 100%);
    color: white;
}

.therapist-page .submit-button:hover {
    background: linear-gradient(135deg, #44B8B0 0%, #3AA8A0 100%);
}

/* 성공 메시지 */
.success-message {
    display: none;
    text-align: center;
    padding: 60px 20px;
}

.success-message.show {
    display: block;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.success-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

.success-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* 로딩 스피너 */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 약관 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 24px 0 12px 0;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.modal-body ul {
    margin: 12px 0;
    padding-left: 20px;
}

.modal-body ul li {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 6px;
}

.modal-body strong {
    color: #333;
    font-weight: 600;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #E5E5E5;
    display: flex;
    justify-content: center;
}

.modal-footer .btn {
    padding: 12px 32px;
    font-size: 16px;
}

/* 반응형 */
@media (max-width: 768px) {
    .application-form {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .time-selection {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        max-height: 85vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .modal-title {
        font-size: 18px;
    }
}

/* 이미지 스크롤 컨테이너 */
.image-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: #FFB800 #f0f0f0;
}

.image-scroll-container::-webkit-scrollbar {
    width: 10px;
}

.image-scroll-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.image-scroll-container::-webkit-scrollbar-thumb {
    background: #FFB800;
    border-radius: 10px;
    transition: background 0.3s;
}

.image-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #FFA500;
}

@media (max-width: 768px) {
    .image-scroll-container {
        max-height: 400px !important;
    }
}
