@charset "utf-8";

/* ============================================
   수리나인 BASIC 게시판 댓글 스킨 CSS
   
   버전: 1.0.0
   스타일: 이미지 기반 모던 댓글 시스템
   디자인: 좋아요/댓글 버튼 → 댓글 입력창 → 댓글 목록
   작성일: 2025-01-16
   
   핵심 원칙:
   - 화이트 백그라운드 (#ffffff)
   - 깔끔한 회색 톤 (#868e96, #495057)
   - 보라색 등록 버튼 (#8b5cf6)
   - 모바일 우선 반응형 디자인
   ============================================ */

/* ===========================================
   ⚠️ 필수: CSS 리셋 (댓글 전용)
   =========================================== */

.ai_comment_container,
.ai_comment_container *,
.ai_comment_container *:before,
.ai_comment_container *:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ai_comment_container a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.ai_comment_container button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.ai_comment_container input,
.ai_comment_container textarea {
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
}

.ai_comment_container img {
    max-width: 100%;
    display: block;
}

/* ===========================================
   댓글 컨테이너 기본 스타일
   =========================================== */

.ai_comment_container {
    font-family: var(--suri-font-primary, 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif);
    line-height: 1.5;
    color: #212529;
    background: #ffffff;
    width: 100%;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f1f3f5;
}

/* ===========================================
   상단 인터랙션 버튼 (좋아요/댓글)
   =========================================== */

.ai_comment_container .ai_interaction_bar {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
}

.ai_comment_container .ai_interaction_btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #868e96;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ai_comment_container .ai_interaction_btn:hover {
    color: #495057;
}

.ai_comment_container .ai_interaction_btn.active {
    color: #8b5cf6;
}

.ai_comment_container .ai_interaction_btn i {
    font-size: 18px;
}

/* 좋아요 버튼 */
.ai_comment_container .ai_like_btn {
    color: #868e96;
}

.ai_comment_container .ai_like_btn.active {
    color: #dc3545;
}

.ai_comment_container .ai_like_count {
    font-size: 14px;
    font-weight: 600;
    margin-left: 4px;
}

/* 댓글 버튼 */
.ai_comment_container .ai_comment_btn {
    color: #868e96;
}

.ai_comment_container .ai_comment_btn.active {
    color: #8b5cf6;
}

/* ===========================================
   구분선
   =========================================== */

.ai_comment_container .ai_divider {
    width: 100%;
    height: 1px;
    background: #f1f3f5;
    margin: 16px 0;
}

/* ===========================================
   댓글 입력창 (기본 상태)
   =========================================== */

.ai_comment_container .ai_comment_input_wrap {
    width: 100%;
    margin-bottom: 24px;
}

.ai_comment_container .ai_comment_input_box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ai_comment_container .ai_comment_input_box:hover {
    background: #ffffff;
    border-color: #e9ecef;
}

.ai_comment_container .ai_comment_input_box:focus-within {
    border-color: #8b5cf6;
}

.ai_comment_container .ai_user_icon {
    color: #adb5bd;
    font-size: 32px;
}

.ai_comment_container .ai_comment_avatar_small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.ai_comment_container .ai_comment_avatar_small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai_comment_container .ai_comment_input {
    flex: 1;
    font-size: 15px;
    color: #868e96;
    background: transparent;
    padding: 0;
    border: none;
    outline: none;
    cursor: pointer;
}

.ai_comment_container .ai_comment_input::placeholder {
    color: #adb5bd;
}

/* ===========================================
   댓글 목록
   =========================================== */

.ai_comment_container .ai_comment_list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ai_comment_container .ai_comment_item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f5;
    position: relative;
}

.ai_comment_container .ai_comment_item:last-child {
    border-bottom: none;
}

/* 대댓글 스타일 */
.ai_comment_container .ai_comment_item.ai_comment_reply {
    margin-left: 44px; /* 모바일: 아바타 크기 + 여백 */
    padding-left: 16px;
    border-left: 2px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.ai_comment_container .ai_comment_item.ai_comment_reply .ai_comment_avatar {
    width: 28px;
    height: 28px;
}

/* 프로필 이미지 */
.ai_comment_container .ai_comment_avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

.ai_comment_container .ai_comment_avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 댓글 컨텐츠 */
.ai_comment_container .ai_comment_content {
    flex: 1;
    min-width: 0;
}

/* 댓글 헤더 (작성자명) */
.ai_comment_container .ai_comment_header {
    margin-bottom: 8px;
}

.ai_comment_container .ai_comment_author {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
}

.ai_comment_container .ai_comment_author .member {
    color: #8b5cf6;
}

.ai_comment_container .ai_comment_author .guest {
    color: #868e96;
}

.ai_comment_container .ai_comment_text {
    font-size: 15px;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 12px;
    word-break: keep-all;
}

.ai_comment_container .ai_comment_meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ai_comment_container .ai_comment_time {
    font-size: 13px;
    color: #868e96;
}

.ai_comment_container .ai_comment_actions {
    display: flex;
    gap: 12px;
}

.ai_comment_container .ai_action_btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #868e96;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ai_comment_container .ai_action_btn:hover {
    color: #495057;
    background: #e9ecef;
}

.ai_comment_container .ai_action_btn i {
    font-size: 12px;
}

/* 댓글달기 버튼 */
.ai_comment_container .ai_reply_btn {
    color: #868e96;
}

/* 도움이 돼요 버튼 */
.ai_comment_container .ai_helpful_btn {
    color: #868e96;
}

.ai_comment_container .ai_helpful_btn.active {
    color: #dc3545;
    background: #fff5f5;
}

/* 메뉴 버튼 */
.ai_comment_container .ai_menu_btn {
    margin-left: auto;
    padding: 4px;
    color: #868e96;
    cursor: pointer;
}

.ai_comment_container .ai_menu_btn:hover {
    color: #495057;
}

.ai_comment_container .ai_menu_btn.active {
    color: #495057;
    background: #f8f9fa;
}

/* 댓글 메뉴 */
.ai_comment_container .ai_comment_menu {
    position: relative;
    margin-left: auto;
}

.ai_comment_container .ai_menu_list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 100px;
    z-index: 100;
    overflow: hidden;
    margin-top: 4px;
}

.ai_comment_container .ai_menu_list li {
    list-style: none;
}

.ai_comment_container .ai_menu_list a {
    display: block;
    padding: 10px 16px;
    color: #495057;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.ai_comment_container .ai_menu_list a:hover {
    background: #f8f9fa;
}

/* 답글/수정 입력창 */
.ai_comment_container .ai_reply_form_wrap,
.ai_comment_container .ai_edit_form_wrap,
.ai_comment_container .ai_default_comment_wrap {
    margin-top: 12px;
    margin-bottom: 12px;
}

.ai_comment_container .ai_comment_form_wrap {
    padding: 20px 0;
}

.ai_comment_container .ai_comment_write_box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.ai_comment_container .ai_write_textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    background: #ffffff;
    color: #495057;
    font-family: inherit;
}

.ai_comment_container .ai_write_textarea:focus {
    outline: none;
    border-color: #8b5cf6;
}

.ai_comment_container .ai_write_footer {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai_comment_container .ai_guest_info {
    display: flex;
    gap: 8px;
}

.ai_comment_container .ai_guest_input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
}

.ai_comment_container .ai_guest_input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.ai_comment_container .ai_write_options {
    display: flex;
    align-items: center;
    gap: 16px;
}


.ai_comment_container .ai_char_count {
    font-size: 13px;
    color: #868e96;
    margin-left: auto;
}

.ai_comment_container .ai_btn_submit {
    width: 100%;
    padding: 12px;
    background: #8b5cf6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ai_comment_container .ai_btn_submit:hover {
    background: #7c3aed;
}

.ai_comment_container .ai_btn_submit:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

/* ===========================================
   반응형 디자인
   =========================================== */

/* 태블릿 (768px ~ 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    
    .ai_comment_container {
        margin-top: 60px;
        padding-top: 32px;
    }
    
    .ai_comment_container .ai_interaction_bar {
        gap: 32px;
        margin-bottom: 20px;
    }
    
    .ai_comment_container .ai_interaction_btn {
        font-size: 17px;
    }
    
    .ai_comment_container .ai_interaction_btn i {
        font-size: 20px;
    }
    
    .ai_comment_container .ai_comment_input_box {
        padding: 16px 20px;
        border-radius: 12px;
    }
    
    .ai_comment_container .ai_comment_input {
        font-size: 17px;
    }
    
    .ai_comment_container .ai_comment_item {
        gap: 16px;
        padding: 20px 0;
    }
    
    .ai_comment_container .ai_comment_avatar {
        width: 48px;
        height: 48px;
    }
    
    .ai_comment_container .ai_comment_item.ai_comment_reply {
        margin-left: 60px;
        padding-left: 24px;
    }
    
    .ai_comment_container .ai_comment_item.ai_comment_reply .ai_comment_avatar {
        width: 36px;
        height: 36px;
    }
    
    .ai_comment_container .ai_comment_text {
        font-size: 16px;
    }
    
}

/* PC (1024px+) */
@media (min-width: 1024px) {
    
    .ai_comment_container {
        margin-top: 80px;
        padding-top: 40px;
    }
    
    .ai_comment_container .ai_interaction_bar {
        gap: 40px;
        margin-bottom: 24px;
    }
    
    .ai_comment_container .ai_interaction_btn {
        font-size: 18px;
    }
    
    .ai_comment_container .ai_interaction_btn i {
        font-size: 22px;
    }
    
    .ai_comment_container .ai_comment_input_box {
        padding: 18px 24px;
        border-radius: 12px;
    }
    
    .ai_comment_container .ai_comment_input {
        font-size: 18px;
    }
    
    .ai_comment_container .ai_comment_submit {
        font-size: 15px;
        padding: 10px 20px;
    }
    
    .ai_comment_container .ai_comment_item {
        gap: 16px;
        padding: 24px 0;
    }
    
    .ai_comment_container .ai_comment_avatar {
        width: 48px;
        height: 48px;
    }
    
    .ai_comment_container .ai_comment_item.ai_comment_reply {
        margin-left: 64px;
        padding-left: 28px;
    }
    
    .ai_comment_container .ai_comment_item.ai_comment_reply .ai_comment_avatar {
        width: 40px;
        height: 40px;
    }
    
    .ai_comment_container .ai_comment_text {
        font-size: 17px;
    }
    
    .ai_comment_container .ai_comment_actions {
        gap: 16px;
    }
    
    .ai_comment_container .ai_action_btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
}

/* 대형 PC (1200px+) */
@media (min-width: 1200px) {
    
    .ai_comment_container .ai_interaction_bar {
        gap: 48px;
    }
    
    .ai_comment_container .ai_comment_input_box {
        padding: 20px 28px;
    }
    
    .ai_comment_container .ai_comment_input {
        font-size: 19px;
    }
    
    .ai_comment_container .ai_comment_item {
        padding: 28px 0;
    }
    
    .ai_comment_container .ai_comment_avatar {
        width: 52px;
        height: 52px;
    }
    
    .ai_comment_container .ai_comment_item.ai_comment_reply {
        margin-left: 68px;
        padding-left: 32px;
    }
    
    .ai_comment_container .ai_comment_item.ai_comment_reply .ai_comment_avatar {
        width: 44px;
        height: 44px;
    }
    
    .ai_comment_container .ai_comment_text {
        font-size: 18px;
    }
    
}

/* 댓글이 없을 때 */
.ai_comment_container .ai_comment_empty {
    text-align: center;
    padding: 60px 20px;
    color: #868e96;
}

.ai_comment_container .ai_comment_empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: #adb5bd;
}

.ai_comment_container .ai_comment_empty p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 767px) {
    .ai_comment_container .ai_comment_empty {
        padding: 40px 20px;
    }
    
    .ai_comment_container .ai_comment_empty i {
        font-size: 40px;
    }
    
    .ai_comment_container .ai_comment_empty p {
        font-size: 14px;
    }
}

/* ===========================================
   로그인 안내 스타일
   =========================================== */
.ai_comment_login_guide {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 24px;
    margin: 24px 0;
    text-align: center;
    border: 1px solid #e9ecef;
}

.ai_login_guide_content {
    max-width: 400px;
    margin: 0 auto;
}

.ai_login_guide_content i {
    font-size: 48px;
    color: #868e96;
    margin-bottom: 16px;
    display: block;
}

.ai_login_guide_content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.ai_login_guide_content p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 24px;
    line-height: 1.5;
}

.ai_btn_login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #00ce7d;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.ai_btn_login:hover {
    background: #00b870;
    transform: translateY(-1px);
}

.ai_btn_login i {
    font-size: 14px;
    margin: 0;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .ai_comment_login_guide {
        padding: 32px 20px;
        margin: 20px 0;
    }
    
    .ai_login_guide_content i {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .ai_login_guide_content h3 {
        font-size: 16px;
    }
    
    .ai_login_guide_content p {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .ai_btn_login {
        padding: 10px 20px;
        font-size: 13px;
    }
}
