/**
 * 커스텀 댓글 스타일 - HYTOTAL
 */

/* 댓글 섹션 */
.hytotal-comment-section {
    margin-top: 40px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.hytotal-comment-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hytotal-comment-title i {
    font-size: 22px;
}

.hytotal-comment-title .comment-count {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* 댓글 목록 */
.hytotal-comment-list {
    margin-bottom: 30px;
}

.hytotal-comment-item {
    padding: 15px 0;
    padding-right: 100px;
    border-bottom: 1px solid #eee;
    position: relative;
    background: transparent;
}

.hytotal-comment-item:last-child {
    border-bottom: none;
}

.hytotal-comment-item.secret {
    background: transparent;
}

.hytotal-comment-item.reply {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 3px solid #e0e0e0;
}

.hytotal-comment-item.reply.depth-2 {
    margin-left: 40px;
}

.hytotal-comment-item.reply.depth-3 {
    margin-left: 60px;
}

.hytotal-comment-item .reply-icon {
    position: absolute;
    left: 5px;
    top: 18px;
    color: #999;
    font-size: 14px;
}

/* 댓글 헤더 */
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-author i {
    color: #999;
}

.comment-date {
    font-size: 12px;
    color: #888;
}

/* 댓글 본문 */
.comment-body {
    margin-bottom: 10px;
}

.secret-message {
    color: #888;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-extra-fields {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.extra-field-item {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 14px;
}

.extra-field-item:last-child {
    margin-bottom: 0;
}

.extra-field-item .field-label {
    color: #666;
    font-weight: 500;
    min-width: 80px;
}

.extra-field-item .field-value {
    color: #333;
}

.comment-content {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

/* 댓글 액션 버튼 - 우측 absolute */
.comment-actions {
    position: absolute;
    right: 0;
    top: 15px;
    display: flex;
    gap: 4px;
    margin-top: 0;
}

.comment-actions button {
    padding: 6px 8px;
    font-size: 0;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #aaa;
}

.comment-actions button i {
    font-size: 20px;
}

.comment-actions button:hover {
    background: #f0f0f0;
}

.comment-actions .btn-reply {
    color: #999;
}

.comment-actions .btn-reply:hover {
    color: #2196F3;
    background: #e3f2fd;
}

.comment-actions .btn-edit-comment {
    color: #999;
}

.comment-actions .btn-edit-comment:hover {
    color: #4CAF50;
    background: #e8f5e9;
}

.comment-actions .btn-delete-comment {
    color: #999;
}

.comment-actions .btn-delete-comment:hover {
    color: #f44336;
    background: #ffebee;
}

/* 댓글 없음 */
.no-comments {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 14px;
}

/* 답글 폼 영역 - 부모 padding-right 상쇄 */
.reply-form-area {
    margin-top: 15px;
    margin-right: -100px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.reply-form-area .hytotal-comment-form-wrapper {
    margin: 0;
    padding: 0;
    box-shadow: none;
}

/* 댓글 작성 폼 */
.hytotal-comment-form-wrapper {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.hytotal-comment-form-wrapper .form-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hytotal-comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 기본 필드 래퍼 */
.basic-fields-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 600px) {
    .basic-fields-wrapper {
        grid-template-columns: 1fr;
    }
}

/* 추가 필드 래퍼 */
.extra-fields-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

/* 폼 필드 */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-field .required {
    color: #f44336;
}

.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #2196F3;
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* 라디오/체크박스 그룹 */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

.radio-label input,
.checkbox-label input {
    width: 16px;
    height: 16px;
}

/* 비밀댓글 필드 */
.secret-field {
    padding: 10px;
    background: #fff3e0;
    border-radius: 6px;
}

.secret-checkbox {
    font-weight: 500;
}

.secret-checkbox i {
    color: #ff9800;
}

.secret-field .help-text {
    font-size: 12px;
    color: #888;
    margin-left: 24px;
}

/* 캡차 필드 */
.captcha-field {
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.captcha-wrapper img {
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    min-width: 160px;
    min-height: 60px;
    background: #fff;
}

.btn-refresh-captcha {
    padding: 8px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn-refresh-captcha:hover {
    background: #f5f5f5;
}

/* 제출 버튼 */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.btn-submit-comment {
    padding: 12px 24px;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-submit-comment:hover {
    background: #1976D2;
}

.btn-cancel-comment {
    padding: 12px 20px;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-cancel-comment:hover {
    background: #eee;
}

/* 반응형 */
@media (max-width: 768px) {
    .hytotal-comment-section {
        padding: 0;
        margin-top: 30px;
    }

    .hytotal-comment-item.reply {
        margin-left: 10px;
        padding-left: 15px;
    }

    .hytotal-comment-item.reply.depth-2 {
        margin-left: 20px;
    }

    .hytotal-comment-item.reply.depth-3 {
        margin-left: 30px;
    }

    .hytotal-comment-item {
        padding-right: 80px;
    }

    .reply-form-area {
        margin-right: -80px;
    }

    .comment-actions {
        gap: 2px;
    }

    .comment-actions button {
        padding: 4px 5px;
    }

    .comment-actions button i {
        font-size: 14px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit-comment,
    .btn-cancel-comment {
        justify-content: center;
    }
}

/* 교육모집형2 모드 스타일 */
.hytotal-comment-section.education2-mode {
    margin-top: 30px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.hytotal-comment-section.education2-mode .hytotal-comment-form-wrapper.education2-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border: none;
    margin-top: 0;
}

.education2-form-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #2196F3;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.education2-form-title i {
    font-size: 28px;
    color: #2196F3;
}

/* 개인정보보호정책 필드 */
.privacy-field {
    padding: 20px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #90caf9;
}

.privacy-agreement-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.privacy-checkbox {
    font-weight: 500;
}

.privacy-checkbox i {
    color: #1976D2;
}

.btn-view-privacy {
    padding: 8px 16px;
    background: #fff;
    color: #1976D2;
    border: 1px solid #1976D2;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-view-privacy:hover {
    background: #1976D2;
    color: #fff;
}

.privacy-field .help-text {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #1565C0;
}

/* 개인정보보호정책 모달 */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.privacy-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.privacy-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.privacy-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.privacy-modal-header h4 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-modal-header h4 i {
    color: #1976D2;
}

.btn-close-modal {
    padding: 8px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-close-modal:hover {
    background: #f0f0f0;
}

.privacy-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}

.privacy-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.btn-confirm-privacy {
    padding: 12px 40px;
    background: #1976D2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-confirm-privacy:hover {
    background: #1565C0;
}

@media (max-width: 768px) {
    .education2-form-title {
        font-size: 20px;
    }

    .education2-form-title i {
        font-size: 24px;
    }

    .hytotal-comment-section.education2-mode .hytotal-comment-form-wrapper.education2-form {
        padding: 20px;
    }

    .privacy-agreement-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-view-privacy {
        width: 100%;
        justify-content: center;
    }

    .privacy-modal-content {
        width: 95%;
        max-height: 90vh;
    }
}
