/* ===========================================
   문의하기 페이지 스타일
   =========================================== */


/* ===========================================
   콘텐츠 레이아웃
   =========================================== */

.contact-content {
    width: 100%;
    padding: 80px 0 120px;
}

.contact-layout {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}


/* ===========================================
   문의 폼 영역
   =========================================== */

.contact-form-wrapper {
    flex: 1;
    max-width: 790px;
    min-width: 0;
}

.form-title {
    color: #333333;
    font-size: 40px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    line-height: 64px;
    margin: 0 0 40px 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
}


/* 폼 그룹 */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 15px;
}

.form-divider {
    width: 100%;
    height: 1px;
    background: #E0E0E0;
    margin-bottom: 10px;
}

.form-group:first-of-type .form-divider {
    background: #000000;
}


/* 라벨 */

.form-label {
    color: #333333;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    margin: 0;
}


/* 입력 필드 */

.form-input {
    width: 400px;
    max-width: 100%;
    padding: 16px 30px;
    border: 1px solid #E0E0E0;
    background: white;
    color: #333333;
    font-size: 18px;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input::placeholder {
    color: #888888;
}

.form-input:focus {
    border-color: #0E6A44;
}


/* 텍스트 영역 */

.form-textarea {
    width: 100%;
    padding: 16px 30px;
    border: 1px solid #E0E0E0;
    background: white;
    color: #333333;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    line-height: 25.2px;
    outline: none;
    resize: vertical;
    min-height: 252px;
    transition: border-color 0.3s ease;
}

.form-textarea::placeholder {
    color: #888888;
}

.form-textarea:focus {
    border-color: #0E6A44;
}


/* 체크박스 그리드 */

.checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.checkbox-row {
    display: flex;
    gap: 0;
}


/* 체크박스 라벨 */

.checkbox-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 1px solid #E0E0E0;
    border-radius: 50%;
    background: white;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom {
    background: #0E6A44;
    border-color: #0E6A44;
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.checkbox-text {
    color: #888888;
    font-size: 18px;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    line-height: 18px;
    transition: color 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked~.checkbox-text {
    color: #333333;
}


/* 개인정보 동의 */

.form-agreement {
    padding-top: 10px;
}

.agreement-label {
    flex: none;
    gap: 25px;
}

.privacy-link {
    color: #333333;
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: #0E6A44;
}

.privacy-popup-btn {
    background: none;
    border: none;
    color: #333333;
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
}

.privacy-popup-btn:hover {
    color: #0E6A44;
}

.agreement-label .checkbox-text {
    color: #333333;
    font-size: 16px;
    font-weight: 400;
}


/* 제출 버튼 */

.submit-button {
    width: 100%;
    padding: 20px 60px;
    background: #333333;
    border: none;
    color: white;
    font-size: 16px;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    line-height: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.submit-button:hover {
    background: #0E6A44;
}

.submit-button:disabled {
    background: #CCCCCC;
    cursor: not-allowed;
}


/* ===========================================
   정보 박스 영역
   =========================================== */

.contact-info {
    width: 351px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    top: 0;
}

/* Sticky wrapper가 원래 공간을 유지하도록 */
.sticky-wrapper {
    width: 351px;
    flex-shrink: 0;
}

/* Sticky 상태일 때도 레이아웃 유지 */
.contact-info.is-sticky {
    position: fixed;
}

.info-box {
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #F1F1F5;
}

.info-title {
    color: white;
    font-size: 20px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    line-height: 32px;
    margin: 0 0 4px 0;
}


/* 전화상담 박스 */

.phone-box {
    background: #0E6A44;
}

.info-phone {
    color: white;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    line-height: 28.8px;
    margin: 0;
}


/* 진료시간 박스 */

.hours-box {
    background: #0C472F;
}

.hours-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hours-highlight {
    color: white;
    font-size: 20px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    line-height: 20px;
    margin: 16px 0 0 0;
}

.hours-divider {
    width: 100%;
    height: 1px;
    background: #24825B;
}

.hours-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hours-item {
    display: flex;
    gap: 20px;
}

.hours-label {
    width: 100px;
    color: white;
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    line-height: 25.6px;
    flex-shrink: 0;
}

.hours-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hours-time {
    color: #EFFAF6;
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 500;
    line-height: 25.6px;
    margin: 0;
}

.hours-note {
    color: #EFFAF6;
    font-size: 14px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    line-height: 22.4px;
    margin: 0;
}


/* ===========================================
   반응형 - 태블릿/모바일 (1028px 이하)
   =========================================== */

@media (max-width: 1028px) {
    .contact-content {
        padding: 60px 16px 80px;
    }
    .contact-layout {
        flex-direction: column;
        gap: 40px;
    }
    /* 폼 영역 */
    .contact-form-wrapper {
        width: 100%;
        max-width: none;
    }
    .form-title {
        font-size: 28px;
        line-height: 44.8px;
        margin-bottom: 30px;
    }
    .form-group {
        padding: 16px 0;
    }
    .form-label {
        font-size: 16px;
    }
    .form-input {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
    .form-textarea {
        padding: 12px 20px;
        font-size: 16px;
        line-height: 22.4px;
        min-height: 200px;
    }
    /* 체크박스 */
    .checkbox-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .checkbox-label {
        flex: 1 1 45%;
        min-width: 150px;
    }
    .checkbox-text {
        font-size: 14px;
        line-height: 14px;
    }
    .agreement-label {
        gap: 15px;
    }
    .privacy-link,
    .agreement-label .checkbox-text {
        font-size: 14px;
    }
    .submit-button {
        padding: 16px 40px;
        font-size: 14px;
        line-height: 14px;
    }
    /* 정보 박스 */
    .contact-info {
        width: 100%;
        position: static;
        gap: 16px;
    }
    .info-box {
        padding: 24px;
    }
    .info-title {
        font-size: 18px;
        line-height: 28.8px;
    }
    .info-phone {
        font-size: 16px;
        line-height: 25.6px;
    }
    .hours-highlight {
        font-size: 18px;
        line-height: 18px;
    }
    .hours-label,
    .hours-time {
        font-size: 14px;
        line-height: 22.4px;
    }
    .hours-note {
        font-size: 12px;
        line-height: 19.2px;
    }
}


/* ===========================================
   반응형 - 작은 모바일 (480px 이하)
   =========================================== */

@media (max-width: 480px) {
    .form-title {
        font-size: 24px;
        line-height: 38.4px;
    }
    .checkbox-label {
        flex: 1 1 100%;
    }
    .hours-item {
        flex-direction: column;
        gap: 4px;
    }
    .hours-label {
        width: 100%;
    }
}


/* ===========================================
   에러 하이라이트 스타일
   =========================================== */


/* 입력 필드 에러 */

.form-input.error-highlight,
.form-textarea.error-highlight {
    border-color: #d63638 !important;
    border-width: 2px !important;
    background-color: #fff5f5 !important;
    animation: shake 0.5s ease;
}


/* 체크박스 그리드 에러 */

.checkbox-grid.error-highlight {
    padding: 15px;
    border: 2px solid #d63638;
    border-radius: 4px;
    background: rgba(214, 54, 56, 0.08);
    animation: shake 0.5s ease;
    margin: -5px;
}


/* 개인정보 동의 에러 */

.form-agreement.error-highlight {
    padding: 15px;
    border: 2px solid #d63638;
    border-radius: 4px;
    background: rgba(214, 54, 56, 0.08);
    animation: shake 0.5s ease;
    margin: -5px;
}


/* 흔들림 애니메이션 */

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-8px);
    }
    20%,
    40%,
    60%,
    80% {
        transform: translateX(8px);
    }
}


/* 포커스 시 에러 색상 유지 */

.form-input.error-highlight:focus,
.form-textarea.error-highlight:focus {
    border-color: #d63638;
    outline: none;
    box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.1);
}


/* ===========================================
   개인정보 팝업 스타일
   =========================================== */


/* 팝업 모달 */

.privacy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.privacy-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.privacy-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.privacy-modal-content {
    position: relative;
    background: white;
    border-radius: 0;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    padding: 60px;
}

.privacy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 20px;
    border-bottom: 1px solid #E0E0E0;
    flex-shrink: 0;
}

.privacy-modal-title {
    color: #333333;
    font-size: 20px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    margin: 0;
}

.privacy-modal-close {
    background: none;
    border: none;
    font-size: 30px;
    color: #888888;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    line-height: 1;
}

.privacy-modal-close:hover {
    color: #333333;
}

.privacy-modal-body {
    padding: 30px 0 0;
    overflow-y: auto;
    line-height: 1.6;
    flex: 1;
}

.privacy-modal-body h3 {
    color: #333333;
    font-size: 18px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    margin: 25px 0 15px 0;
}

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

.privacy-modal-body h4 {
    color: #333333;
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.privacy-modal-body p {
    color: #666666;
    font-size: 14px;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    margin: 0 0 15px 0;
}

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

.privacy-modal-body li {
    color: #666666;
    font-size: 14px;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    margin-bottom: 8px;
}

.privacy-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #E0E0E0;
    text-align: center;
    flex-shrink: 0;
}

.privacy-modal-confirm {
    background: #0E6A44;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.privacy-modal-confirm:hover {
    background: #0C472F;
}


/* 애니메이션 */

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


/* 모바일 대응 */

@media (max-width: 768px) {
    .privacy-modal-content {
        margin: 0;
        max-height: 100vh;
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-width: 100%;
        padding: 0px;
    }
    .privacy-modal-header {
        padding: 15px;
        background: #EDEFF1;
    }
    .privacy-modal-title {
        font-size: 14px;
        color: #888888;
    }
    .privacy-modal-body {
        padding: 20px;
        max-height: 100vh;
    }
    .privacy-modal-body h3 {
        font-size: 14px;
    }
    .privacy-modal-body h4 {
        font-size: 13px;
    }
    .privacy-modal-body p,
    .privacy-modal-body li {
        font-size: 12px;
    }
    .privacy-modal-footer {
        padding: 15px 20px;
    }
    .privacy-modal-confirm {
        padding: 10px 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .privacy-popup-btn,
    .agreement-label .checkbox-text {
        font-size: 14px;
    }
    .privacy-modal-header {
        padding: 20px;
    }
}