/* 전체 컨테이너 크기 */
.post-container {
    display : flex;
    justify-content: center;
    flex-wrap: wrap;
    margin :var(--spacing-base) auto;
    padding : var(--spacing-base) var(--spacing-base);
    width: 100%;
    max-width: var(--container-width);
}

/*공통 좌측 메인 콘텐츠*/
.main-contents{
    width : calc(100% - 300px);
}


/*오른쪽 광고*/
.sale-post-side-column{
    position : sticky;
    top : 0; /* 요소를 고정할 위치(상단) */
    width : 300px;
    height : 900px;
    padding : var(--spacing-sm);
}


.post-area {
    margin: var(--spacing-base) auto;
    padding: var(--spacing-xl) var(--spacing-base);
    width: 100%;
    max-width: var(--container-width);
    border: thin solid var(--main-item-border-color);
    background: white;
    border-radius: 6px;
}


.post-container .top-line{
    border-top : 6px solid #FFD69B;
}


#simpleSalePostForm{
    border-top: thin solid var(--main-item-border-color);
}

.column-bind{
    position: relative;
}

.column {
    width : 50%;
}

.column:first-child{
    float : left;
    padding-right : 3.334%;
}

.column:last-child{
    float : right;
    padding-left : 3.334%;
}

/**/
.column-bind:after {
    clear: both;   /*float 속성에 의해서 높이 계산하지 못할 때, 부모의 float 영향 제거*/
    content: "";
    display: block;  /*가상 요소를 블록 수준 요소로 표시하도록 지정합니다. 이것은 블록 수준 요소가 다음 줄로 표시되는 동작을 의미합니다.*/
}

/* simpleSalePost와 communityPost 모두 반영해야함 시작 */
.ck-editor__editable {
    height: 50vh;
    /*width: 75vw;*/
    max-width : 1200px;
    min-width: 250px;
    white-space: normal;
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: auto; /* 가로 스크롤은 없애지 않고 필요하면 자동 */
}
.ck-editor{
    height: 50vh;
   /* width: 75vw;*/
    max-width : 1200px;
    min-width: 250px;
}

.ck.ck-toolbar, .ck-toolbar_grouping{
    max-width : 1200px;
    min-width: 250px;
    width: 80vw;

}

.ck-content img{
    width : 100%;
    max-width: 750px !important; /* 필요시 최대 높이 설정 */
    height: auto !important;    /* 원본 비율 유지 */
}
/* simpleSalePost와 communityPost 모두 반영해야함 끝 */


/**/
.form-group{
    display : flex;
    align-items: center;
    flex-wrap : wrap;  /*줄바꿈*/
    white-space: nowrap; /* 텍스트 줄 바꿈 방지 */
    overflow: hidden; /* 텍스트가 요소를 넘어가면 숨김 */
    text-overflow: ellipsis; /* 넘어간 텍스트를 ...으로 표시 */
    /*width : 95%;*/
    padding : var(--spacing-base) 0;
    border-bottom : thin solid var(--main-item-border-color);
}


.form-group.middle-width{
    width : 50%;
}

/* 주요 정보 테이블의 form-group class 의 첫번째에만 */
.form-group.has-border-top {
    border-top : thin solid var(--main-item-border-color);
}


/* 24.1.7 쓰기에서는 padding을 더 주고, 읽기에서는 적게 주기 위하여 */
.form-group.read-mode{
    padding : var(--spacing-2xs) 0;
}

/*23.12.27 추가*/
/*게시물 작성할 때, 필수 항목 표시*/
.asterisk-dot-icon{
    margin-left : var(--spacing-2xs);
    color: var(--must-red);
    width : 16px;
}

.input-title{
/*    width: 20%;
    min-width : 80px;*/
    display: inline-block;
   /* background : var(--main-background-color);*/
    white-space: nowrap;
    padding-left : var(--spacing-base);
    padding-top : var(--spacing-base);
    padding-bottom : var(--spacing-base);
    /*border-right : thin solid var(--main-item-border-color);*/
    flex: 0 0 100px; /* 고정된 너비 설정 */
}

.text-label-write-mode{
    flex: 0 0 180px; /* 고정된 너비 설정 */
}


.input-description{
    margin-top : var(--spacing-xs);
    padding-left : var(--spacing-lg);
    font-size : var(--text-sm);
    font-weight : 400;
    white-space: normal;
    width: 100%;
    color : var(--silver-text-color);
}

/* i 아이콘 */
.info-icon{
    margin-left: 6px;
    margin-right: 6px;
    width : 16px;
    color: var(--secondary-color);
}

/*툴팁 텍스트 처음엔 숨기기*/
.tooltip .tooltip-text {
    visibility: hidden;
    font-size : var(--text-sm);
    width : auto;
    background-color: var(--secondary-color);
    color: #ffffff;
    text-align: center;
    border-radius: 5px;
    padding: 15px;
    position: absolute;
    z-index: 1;
    right : -10px
}


.input-text{
    display: inline-block;
    width: calc(100% - 180px);  /*데스크탑 모드에서는 180을 빼준다. .text-label-write-mode 참고 */
    max-width : 800px;
    line-height : 30px;
    max-height : 53px;
    min-height : var(--text-box-height-base);
    background : white;
    padding-left : var(--spacing-sm);
    white-space: nowrap;
    text-overflow: ellipsis; /* 넘치는 텍스트를 ...으로 표시합니다. */
    overflow: hidden;
}

/*띄어쓰기가 없을 때는 AND 조건*/
.input-text.editable{
    border: thin solid var(--main-item-border-color);
    border-radius: var(--border-radius-xs);
    background : var(--input-text-background-color);
}

.input-text.readOnly{
    background : var(--disabled-color);
    cursor: not-allowed;
}


/* 셀렉트 박스 크기 조절*/
.post-select-box{
    height : 34px;
}


/* 입력 값 오류 있을 때 */
.invalid-input {
  border: 3px solid red;
}

.price-form{
    max-width : 160px;
}


.column-bind .category-section{
    margin-top: var(--spacing-base);
    margin-bottom : var(--spacing-base);
   /* border-bottom : thin solid var(--main-item-border-color);*/
}

.column-bind .category-text{
    font-weight : 400;
    font-size : var(--text-md);
    display : inline-block;
}


.column-bind .title-section{
    margin-bottom : var(--spacing-xl);
}


.column-bind .title-text{
    font-weight : 600;
    font-size : var(--text-lg);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;  /*최대 두줄*/
    overflow: hidden;
    text-overflow : ellipsis;  /*(...) 표시*/
    word-break : break-all;
}


.column-bind .price-section{
    display : flex;
    align-items : center;
    margin-top : var(--spacing-base);
    margin-bottom : var(--spacing-base);
}

.column-bind  .sale-price{
    padding-right : var(--spacing-xl);
    font-size : var(--text-lg);
    color : var(--sale-price-color);
    font-weight : 600;
}


.column-bind  .original-price{
    font-size : var(--text-base);
    color : var(--original-price-color);
    text-decoration: line-through;
    font-weight : 400;
}


.column-bind .info-section{
    vertical-align : middle;
    margin-top : var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.column-bind .profile-image{
    width : 30px;
    height : 30px;
    border: 1px solid var(--skinThumbBorder);
    border-radius: 50%;
    margin-right : var(--spacing-xs);
}

.column-bind .author-profile{
    display: flex;
    align-items: center;   /*프로필과 닉네임 수직 중앙 정렬*/
    margin : var(--spacing-base) var(--spacing-sm);
    justify-content: space-between;
    position : relative;
}

.column-bind .profile-image-nickName{
    align-items: center;
    display: flex;
}


.column-bind .count-area{
    text-align : left;
    margin : var(--spacing-base) var(--spacing-sm);
}


.column-bind .input-title{
    font-weight : 400;

}

.column-bind .input-text{
    font-weight : 400;
   /* margin-left : var(--spacing-base);*/
}


/*작성시간*/
.post-time{
    color : var(--silver-text-color);
    font-size : var(--text-sm);
    font-weight : 400;
    letter-spacing : -0.8px;  /* 문자 간격 줄이기 */
}

/* 목록, 수정, 삭제 버튼 일렬 오른쪽 끝 */
.button-wrap{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top   : var(--spacing-base);
    /*padding-right : var(--spacing-2xl);*/
}


/*이미지 입력폼을 가진 곳은 위아래로 여백을 둔다*/
.has-image-form{
    margin-top : var(--spacing-base);
    margin-bottom : var(--spacing-base);
    padding-bottom : var(--spacing-base);
}

.image-list{
    display: flex;
    align-items: center;
    display: block;
    table-layout: fixed;
    text-align: center;   /*플러스 아이콘 가운데 정렬*/
}


/*이미지 리스트 내 요소 하나*/
.main-image-list .main-image,
.image-list .main-image{      /* 게시물 작성 때 사용 */
    display : flex;
    justify-content: center;
    align-items: center;
    width : 100%;
    aspect-ratio: 1/1;
    box-sizing: border-box;  /* 테두리 크기를 포함하여 크기 계산 */
    cursor : pointer;
    background : var(--img-background-color);
    border-radius : 6px;
}

/*  24.6.20 */
/* 원본 비율 유지 하면서 이미지는 그대로, 25.12.06 원본 비율 유지 않고, 꽉차도록 변경 */
/* 게시물 읽을 때 사용 */
.main-image-list .main-image img {
    width: 100%;
    height: 100%;
    /*object-fit: contain;*/
    image-rendering: auto;
}

.mainImage-preview:not([src]) {
    display: none;
}

.mainImage-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-list .editable-image-box{
    border : medium dotted var(--main-item-border-color);
    width : 240px;
    height : 240px;
}

.image-list .main-image i{
    font-size : var(--icon-xl);
    color : var(--secondary-color);
}



.contents-box{
    padding : var(--spacing-lg) var(--spacing-base);
    word-wrap : break-word;
}


/* 게시물 내용 중 링크가 있을 때 */
.contents-box .external-link:hover{
    text-decoration: underline; /* 마우스 오버 시 밑줄 추가 */
    color: var(--text-hover-pink-color); /* 마우스 오버 시 텍스트 색상 변경 (예: 빨간색) */
}

/*에디터 입력창 위아래 여백 주기*/
.contents-editor-box{
    padding-top : var(--spacing-xl);
    padding-bottom : var(--spacing-xl);
    display: flex;              /*에디터창 수평 중앙 정렬*/
   /* justify-content: center;*/
}

/*23.12.31 flex 내부 요소 중에서 특정 아이템만 위로 올리기 위해서*/
.top-position{
    align-self: flex-start;
}


.url-clickable:hover{
    text-decoration: underline; /* 마우스 오버 시 밑줄 추가 */
    color: var(--text-hover-pink-color); /* 마우스 오버 시 텍스트 색상 변경 (예: 빨간색) */
}



.vote-button-wrap{
    display : flex;
    justify-content: center;   /* 수평 중앙 */
    align-items : center;      /* 수직 중앙 */
    margin-top: var(--spacing-base);
    margin-bottom: var(--spacing-base);
    gap : var(--spacing-base);
    height : 60px;
}

.vote-option{
    margin-right : var(--spacing-base);
}

.score-wrap{
    display : flex;
    align-items : center;
    height: 100%;
}

.score-label{
    background-color: #fae4a8;
    color: #614805;
    border-radius: 3px 0 0 3px;
    font-size: 11px;
    padding: 12px;
    display: flex;
    align-items: center;
    font-weight: 600;
    height: 100%;
    font-size: var(--text-base);
}

.score{
    background-color: #fef8e7;
    border-radius: 0 3px 3px 0;
    font-size: 16px;
    font-weight: 600;
    padding: 12px;
    display: flex;
    align-items: center;
    color: #614805;
    height: 100%;
}


.vote-button{
    background-color : #eee;
    padding : var(--spacing-sm);
    text-align: center;
    border-radius: 3px;
    color: #999;
    cursor: pointer;
}

.vote-icon{
    width : 2rem;
    height : 2rem;
}




/*
미디어 쿼리 부분으로 옮김
#up_button:hover{
    color: var(--blue-button-color);
}
*/

/*투표해서 voted 클래스가 추가 됐을 때*/
#up_button.voted{
    color: var(--blue-button-color);
}
/*
#down_button:hover{
    color: var(--orange-button-color);
}
*/

/*투표해서 voted 클래스가 추가 됐을 때*/
#down_button.voted{
    color: var(--orange-button-color);
}





/* 두번째 큰 크기*/
@media (min-width: 960px) and (max-width: 1200px){
    /*공통 좌측 메인 콘텐츠*/
    .main-contents{
        width : calc(100% - 250px);
    }


    /*오른쪽 광고*/
    .sale-post-side-column{
        width : 250px;
        height : 900px;
        padding : var(--spacing-sm);
    }

}

/* 세번째 크기*/
@media (min-width: 768px) and (max-width: 960px){
    /*공통 좌측 메인 콘텐츠*/
    .main-contents{
        width : calc(100% - 200px);
    }


    /*오른쪽 광고*/
    .side-column{
        width : 200px;
        height : 900px;
        padding : var(--spacing-sm);
    }
}


/*모바일 기기*/
@media (max-width: 767px){


    /*공통 좌측 메인 콘텐츠*/
    .main-contents{
        /*width : calc(100% - 150px);*/
        width : 100%;
    }

    /*오른쪽 광고*/
    .sale-post-side-column{
        display : none;
    }

    /* 모바일  */
    .form-group{
        padding : var(--spacing-sm) 0;
    }

    /* 모바일 메인 사진, 주요항목 크기 */
    .column {
        width: 100%;
    }

    .column:first-child{
        float : left;
        padding-right : 0;
    }

    /* 모바일 작성정보 방향 변경 */
    .column-bind .author-profile {
         display: flex;
         flex-direction : column;
         align-items: flex-start;
         gap: var(--spacing-xs);
    }

    /*모바일 입력 타이틀 크기 15%-> 30%*/
    .input-title{
        width: 100px;
        padding-top: var(--spacing-sm);
        padding-bottom: var(--spacing-sm);
        padding-left : var(--spacing-xs);
        flex : 0 0 100px;
    }

    /* 모바일 입력 텍스트  */
    .input-text{
        width : calc(100% - 100px);
    }

    /*모바일 가격 입력*/
    .price-form{
        max-width : 120px;
    }


    /*모바일 메인 이미지 크기*/
   /* .image-list .main-image{*/
    .image-list   .editable-image-box{
        width: 60vw;
        height: 60vw;
        max-width: 240px;
        max-height: 240px;
        aspect-ratio: 1/1;
          /*  min-width: 140px;
            max-width: 360px;*/
    }

    .image-list {
       /* margin-left: 60px;*/  /*모바일 모드에서는 공백 안줘도됨*/
        padding-bottom : var(--spacing-base);
    }

    /*모바일 끝*/

}

/* 모든 요소에 대해 모바일 기기에서 hover 효과 비활성화 */
/* 24.5.28 반영 */
@media (hover: hover) and (pointer: fine)  {

    /* 툴팁 아이콘에 마우스 올렸을 때, 툴팁 텍스트 보여지기 */
    .tooltip:hover .tooltip-text {
        visibility: visible;
    }

    /* 투표 버튼 마우스 hover 처리 */
    #up_button:hover{
        color: var(--blue-button-color);
    }

    #down_button:hover{
        color: var(--orange-button-color);
    }
}


/* 모든 요소에 대해 모바일 기기에서 hover 효과 비활성화 */
/* hover 효과를 비활성화 하기 위해 아무것도 하지 않음 */
/*
@media (hover: none) and (pointer: coarse) {
    *:hover {


    }
}*/


.loader-icon-container {
  position: relative;
  right: 30px;
  top: calc(50% - 10px);
}
.loader {
  position: relative;
  height: 20px;
  width: 20px;
  display: inline-block;
  animation: around 5.4s infinite;
}

@keyframes around {
  0% {
    transform: rotate(0deg)
  }
  100% {
    transform: rotate(360deg)
  }
}

.loader::after, .loader::before {
  content: "";
  background: white;
  position: absolute;
  display: inline-block;
  width: 100%;
  height: 100%;
  border-width: 2px;
  border-color: #333 #333 transparent transparent;
  border-style: solid;
  border-radius: 20px;
  box-sizing: border-box;
  top: 0;
  left: 0;
  animation: around 0.7s ease-in-out infinite;
}

.loader::after {
  animation: around 0.7s ease-in-out 0.1s infinite;
  background: transparent;
}