@charset "utf-8";

/*
 * 상담후기 (폰 목업 셸 전용)
 * 기존 인라인 <style> 과 style.css 규칙 중 필요한 것만 옮겼다. rem -> px 환산.
 * 공통 셸은 page/css/mypage_shell.css 가 담당한다.
 */

.review-content {
    min-height: calc(var(--phone-visible-height, 740px) - 94px);
    padding: 16px 20px 30px;
    background: #fff;
}

/* ── 썸네일 카드 (이용내역·상담후기 공통 구조) ────── */

.charge_list, .rv_list, .review_list {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.charge_list .item, .rv_list .item, .review_list .item {
    position: relative;
    width: 320px;
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.charge_list .thumbox, .rv_list .thumbox, .review_list .thumbox {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--light);
}

.charge_list .thumbox .img, .rv_list .thumbox .img, .review_list .thumbox .img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.charge_list .txtbox, .rv_list .txtbox, .review_list .txtbox {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.charge_list .titbox, .rv_list .titbox, .review_list .titbox {
    display: flex;
    align-items: center;
    gap: 6px;
}

.charge_list .badge, .rv_list .badge, .review_list .badge {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--pink);
    color: var(--red);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.charge_list .badge.saju, .rv_list .badge.saju, .review_list .badge.saju { background: #fff3e6; color: #c47a1a; }
.charge_list .badge.sin,  .rv_list .badge.sin,  .review_list .badge.sin  { background: var(--pink); color: var(--red); }
.charge_list .badge.tarot,.rv_list .badge.tarot,.review_list .badge.tarot{ background: #efeaff; color: #6b4bd6; }

.charge_list .name, .rv_list .name, .review_list .name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.charge_list .descbox, .rv_list .descbox, .review_list .descbox {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.charge_list .descbox .txt, .rv_list .descbox .txt, .review_list .descbox .txt {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.charge_list .descbox .bar, .rv_list .descbox .bar, .review_list .descbox .bar {
    width: 1px;
    height: 10px;
    background: var(--line);
}

.charge_list .bottom, .rv_list .bottom, .review_list .bottom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.charge_list .time, .charge_list .date,
.rv_list .time, .rv_list .date,
.review_list .time, .review_list .date {
    margin: 0;
    color: #999;
    font-size: 11px;
}

/* 더보기 — common.css 의 .more_box 규칙이 로드되지 않으므로 여기서 정의 */
.more_box {
    width: 320px;
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.more_box .more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.more_box .more .arrow {
    width: 7px;
    height: 7px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
}

.more_box[style*="none"], .more_box.hide { display: none; }

.empty-message, .no_data {
    width: 320px;
    padding: 40px 0;
    color: #999;
    font-size: 13px;
    text-align: center;
}

/* ── 탭 (기존 .section_tab > ul.detail_tab.two 유지) ── */

.section_tab {
    position: relative;
    width: 360px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

/*
 * 활성 표시줄 — 활성 탭에 직접 그리면 탭을 바꿀 때 딱 끊겨 보인다.
 * 상담사 관리 페이지(.client-card-tab-indicator, counselor_v3.css:6971)처럼
 * 막대 하나를 두고 transform 으로 이동시켜 부드럽게 넘어가게 한다.
 * button 이 li 안에 중첩돼 CSS 형제 선택자가 닿지 않으므로
 * review_list.js 가 nav 에 data-active 를 세팅한다.
 */
.section_tab .tab_indicator {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 180px;
    height: 3px;
    background: var(--ink);
    transition: transform .25s ease;
}

.section_tab[data-active="written"] .tab_indicator { transform: translateX(180px); }

.section_tab .detail_tab {
    width: 360px;
    height: 44px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
}

.section_tab .detail_tab li { display: flex; }

.section_tab .detail_tab li button {
    width: 100%;
    height: 44px;
    border: 0;
    background: transparent;
    /* 비활성 탭 — 상담사 관리 페이지의 .client-card-tab (counselor_v3.css:6959) 과 동일 값 */
    color: #9A9A9A;
    font-family: Pretendard, sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

/*
 * 전역 style.css:3324 는 활성 탭을 #38b30b(초록)로 칠한다. 브랜드색과 맞지 않아
 * 기존 페이지도 로컬에서 덮어쓰고 있었다. 여기서도 동일하게 덮는다.
 */
.section_tab .detail_tab li button.active {
    color: var(--ink);
}

.review_list[hidden], .available_review_area[hidden] { display: none; }

/* ── 후기 수정 모달 (원본 review_list.php 인라인 style 이식) ── */

/*
 * .screen-scale 안(.app-screen 의 형제)에 놓인다 — page/_phone_shell_bottom.php
 * 의 $shell_overlay 슬롯. position:fixed 로 두면 브라우저 뷰포트를 덮어
 * 프로모션 패널까지 어두워지므로 absolute + inset:0 로 폰 화면만 덮는다.
 *
 * rem -> px 환산. 원본은 max-width 500px 였으나 폰 목업 맥락에서는
 * 프레임(약 360px)보다 넓으면 어색해 320px 로 줄였다.
 */
.modal_container {
    position: absolute;
    inset: 0;
    z-index: 60;              /* .detail-topbar(sticky, z-index:5) 위 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .5);
}

.modal_content {
    box-sizing: border-box;
    width: 100%;
    max-width: 320px;
    max-height: 100%;
    overflow-y: auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .3);
    animation: modalFadeIn .3s ease;
    scrollbar-width: none;
}

.modal_content::-webkit-scrollbar { display: none; }

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}

.modal_header, .modal_footer { padding: 14px; background: var(--light); }
.modal_header h4 { margin: 0; font-size: 14px; font-weight: 700; }
.modal_body { padding: 14px; }

.modal_footer { display: flex; gap: 6px; justify-content: flex-end; }

.modal_footer .modal_btn_txt_btn,
.modal_footer .modal_btn_txt_btn_del {
    width: 32%;
    padding: 10px;
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
}

.modal_footer .modal_btn_txt_btn { background: var(--accent); border: 1px solid var(--accent); }
.modal_footer .modal_btn_txt_btn_del { background: #ddd; border: 1px solid #ddd; }

.modal_content .write_text {
    width: 100%;
    min-height: 110px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: #555;
    font-family: Pretendard, sans-serif;
    font-size: 13px;
}

.modal_content .modal_content_star_point {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 0;
}

.modal_content .modal_content_star_point .tit {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.modal_content .modal_content_star_point .select {
    width: 110px;
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--muted);
    border-radius: 20px;
    background: #fff;
    color: var(--muted);
    font-family: Pretendard, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* ── 작성 완료 오버레이 ────────────────────────────
   원본 review_list.php 인라인 style 이식. 카드 위를 덮는 절대 위치라
   이 규칙이 없으면 문구가 카드 옆으로 흘러나온다. rem -> px 환산. */

.rv_list .item .complete_box {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
}

.rv_list .item.done .complete_box { opacity: 1; pointer-events: auto; }

/* ── 작성한 후기 (.review_item) ────────────────────
   '작성 가능 후기'(.rv_list .item)와 구조가 다르다. 마크업은 상담사 상세와
   같은 공용 템플릿(review_item.js)을 쓰므로, 그쪽 CSS(style.css #Review,
   common.css .emoji_badge)의 규칙을 폰 프레임 폭 기준으로 옮긴다.
   rem -> px 환산. 이미지 경로는 셸 스코프라 /page/ 절대경로로 쓴다. */

.review_list .review_item {
    width: 320px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f1f1;
    background: #fff;
}

.review_list .review_item:last-child { border-bottom: 0; }

/*
 * 빈 목록 안내.
 * review_list.js 는 '작성 가능 후기'의 안내를 .rv_list 에, '작성한 후기'의
 * 안내를 .review_list 에 넣는데 같은 .review_item.no_review 클래스를 쓴다.
 * 규칙이 .review_list 로만 스코프돼 있어 '작성 가능 후기' 쪽은 스타일이
 * 걸리지 않아 왼쪽 정렬 + 기본 글자 크기로 나왔다. 두 컨테이너를 함께 잡는다.
 */
.review_list .review_item.no_review,
.rv_list .review_item.no_review {
    display: flex;
    justify-content: center;
    padding: 40px 0;
    border: 0;
    color: #999;
    font-size: 13px;
}

.review_list .review_item p { margin: 0; }

.review_list .review_item .top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 10px;
}

.review_list .review_item .top .left { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.review_list .review_item .top .right { min-width: 0; }

/* 인증 체크 + 이름 + 별점 한 줄 */
.review_list .review_item .titlebox {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.review_list .review_item .titlebox .icon { width: 15px; height: 15px; flex: 0 0 15px; }
.review_list .review_item .titlebox .title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.review_list .review_item .ratebox { display: flex; flex: 0 0 auto; margin-left: 2px; }

.review_list .review_item .ratebox .rate {
    width: 14px;
    height: 14px;
    background: url(/page/img/ico_rate.png) no-repeat center / contain;
}

.review_list .review_item .ratebox .rate + .rate { margin-left: -3px; }

.review_list .review_item .best-badge {
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.review_list .review_item .modified-badge { margin-left: 3px; color: var(--muted); }

/* 전화상담 | 상담시간 | 날짜 */
.review_list .review_item .infobox {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.review_list .review_item .infobox .txt { white-space: nowrap; }

.review_list .review_item .infobox .bar {
    width: 1px;
    height: 10px;
    background: var(--line);
}

/* 추천한 상담 스타일 뱃지 — common.css .emoji_badge 를 프레임 폭에 맞춰 옮김 */
.review_list .review_item .emoji {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.review_list .review_item .emoji_badge {
    height: 28px;
    padding: 0 10px 0 5px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.review_list .review_item .emoji_badge .icon { width: 18px; height: 18px; }
.review_list .review_item .emoji_badge.emoji1 { border: 1px solid #f5b5b3; background: #fff4f3; color: #e75358; }
.review_list .review_item .emoji_badge.emoji2 { border: 1px solid #f0de80; background: #fffbef; color: #bb9612; }
.review_list .review_item .emoji_badge.emoji3 { border: 1px solid #30d216; background: #f0ffee; color: #1e9537; }
.review_list .review_item .emoji_badge.emoji4 { border: 1px solid #a6d4ff; background: #f3f8ff; color: #2375d6; }
.review_list .review_item .emoji_badge.emoji5 { border: 1px solid #f1caff; background: #faf3ff; color: #9d23d6; }

/* 첨부 사진 */
.review_list .review_item .img_path { margin-bottom: 10px; }

/* 후기 본문 */
.review_list .review_item .desc {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-line;
    word-break: break-word;
}

.review_list .review_item .answer_lsit {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review_list .review_item .answer_box {
    padding: 12px 14px;
    /* 상담사 상세의 답변란(style.css #Review .answer_box)과 같은 연분홍.
       --bg(#fff1f0) == 셸의 --pink, 테두리 --third(#ffcacc) 는 셸에 토큰이 없다. */
    border: 1px solid #ffcacc;
    border-radius: 6px;
    background: var(--pink);
}

.review_list .review_item .answer_top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.review_list .review_item .answer_titbox {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.review_list .review_item .answer_titbox .icon { width: 14px; height: 14px; flex: 0 0 14px; }
.review_list .review_item .answer_titbox .title { color: var(--ink); font-size: 12px; }
.review_list .review_item .answer_titbox .title .name { font-weight: 700; }
.review_list .review_item .answer_top .date { flex: 0 0 auto; }

.review_list .review_item .answer_desc {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.55;
    word-break: keep-all;
}

/* 후기 수정 버튼 — 템플릿이 button 이 아니라 div 를 쓴다 */
.review_list .answer_btn_wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.review_list .answer_btn_container {
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
