@charset "utf-8";

/* 댓글 스킨 CSS - 최적화 버전 */

/* 댓글 영역 전체 감싸기 */
.comment_wrap {
    margin: 40px 0;
    border-top: 1px solid var(--border-color);
    padding: 0 10px; /* 좌우 여백 추가 */
}

/* 댓글 헤더 */
.comment_header {
    position: relative;
    padding: 20px 0;
}

/* 댓글 버튼 */
.cmt_btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--body-color);
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.cmt_btn .total {
    display: inline-flex;
    align-items: center;
}

.cmt_btn .total b {
    margin-left: 5px;
    color: var(--accent-color);
}

.cmt_btn .cmt_more {
    position: relative;
    width: 18px;
    height: 18px;
}

.cmt_btn .cmt_more:before,
.cmt_btn .cmt_more:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

.cmt_btn .cmt_more:before {
    transform: translateY(-50%);
}

.cmt_btn .cmt_more:after {
    transform: translateY(-50%) rotate(90deg);
}

.cmt_btn_op .cmt_more:after {
    transform: translateY(-50%) rotate(0);
}

/* 댓글 목록 */
#bo_vc {
    margin-bottom: 30px;
    padding: 0 20px;
}

#bo_vc h2 {
    position: absolute;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}

/* 댓글 아이템 */
.comment_item {
    margin-top: 15px; /* 상단 여백 추가 */
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

.comment_item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.comment_inner {
    display: flex;
    position: relative;
}

/* 답변 댓글 스타일링 */
.reply_comment {
    background: var(--input-bg);
    border-radius: 8px;
    padding: 20px;
    border-left: 3px solid var(--accent-color);
}

.reply_comment::before {
    content: "\f3e5";
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: -30px;
    top: 10px;
    color: var(--accent-color);
}

/* 프로필 영역 */
.profile_wrap {
    margin-right: 20px;
    flex-shrink: 0;
}

/* 댓글 내용 영역 */
.cm_wrap {
    flex: 1;
}

/* 댓글 메타 정보 */
.comment_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.comment_meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.comment_name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--body-color);
}

.comment_ip {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.comment_time {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.comment_time i {
    margin-right: 5px;
}

/* 댓글 내용 */
.comment_content {
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--body-color);
    word-break: break-word;
}

.comment_content p {
    margin: 0;
}

.comment_content i.fas.fa-lock {
    color: var(--secondary-color);
    margin-right: 5px;
}

/* 댓글 액션 버튼 */
.comment_actions {
    position: relative;
}

.btn_cm_opt {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--secondary-color);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn_cm_opt:hover {
    color: var(--accent-color);
}

.bo_vc_act {
    display: none;
    position: absolute;
    top: 30px;
    right: 0;
    z-index: 999;
    width: 130px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0 3px 10px var(--shadow);
    overflow: hidden;
}

.bo_vc_act:before {
    content: "";
    position: absolute;
    top: -8px;
    right: 10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 6px 8px 6px;
    border-color: transparent transparent var(--card-bg) transparent;
}

.bo_vc_act li {
    border-bottom: 1px solid var(--border-color);
}

.bo_vc_act li:last-child {
    border-bottom: 0;
}

.bo_vc_act li a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--body-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.bo_vc_act li a:hover {
    background: var(--input-bg);
    color: var(--accent-color);
}

.bo_vc_act li a i {
    margin-right: 8px;
    width: 14px;
    text-align: center;
}

/* 빈 댓글 메시지 */
.empty_comment {
    padding: 30px 0;
    text-align: center;
    color: var(--secondary-color);
    font-size: 1rem;
}

/* 댓글 작성 폼 */
.comment_form {
    margin-top: 30px;
    padding: 30px 20px;
    background: var(--input-bg);
    border-radius: 10px;
}

.comment_form_title {
    margin: 0 0 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--body-color);
}

.comment_form_content {
    position: relative;
    margin-bottom: 20px;
}

#char_cnt {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

#char_cnt #char_count {
    color: var(--accent-color);
    font-weight: bold;
}

textarea#wr_content {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--card-bg);
    color: var(--body-color);
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea#wr_content:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 95, 239, 0.15);
}

.comment_form_info {
    margin-bottom: 20px;
}

/* 댓글 작성 폼 - 게스트 정보 입력 영역 개선 */
.guest_info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.guest_info .input_wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}

/* 입력 필드 스타일 개선 */
.guest_info .frm_input {
    width: 100%;
    height: 45px;
    padding: 0 15px 0 40px; /* 왼쪽 여백 추가로 아이콘 공간 확보 */
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--card-bg);
    color: var(--body-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* 입력 필드 포커스 효과 */
.guest_info .frm_input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(93, 95, 239, 0.15);
    outline: none;
}

/* 아이콘 추가 */
.guest_info .input_wrap:before {
    position: absolute;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 1rem;
    color: var(--secondary-color);
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

/* 이름 필드 아이콘 */
.guest_info .input_wrap:nth-child(1):before {
    content: '\f007'; /* 사용자 아이콘 */
}

/* 비밀번호 필드 아이콘 */
.guest_info .input_wrap:nth-child(2):before {
    content: '\f023'; /* 자물쇠 아이콘 */
}

/* 라벨 스타일 */
.guest_info label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 플레이스홀더 텍스트 스타일 */
.guest_info .frm_input::placeholder {
    color: var(--secondary-color);
    opacity: 0.7;
}

.comment_form_actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* 비밀글 체크박스 스타일 개선 */
.secret_wrap {
    position: relative;
    margin: 0 15px 0 0;
}

.secret_wrap input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.secret_wrap label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--body-color);
}

.secret_wrap label span {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    transition: all 0.2s ease-in-out;
}

.secret_wrap input[type="checkbox"]:checked + label span {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.secret_wrap input[type="checkbox"]:checked + label span:after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 11px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn_submit {
    min-width: 120px;
    height: 45px;
    padding: 0 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn_submit:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(93, 95, 239, 0.2);
}

/* SNS 공유 */
.sns_share {
    margin: 15px 0;
}

#bo_vc_sns {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 10px;
}

#bo_vc_sns li {
    flex: 0 0 auto;
}

#bo_vc_sns .sns_li_f,
#bo_vc_sns .sns_li_t {
    display: flex;
    align-items: center;
    height: 38px;
    padding: 0 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: white;
    transition: all 0.3s ease;
}

#bo_vc_sns .sns_li_f {
    background: #3b5999;
}

#bo_vc_sns .sns_li_t {
    background: #1da1f2;
}

#bo_vc_sns a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

#bo_vc_sns a:hover {
    text-decoration: underline;
}

/* 반응형 */
@media (max-width: 768px) {
    .comment_inner {
        flex-direction: column;
    }
    
    .profile_wrap {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .cm_wrap {
        width: 100%;
    }
    
    .guest_info {
        flex-direction: column;
        gap: 10px;
    }
    
    .guest_info .input_wrap {
        width: 100%;
    }
    
    .comment_form_actions {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 15px;
    }
    
    .btn_submit {
        width: 100%;
        margin-top: 10px;
    }
    
    .secret_wrap {
        margin: 5px 0;
    }
}