/* ==========================================================================
   Haru Live - Comment Item
   댓글/대댓글 전용 UI
   ========================================================================== */
[x-cloak] {
    display: none !important;
}
.board-comment,
.board-comment * {
    box-sizing: border-box;
}
.post-comment-list {
    position: relative;
    width: 100%;
    overflow: visible !important;
}
.board-comment {
    position: relative;
    width: 100%;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.6;
}
.board-comment + .board-comment {
    margin-top: 12px;
}
.board-comment-row {
    position: relative;
    display: flex;
    width: 100%;
    align-items: flex-start;
    overflow: visible !important;
}
/* ==========================================================================
   루트 댓글 카드
   ========================================================================== */
.board-comment-root > .board-comment-row {
    padding-left: 0;
}
.board-comment-root > .board-comment-row > .board-comment-box {
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}
/* 루트 댓글 사이를 '댓글 섹션'처럼 분리 */
.board-comment-root + .board-comment-root {
    margin-top: 16px;
}
/* ==========================================================================
   대댓글
   ========================================================================== */
.board-comment-child > .board-comment-row {
    padding-left: 0;
}
.board-comment-child .board-comment-box {
    border-color: #e2e8f0;
    border-radius: 10px;
    background: #fbfcfe;
    box-shadow: none;
}
/* 재귀 대댓글에서 들여쓰기 폭이 계속 커지지 않도록 */
.board-comment-child .board-comment-child > .board-comment-row {
    padding-left: 0;
}
.board-comment-reply-marker {
    display: flex;
    flex: 0 0 28px;
    width: 28px;
    align-items: flex-start;
    justify-content: center;
    padding-top: 13px;
    color: #3b82f6;
}
.board-comment-reply-marker svg {
    display: block;
    width: 30px;
    height: 30px;
}
.board-comment-children {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    margin-left: 18px;
    overflow: visible !important;
}
/* 2단계 이후에는 추가 들여쓰기 최소화 */
.board-comment-child .board-comment-children {
    margin-left: 6px;
    padding-left: 10px;
}
/* ==========================================================================
   댓글 박스
   ========================================================================== */
.board-comment-box {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible !important;
    border: 1px solid #dfe3e8;
    background: #fff;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background-color .15s ease;
}
.board-comment-root > .board-comment-row > .board-comment-box:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgb(15 23 42 / 6%);
}
/* ==========================================================================
   댓글 헤더
   ========================================================================== */
.board-comment-header {
    position: relative;
    z-index: 20;
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow: visible !important;
    padding: 8px 10px 8px 13px;
    border-bottom: 1px solid #edf0f3;
    border-radius: 12px 12px 0 0;
    background: #f8fafc;
}
.board-comment-child .board-comment-header {
    border-radius: 10px 10px 0 0;
    background: #f8fafc;
}
.board-comment-header-left,
.board-comment-header-right {
    display: flex;
    min-width: 0;
    align-items: center;
    overflow: visible !important;
}
.board-comment-header-left {
    flex: 1 1 auto;
    gap: 6px;
}
.board-comment-header-right {
    position: relative;
    flex: 0 0 auto;
    gap: 6px;
}
.board-comment-author {
    display: inline-block;
    overflow: hidden;
    max-width: 260px;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.board-comment-author-mine {
    padding: 0 3px;
    border-radius: 3px;
    background:
        linear-gradient(
            to bottom,
            transparent 56%,
            #fde68a 56%
        );
    font-weight: 800;
}
.board-comment-owner-icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
    align-items: center;
    justify-content: center;
    border: 1px solid #94a3b8;
    border-radius: 50%;
    background: #fff;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}
.board-comment-date {
    color: #64748b;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 20px;
    white-space: nowrap;
}
/* ==========================================================================
   댓글 본문
   ========================================================================== */
.board-comment-content {
    position: relative;
    z-index: 1;
    min-height: 56px;
    overflow: visible;
    padding: 13px 15px 14px;
    background: #fff;
    border-radius: 0 0 12px 12px;
}
.board-comment-child .board-comment-content {
    background: #fff;
    border-radius: 0 0 10px 10px;
}
.board-comment-text {
    overflow-wrap: anywhere;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.75;
    word-break: break-word;
}
.board-comment-text p {
    margin: 0;
}
.board-comment-text p + p {
    margin-top: 10px;
}
.board-comment-text img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}
/* 댓글 하루콘은 일반 첨부 이미지와 별도로 크기 고정 */
.board-comment-text .comment-emoticon {
    display: inline-block;
    width: 42px;
    height: 42px;
    max-width: 42px;
    margin: -2px 3px 0;
    object-fit: contain;
    vertical-align: middle;
}
.board-comment-placeholder {
    color: #94a3b8;
    font-style: italic;
}
.board-comment-hidden {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
}
.board-comment-hidden-reason {
    color: #b45353;
    font-size: 12px;
}
/* ==========================================================================
   상태 배지
   ========================================================================== */
.board-comment-status {
    display: inline-flex;
    min-height: 18px;
    align-items: center;
    padding: 1px 6px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
}
.board-comment-status-visible {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}
.board-comment-status-pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #a16207;
}
.board-comment-status-hidden,
.board-comment-status-deleted {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}
.board-comment-status-default {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #6b7280;
}
/* ==========================================================================
   점 세 개 메뉴
   ========================================================================== */
.board-comment-menu {
    position: relative;
    z-index: 100;
    overflow: visible !important;
}
.board-comment-menu-button {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #64748b;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.board-comment-menu-button:hover {
    background: #e9eef5;
    color: #0f172a;
}
.board-comment-menu-button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}
.board-comment-menu-panel {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 9999;
    width: 124px;
    min-width: 124px;
    overflow: hidden;
    padding: 5px;
    border: 1px solid #d8dee6;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 10px 28px rgb(15 23 42 / 14%);
}
.board-comment-menu-panel form {
    display: block;
    margin: 0;
    padding: 0;
}
.board-comment-menu-item {
    display: block;
    width: 100%;
    min-height: 32px;
    padding: 7px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    font-size: 12px;
    line-height: 18px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.board-comment-menu-item:hover {
    background: #f1f5f9;
}
.board-comment-menu-item-danger {
    color: #b91c1c;
}
.board-comment-menu-item-restore {
    color: #15803d;
}
.board-comment-menu-item-report {
    color: #b45309;
}
/* ==========================================================================
   답글/신고/숨김/제재 폼
   ========================================================================== */
.board-comment-reply-form,
.board-comment-moderation,
.board-comment-report,
.board-comment-restriction {
    position: relative;
    z-index: 2;
    padding: 13px 14px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}
.board-comment-reply-form {
    border-radius: 0 0 12px 12px;
}
.board-comment-form-title {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
}
.board-comment-form-title strong {
    color: #1e293b;
}
.board-comment-form-arrow {
    margin-right: 2px;
    color: #3b82f6;
    font-weight: 800;
}
.board-comment-textarea,
.board-comment-input,
.board-comment-select {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}
.board-comment-textarea {
    min-height: 86px;
    padding: 9px 10px;
    line-height: 1.6;
    resize: vertical;
}
.board-comment-input {
    height: 36px;
    padding: 0 10px;
}
.board-comment-select {
    height: 36px;
    padding: 0 9px;
}
.board-comment-textarea:focus,
.board-comment-input:focus,
.board-comment-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgb(59 130 246 / 10%);
}
.board-comment-reply-emoticons {
    margin-bottom: 8px;
}
.board-comment-emoticon-preview {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
}
.board-comment-reply-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}
.board-comment-length {
    color: #94a3b8;
    font-size: 11px;
}
.board-comment-form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}
.board-comment-reply-footer .board-comment-form-buttons {
    margin-top: 0;
}
.board-comment-button {
    min-width: 52px;
    height: 32px;
    padding: 0 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.board-comment-button:disabled {
    cursor: wait;
    opacity: .6;
}
.board-comment-button-light {
    background: #fff;
    color: #475569;
}
.board-comment-button-light:hover {
    background: #f1f5f9;
}
.board-comment-button-primary {
    border-color: #1e293b;
    background: #1e293b;
    color: #fff;
}
.board-comment-button-primary:hover {
    background: #0f172a;
}
.board-comment-button-danger {
    border-color: #b91c1c;
    background: #b91c1c;
    color: #fff;
}
.board-comment-button-danger:hover {
    background: #991b1b;
}
.board-comment-error {
    margin: 5px 0 0;
    color: #dc2626;
    font-size: 12px;
}
.board-comment-report {
    background: #fffaf7;
}
.board-comment-restriction {
    background: #fff7f7;
}
.board-comment-field {
    margin-top: 10px;
}
.board-comment-field:first-of-type {
    margin-top: 0;
}
.board-comment-field-label {
    display: block;
    margin-bottom: 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}
.board-comment-restriction-summary {
    margin-bottom: 10px;
    color: #991b1b;
    font-size: 12px;
    line-height: 1.6;
}
.board-comment-warning {
    margin-top: 8px;
    padding: 9px 10px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #854d0e;
    font-size: 12px;
}
.board-comment-warning div {
    margin-top: 3px;
    font-size: 12px;
}
.board-comment-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
}
/* ==========================================================================
   모바일
   ========================================================================== */
@media (max-width: 640px) {
    .board-comment {
        font-size: 13px;
    }
    .board-comment-root + .board-comment-root {
        margin-top: 12px;
    }
    .board-comment-children {
        gap: 8px;
        margin-top: 8px;
        margin-left: 8px;
        padding-left: 8px;
        border-left-width: 1px;
    }
    .board-comment-child .board-comment-children {
        margin-left: 0;
        padding-left: 6px;
    }
    .board-comment-reply-marker {
        flex-basis: 20px;
        width: 20px;
        padding-top: 12px;
    }
    .board-comment-reply-marker svg {
        width: 12px;
        height: 12px;
    }
    .board-comment-header {
        min-height: 38px;
        gap: 5px;
        padding: 7px 7px 7px 10px;
    }
    .board-comment-author {
        max-width: 120px;
        font-size: 12px;
    }
    .board-comment-owner-icon {
        width: 13px;
        height: 13px;
        font-size: 8px;
    }
    .board-comment-date {
        font-size: 10px;
    }
    .board-comment-menu-button {
        width: 26px;
        height: 26px;
    }
    .board-comment-menu-panel {
        right: -2px;
        width: 118px;
        min-width: 118px;
    }
    .board-comment-content {
        min-height: 48px;
        padding: 11px 12px 12px;
    }
    .board-comment-text {
        font-size: 13px;
        line-height: 1.65;
    }
    .board-comment-text .comment-emoticon {
        width: 38px;
        height: 38px;
        max-width: 38px;
        margin-left: 2px;
        margin-right: 2px;
    }
    .board-comment-reply-form,
    .board-comment-moderation,
    .board-comment-report,
    .board-comment-restriction {
        padding: 10px;
    }
    .board-comment-reply-footer {
        align-items: flex-end;
    }
    .board-comment-length {
        max-width: 90px;
    }
    .board-comment-button {
        min-width: 46px;
        height: 31px;
        padding: 0 9px;
    }
}
