/* ===== 댓글 섹션 ===== */
.comment-section {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 댓글 제목/정렬/목록/액션 등 공통 디자인은 content-comment.css(커뮤니티 기준)를 그대로 따른다. */

/* ===== 댓글 작성 폼 ===== */
#comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* textarea 크기/여백/폰트는 커뮤니티(게시글) 댓글 작성폼과 같은 값으로 맞춘다. */
#comment-form textarea,
#guest-comment-box {
    resize: vertical;
    min-height: 100px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font: inherit;
    width: 100%;
    box-sizing: border-box;
}

/* 0/2000 글자수 표시 (커뮤니티 댓글 작성폼과 같은 스타일) */
#comment-form .comment-length {
    color: #777;
    font-size: 14px;
}

#guest-comment-box {
    background-color: #f9f9f9;
    color: #777;
    cursor: pointer;
}

#guest-comment-box:hover {
    background-color: #ececec;
}

/* 선택한 사진 미리보기 (댓글 등록 전) */
.comment-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.comment-image-preview[hidden] {
    display: none;
}

.comment-image-preview-item {
    position: relative;
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
}

.comment-image-preview-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f2f4f6;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
}

.comment-image-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    display: flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.comment-image-remove:hover,
.comment-image-remove:focus-visible {
    background: rgba(0, 0, 0, 0.82);
}

@media (max-width: 600px) {
    .comment-image-preview {
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .comment-image-preview-item {
        width: 72px;
        height: 72px;
    }
}

.comment-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.image-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 14px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.image-upload-label:hover {
    background-color: #e6e6e6;
}

.image-upload-label img {
    width: 20px;
    height: 20px;
}

.submit-btn {
    background-color: #333 !important;
    color: #fff;
    border: none;
    padding: 12px 14px !important;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    gap: 6px;
}

/* 댓글 작성폼의 사진/등록 버튼만 커뮤니티(게시글) 댓글과 같은 크기·색으로 맞춘다.
   답글/수정 폼 버튼은 기존 디자인을 그대로 둔다. */
#comment-form .image-upload-label {
    padding: 6px 12px;
    border-radius: 5px;
}

#comment-form .image-upload-label:hover {
    background-color: #f2f4f6;
}

#comment-form .image-upload-label img {
    width: 18px;
    height: 18px;
}

#comment-form .submit-btn {
    padding: 7px 13px !important;
    background-color: var(--tripbora-primary, #397a63) !important;
    border: 1px solid var(--tripbora-primary, #397a63);
    border-radius: 5px;
    font-weight: 400;
}

.can

.submit-btn:hover {
    background-color: #222;
}

/* ===== 댓글 목록 ===== */
.comment-list,
.reply-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/*
 * 댓글 아이템/프로필/닉네임/본문/액션/대댓글 들여쓰기는 커뮤니티(게시글·여행코스) 댓글과
 * 동일하게 content-comment.css 의 .content-comments 규칙을 그대로 사용한다.
 * 여기에는 여행지 댓글에만 있는 요소(첨부 사진, 작성/수정 폼)만 남긴다.
 */
.comment-item {
    position: relative;
}

/* 대댓글 목록이 중첩돼도 들여쓰기가 누적돼 본문 폭이 좁아지지 않게 한다 */
.content-comments .content-comment-replies .content-comment-replies {
    margin: 12px 0 0;
    padding-left: 0;
    border-left: 0;
}

/* 댓글 첨부 사진(최대 3장)은 가로로 나열하고 좁으면 줄바꿈한다 */
.content-comments .comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    margin-top: 10px;
}

.content-comments .comment-images .comment-image {
    width: 150px;
    height: 150px;
    margin-top: 0;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.content-comments .comment-images .comment-image:hover {
    transform: scale(1.05);
}

@media (max-width: 480px) {
    .content-comments .comment-images .comment-image {
        width: calc(50% - 4px);
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* ===== 댓글 수정 폼 ===== */
.edit-comment-form {
    margin-top: 12px;
}

.edit-comment-form .textarea-wrapper {
    width: 100%;
}

.edit-comment-form .comment-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.edit-text {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.save-edit-btn,
.cancel-edit-btn {
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
}

.save-edit-btn {
    background: #28a745;
    color: #fff;
}

.cancel-edit-btn {
    background: #ccc;
    color: #000;
}

.comment-item.editing .comment-actions {
    display: none;
}

/* ===== 대댓글 작성 폼 ===== */
.reply-form {
    margin-top: 8px;
}

.reply-form textarea {
    width: 100%;
    resize: none;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.reply-form .comment-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* 이미지 담당 */
/* ===== 이미지 모달 (단일 이미지) ===== */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}
.image-modal img.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}
.image-modal .close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 30px;
    line-height: 1;
    color: white;
    cursor: pointer;
}

/* 좌/우 이동 버튼 (여행지 대표 이미지 모달과 같은 디자인 언어) */
.image-modal .comment-image-nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.18s ease;
}

.image-modal .comment-image-nav:hover,
.image-modal .comment-image-nav:focus-visible {
    background: rgba(0, 0, 0, 0.72);
}

.image-modal .comment-image-nav.prev {
    left: 20px;
}

.image-modal .comment-image-nav.next {
    right: 20px;
}

/* 사진이 한 장인 댓글에서는 이동 버튼을 감춘다 */
.image-modal.is-single .comment-image-nav {
    display: none;
}

@media (max-width: 600px) {
    .image-modal .comment-image-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .image-modal .comment-image-nav.prev {
        left: 10px;
    }

    .image-modal .comment-image-nav.next {
        right: 10px;
    }
}

/* ===== 사진 후기 영역 ===== */
.photo-review-section {
    max-width: 960px;
    margin: 60px auto 40px;
}
.photo-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.photo-review-header h2 {
    font-size: 22px;
    font-weight: bold;
}
.photo-review-header .view-all {
    font-size: 14px;
    color: #333;
    text-decoration: none;
}
.photo-review-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.photo-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}
.photo-thumbnail:hover {
    transform: scale(1.05);
}

/* ===== 전체보기 모달 (썸네일 갤러리) ===== */
/* 전체보기 모달 */
#photo-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-modal-container {
    display: flex;
    position: relative;
    width: 90%;
    max-width: 1300px;
    height: 90%;
    background: transparent;
}


/* 메인 이미지 영역 */
.photo-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;

}

.photo-main img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* 썸네일 영역 */
.photo-sidebar-thumbnails {
    width: 120px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    background-color: #fff;
    padding: 10px;
    border-left: 1px solid #ccc;
}

.photo-sidebar-thumbnails img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-sidebar-thumbnails img:hover {
    transform: scale(1.05);
}

.thumbnail-item.active {
    outline: 2px solid var(--tripbora-primary);
}

.photo-sidebar-thumbnails img.active {
    border: 2px solid var(--tripbora-primary);
}

/* 닫기 버튼 */
.photo-close {
    position: fixed;
    top: 24px;
    right: 32px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 32px;
    line-height: 1;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

/* 좌우 버튼 */
/* 좌/우 이동 버튼 (메인 여행지 이미지 모달과 같은 디자인) */
.photo-prev, .photo-next {
    position: absolute;
    top: 50%;
    z-index: 10;
    display: flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.18s ease;
}

.photo-prev:hover,
.photo-next:hover,
.photo-prev:focus-visible,
.photo-next:focus-visible {
    background: rgba(0, 0, 0, 0.72);
}

.photo-prev {
    left: 20px;
}

.photo-next {
    right: 20px;
}

/* 사진이 한 장이면 이동 버튼을 감춘다 */
.photo-modal.is-single .photo-prev,
.photo-modal.is-single .photo-next {
    display: none;
}

@media (max-width: 600px) {
    .photo-prev, .photo-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .photo-prev {
        left: 10px;
    }

    .photo-next {
        right: 10px;
    }
}


.comment-author-tag {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: #fff;
    background: var(--tripbora-primary);
    border-radius: 4px;
    padding: 2px 6px;
}

/* 북마크 아이콘  */
#bookmark-icon {
    width: 25px;   /* 원하는 너비 */
    height: 25px;  /* 원하는 높이 */
}


/* 댓글 헤더 부분 */
.comment-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.comment-toolbar .comment-count {
  font-size: 18px;
  font-weight: bold;
}

.comment-sort {
    position: relative;
}

#sort-toggle-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

.sort-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    list-style: none;
    padding: 4px 0;
    margin: 4px 0 0 0;
    width: 100px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.sort-options li {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
}

.sort-options li:hover {
    background-color: #f0f0f0;
}

.hidden {
    display: none;
}

.load-more-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.mention {
    color: #2196f3;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: color .15s;
}
.mention:hover {
    color: #1667b6;
    text-decoration: underline;
}

/*댓글 더보기 버튼 */
.comment-more-btn {
    display: block;
    margin: 24px auto 0 auto;
    padding: 7px 18px;
    background: #fff;
    color: #323232;
    font-size: 1rem;
    font-weight: 500;
    border: 1.2px solid #d5d7db;
    border-radius: 18px;
    box-shadow: 0 1px 4px 0 rgba(60,60,60,0.04);
    cursor: pointer;
    transition: background 0.15s, border 0.2s, color 0.15s;
    min-width: 120px;
}
.comment-more-btn:hover,
.comment-more-btn:focus {
    background: #f8f9fa;
    border-color: #4dc47d;
    color: #24995d;
}
.comment-more-btn .icon {
    font-size: 1.15em;
    margin-right: 5px;
    vertical-align: middle;
}
