/* ==========================================================================
    레시피 상세 페이지 (테이블 디자인)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

body{
    background:#fff;
}

.title-wrap {
    position: relative;
    max-width: 800px;
    margin: 50px auto 40px;
    text-align: center;
}

/* 제목 스타일링 */
.title-wrap h1 {
    font-family: sans serif !important;
    /* 한글은 명조체로 우아하게 */
    font-size: 38px;
    font-weight: 600;
    letter-spacing: 2px;
    /* 너무 넓었던 자간을 적당히 조절 */
    color: #222222;
    /* 살짝 부드러운 다크 그레이 */
    margin: 0;
    padding-bottom: 20px;
    position: relative;
    display: inline-block;
    /* 밑줄 길이를 글씨 길이에 맞추기 위해 */
}

/* 제목 아래에 들어가는 고급스러운 짧은 밑줄 포인트 */
.title-wrap h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    /* 밑줄 길이 */
    height: 2px;
    /* 밑줄 두께 */
    background-color: #cda87c;
    /* 베이지/골드 톤으로 포인트 (원하면 다른 색으로 변경 가능) */
}

/* 전체 감싸는 테두리 및 여백 */
.recipe-detail-wrap {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    box-sizing: border-box;
}

.recipe-author {
    font-size: 15px;
    color: #888;
    /* 너무 진하지 않은 회색으로 은은하게 */
    text-align: center;
    /* 제목과 맞춰서 가운데 정렬 */
    margin-top: 15px;
    /* 제목 밑줄(가짜 요소)과의 간격 */
    font-weight: 300;
    font-family: 'Noto Sans KR', sans-serif;
    letter-spacing: 1px;
}

/* 이미지 공통 플레이스홀더 (회색 박스) */
.img-placeholder {
    background-color: #d9d9d9;
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: bold;
    color: #000;
}

/* -----------------------------------
   상단: 썸네일과 재료 테이블
----------------------------------- */
.ingredient-table {
    width: 100%;
    border-collapse: collapse;
}

.thumb-cell {
    width:38%;
    /* 왼쪽 사진 비율 */
    padding-right:30px;
    /* 사진과 재료 사이 간격 */
    vertical-align: top;
}

.section-title-cell {
    text-align: left;
    font-size: 15px;
    font-weight: bold;
    color: #000;
    padding-bottom: 15px;
}

.ingredient-row td {
    padding: 12px 0;
    border-bottom: 1px solid #ccc;
    /* 재료 사이 얇은 선 */
    font-size: 14px;
    color: #333;
}

.ing-name {
    text-align: left;
}

.ing-amount {
    text-align: right;
}

/* 상단과 하단 나누는 구분선 */
.section-divider {
    border: 0;
    border-top: 1px solid #777;
    margin: 40px 0;
}

/* -----------------------------------
   하단: 조리 순서 테이블
----------------------------------- */
.step-table {
    width: 100%;
    border-collapse: collapse;
}

.step-thumb-cell {
    width: 45%;
    padding-right: 40px;
    vertical-align: top;
    /* 각 순서마다 밑에 여백 주기 (사진 쪽) */
    padding-bottom: 40px;
}

/* 순서 이미지 높이를 조절하고 싶다면 별도로 설정 */
.step-thumb-cell .img-placeholder {
    min-height: 180px;
}

.step-num {
    font-size: 14px;
    color: #333;
    vertical-align: bottom;
    padding-bottom: 10px;
    border-bottom: 1px solid #999;
    /* 순서 밑의 얇은 선 */
    height: 40px;
    /* 순서와 텍스트 분리감 부여 */
}

.step-desc {
    vertical-align: top;
    padding-top: 15px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    /* 각 순서마다 밑에 여백 주기 (텍스트 쪽) */
    padding-bottom: 40px;
    /*엔터값 적용*/
    white-space: pre-line;
}

/* -----------------------------------
   조리 순서 사이 구분선 디자인
----------------------------------- */
.step-divider-row td {
    padding: 0;
    /* td가 가지는 기본 여백을 없애서 선이 틀어지지 않게 함 */
}

.step-line {
    border: 0;
    border-top: 1px solid #ccc;
    /* 메인 페이지의 연한 회색 톤과 맞춤 */
    margin: 30px 0;
    /* 선 위아래로 30px씩 시원하게 여백 주기 */
    width: 100%;
    /* 테이블 너비에 꽉 차게 */
}

/* ==========================================================================
   댓글 영역 디자인 (기존 레시피 상세 페이지 무드와 통일)
   ========================================================================== */

/* 댓글 입력 / 목록 영역 공통 컨테이너 (기존 본문 크기에 맞춤) */
.comment-insert-div,
.read-comment-div {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

/* -----------------------------------
   1. 댓글 입력 폼 영역
----------------------------------- */
.comment-insert-div {
    border-top: 1px solid #777;
    padding-top: 40px;
    margin-top: 40px;
}

.comment-insert-div table {
    width: 100%;
    border-collapse: collapse;
}

.comment-insert-div td {
    padding-bottom: 10px;
}

/* 댓글 목록 내용 */
.comment-content {
    width: 100%;
    min-height: 44px;
    max-height: 90px;
    resize: none;
    border: none;
    background-color: transparent;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    outline: none;
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto;
}

/* 댓글 입력창 */
#comment-content {
    width: 100%;
    height: 90px;
    resize: none;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: transparent;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    outline: none;
    padding: 12px;
    box-sizing: border-box;
}

#comment-content:focus {
    border-color: #cda87c;
}

/* 등록 버튼 */
.comment-register {
    display: block;
    width: 120px;
    margin: 12px 0 0 auto;
    padding: 12px 0;
    background-color: #222;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-register:hover {
    background-color: #5a7e4d;
}

/* -----------------------------------
    2. 댓글 목록 읽기 영역
----------------------------------- */
.read-comment-div {
    padding-top: 20px;
    padding-bottom: 60px;
}

.read-comment-div h2 {
    text-align: center;
    font-size: 18px;
    color: #888;
    font-weight: 400;
    margin-top: 40px;
    letter-spacing: 0.5px;
}

.read-comment-div table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    border:1px solid #efefef;
    border-radius:12px;
    overflow:hidden;
    margin-bottom:18px;
}

.read-comment-div td {
    padding: 16px 8px;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
}

.comment-header td{
    border:none;
    padding-bottom:8px;
    vertical-align:middle;
}

.comment-user{
    width:140px;
    font-weight:600;
}

.comment-star{
    text-align:left;
}

.comment-menu{
    width:55px;
    text-align:right;
}

/* ==========================================================================
    댓글 영역 메인 타이틀 디자인
   ========================================================================== */
.comment-main-title {
    max-width: 800px;
    margin: 90px auto 10px;
    padding: 0 40px;
    box-sizing: border-box;
    font-family: 'Noto Serif KR', serif;
    font-size: 22px;
    font-weight: 600;
    color: #222;
}

.comment-main-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: #cda87c;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 2px;
    position: relative;
    top: -2px;
}

/* 댓글 내용 여백 */
.comment-content{
    padding-top:6px;
    padding-bottom:6px;
    line-height:1.8;
}

/* 별점 표시 */
.rating__result {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-10px) translateX(-5px);
    z-index: -9;
    font: 30px Arial, Helvetica, sans-serif;
    color: #ebebeb8e;
    pointer-events: none;
}

.rating__star {
    font-size: 1.3em;
    cursor: pointer;
    color: #dabd18b2;
    transition: filter linear .3s;
}

.rating__star:hover {
    filter: drop-shadow(1px 1px 4px gold);
}

.rate {
    background: url(https://aldo814.github.io/jobcloud/html/images/user/star_bg02.png) no-repeat;
    background-size: 100px 20px;
    width: 100px;
    height: 20px;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-top:8px;
    margin-left: 0px;
    margin-bottom: 3px;
}

.rate span {
    position: absolute;
    background: url(https://aldo814.github.io/jobcloud/html/images/user/star02.png) no-repeat;
    background-size: 100px 20px;
    height: 20px;
    left: 0;
    top: 0;
}



/* 썸네일 및 조리과정 이미지 상세보기 사이즈 */

.thumbnail{
    width:100%;
    max-width:350px;
    height:auto;
    border-radius:10px;
    display:block;
}

.cook-img{
    max-width: 300px;
    width: 110%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin: 10px auto 20px;
    display: block; 
}

/* ==========================================================================
    댓글 토글(⋮) 버튼 및 드롭다운 메뉴 디자인
   ========================================================================== */

.comment-menu-wrap {
    position: relative;
    display: inline-block;
}

.comment-toggle-btn {
    background: transparent;
    border: none;
    outline: none;
    font-size: 18px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s ease;
}

.comment-toggle-btn:hover {
    background: transparent;
    color: #222;
}

.comment-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 30px;
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    min-width: 90px;
    padding: 4px 0 !important;
    z-index: 999;
    overflow: visible;
}

.comment-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-dropdown li {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    text-align: left;
    line-height: normal;
}

.comment-dropdown a,
.comment-dropdown input[type="button"].toggle-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    background: transparent;
    border: none;
    color: #444;
    font-size: 13px;
    font-family: 'Noto Sans KR', sans-serif;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
}

.comment-dropdown a:hover,
.comment-dropdown input[type="button"].toggle-btn:hover {
    background-color: #f8f8f8;
    color: #000;
}


/* ==========================
   하단 버튼 영역
========================== */

/* 공통 버튼 */ 
.recipe-manage-wrap a{
    text-decoration:none;
    font-size:14px;
    color:#666;
    border:1px solid #ddd;
    border-radius:20px;
    padding:8px 16px;
    transition:.2s;
}

.recipe-manage-wrap a:hover{
    background:#f7f7f7;
    border-color:#bbb;
}

/* 버튼 */
.recipe-bookmark-btn,
.recipe-report-btn{
    text-decoration:none;
    color:#666;
    font-size:15px;
    transition:.2s;
}

.recipe-bookmark-btn:hover,
.recipe-report-btn:hover{
    color:#cda87c;
}

/* 신고, 삭제, 수정 버튼 */ 
.recipe-action-wrap{
    max-width:800px;
    margin:35px auto;
    display:flex;
    justify-content:center;
}

.recipe-menu-wrap{
    position:absolute;
    top:0;
    right:20px;
}

.recipe-toggle-btn{
    border:none;
    background:none;
    font-size:28px;
    color:#888;
    cursor:pointer;
    padding:0;
}

.recipe-toggle-btn:hover{
    color:#222;
}

.recipe-dropdown{
    display:none;
    position:absolute;
    top:35px;
    right:0;
    left:auto;
    transform:none;

    width:150px;
    background:#fff;
    border:1px solid #ddd;
    border-radius:15px;
    box-shadow:0 8px 18px rgba(0,0,0,.12);
    overflow:hidden;
    z-index:999;
}

.recipe-dropdown a{
    display:block;
    padding:16px 22px;
    text-decoration:none;
    color:#333;
    font-size:17px;
}

.recipe-dropdown a:hover{
    background:#f7f7f7;
}

/* 레시피 후기 작성하기 버튼 */
.recipe-review-btn{
    display:inline-block;
    padding:14px 34px;

    background:#222;
    color:#fff;

    text-decoration:none;
    border-radius:30px;

    font-size:15px;
    font-weight:500;

    transition:.25s;
}

.recipe-review-btn:hover{
    background:#5a7e4d;
}
/* 댓글 페이징 */
.comment-paging {
    max-width: 800px;
    margin: -30px auto 40px;
    padding: 0 40px;
    box-sizing: border-box;
    text-align: center;
}

/* 댓글 페이징 링크 */
.comment-paging a {
    margin: 0 8px;
    color: #222;
    text-decoration: none;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s ease;
}

/* 현재 페이지 */
.comment-paging a.active {
    color: #222;
    font-weight: 700;
}

/* 마우스 올렸을 때 */
.comment-paging a:hover {
    color: #5a7e4d;
}