@charset "utf-8";
@import url('style.css');


/* 전체 폼 스타일 */
#write_form {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background-color: rgb(from var(--bg-color) r g b / 90%);
    border: 1px solid rgb(from var(--bd-color) r g b / 70%);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: var(--txt-color);
}

.series-write-box, .post-write-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-write-box .series-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#write_form .option-flex {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

/* 상단 옵션 영역 */
.series-option, .post-option {
    display: flex;
    gap: 10px;
    align-items: center;
}

.series-option label,
.post-option label {
    background-color: rgb(from var(--input-color) r g b / 60%);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: 'Pretendard';
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav_option {
    display: flex;
    gap: 10px;
    align-items: center;
}

.title-text {
    font-family: 'Pretendard';
    font-weight: 600;
    font-size: 18px;
    height: 30px;
    color: rgb(from var(--txt-color) r g b / 100%);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.info-text {
    font-family: 'Pretendard';
    font-size: 12px;
    color: rgb(from var(--txt-color) r g b / 60%);
}

.series-info {
    display: flex;
    gap: 5px;
    align-items: center;
}

.series-name {
    padding: 6px 8px;
    border-radius: 6px;
    font-family: 'Pretendard';
}

/* 셀렉트 박스 스타일 */
select {
    width: 100%;
    padding: 10px 12px;
    background-color: rgb(from var(--bg-color) r g b / 90%);
    border: 1px solid rgb(from var(--bd-color) r g b / 70%);
    color: rgb(from var(--txt-color) r g b / 100%);
    border-radius: 4px;
    font-family: 'Pretendard';
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaa' d='M6 8.825L1.175 4 2.05 3.125 6 7.075 9.95 3.125 10.825 4 6 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

select:focus {
    border-color: var(--acc-color);
    outline: none;
}

/* 보호글 설정 */
.set_protect {
    background-color: rgb(from var(--bg-color) r g b / 90%);
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.set_protect label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.set_protect input[type="text"] {
    width: 100%;
    padding: 10px;
    background-color: rgb(from var(--bg-color) r g b / 90%);
    border: 1px solid rgb(from var(--bd-color) r g b / 70%);
    color: var(--txt-color);
    border-radius: 4px;
}

.back-flex {
    display: flex;
    gap: 15px;
}

.flex {
    display: flex;
    gap: 5px;
    align-items: center;
}

.flex1 {
    flex: 1;
}

/* 썸네일 영역 */
.series-wr-img {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.wr-thumb {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wr-thumb input[type="file"] {
    flex: 0 0 auto;
    width: 200px;
}

.wr-thumb input[type="text"] {
    flex: 1;
}

.series-file-delete {
    background: rgb(from var(--btn-bg-color) r g b / 100%);
    color: rgb(from var(--btn-txt-color) r g b / 100%);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.series-file-delete:hover {
    background: rgb(from var(--btn-acc-color) r g b / 100%);
    color: rgb(from var(--btn-axt-color) r g b / 100%);
}

#series-preview {
    border: 1px solid var(--color-5);
    border-radius: 4px;
}

.series-wr-bgm,
.series-wr-bg,
.post-wr-img {
    flex: 1;
}

/* 입력 필드 공통 스타일 */
#write_form .frm_input {
    width: 100%;
    background-color: rgb(from var(--input-color) r g b / 50%);
    border: 1px solid rgb(from var(--input-color) r g b / 70%);
    color: var(--txt-color);
    border-radius: 8px;
    font-family: 'Pretendard';
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    padding: 8px 10px;
    max-width: 100%;
    font-size: 12px;
    height: auto;
    transition: border-color 0.2s;
}

#write_form .frm_input:focus {
    border-color: var(--acc-color);
    outline: none;
}

#write_form .full {
    width: 100%;
}

/* 제목 영역 */
.series-wr-subject {
    margin-top: 10px;
}

.series-wr-subject input {
    font-size: 16px;
    padding: 14px;
    font-weight: bold;
}

.post-title {
    flex: 1;
}

.post-order {
    width: 100px;
}

/* 파일 업로드 스타일 */
input[type="file"] {
    background-color: var(--color-1);
    color: var(--txt-color);
    padding: 8px;
    border: 1px solid var(--color-4);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Pretendard';
    font-size: 14px;
}

input[type="file"]::-webkit-file-upload-button {
    background-color: var(--color-4);
    color: var(--color-e);
    border: none;
    padding: 8px 12px;
    margin-right: 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background-color: var(--color-5);
}

/* 버튼 영역 */
.btn_confirm {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* 버튼 */
#write_form .ui-btn,
#write_form .btn_submit,
#write_form .btn_cancel,
#write_form .align-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
    box-sizing: border-box;
    font: inherit;
    height: auto;
    line-height: 1.5;
    overflow: visible;
    text-align: center;
    text-transform: none;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    transition: all 0.2s;
    font-family: 'Pretendard';
    padding: 5px 10px;
    background: rgb(from var(--btn-bg-color) r g b / 50%);
    color: rgb(from var(--btn-txt-color) r g b / 85%);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    align-content: center;
    justify-content: center;
}


/* 이미지 영역 */
.post-upload {
    flex: 1;
}

.post-img {
    display: flex;
    justify-content: space-between;
}

.dropzone {
    display: flex;
    height: fit-content;
    background-color: rgb(from var(--input-color) r g b / 50%);
    border: 1px solid rgb(from var(--input-color) r g b / 70%);
    color: var(--txt-color);
    border-radius: 15px;
}

.preview {
    display: flex;
    gap: 5px;
    height: fit-content;
    padding: 9px;
    flex-direction: row;
    flex-wrap: wrap;
}

.preview-container {
    width: 60px;
    height: 40px;
}

.preview-item.existing {
    position: relative;
}

.preview-img {
    border-radius: 10px;
    border: 1px solid rgb(from var(--input-color) r g b / 70%);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-container button {
    color: rgb(from var(--bg-color) r g b / 100%);
    font-weight: 600;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    background-color: rgb(from var(--txt-color) r g b / 80%);
    width: 15px;
    height: 15px;
    border: 1px solid rgb(from var(--input-color) r g b / 70%);
    font-size: 10px;
}

.preview-item.new {
    position: relative;
}

.wr-upload {
    display: flex;
    gap: 5px;
    flex-direction: column;
}

.post-flex {
    display: flex;
    align-items: center;
    gap: 5px;
}

.upload-option {
    display: flex;
    align-items: center;
}

.comic-option {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: rgb(from var(--input-color) r g b / 50%);
    border: 1px dashed rgb(from var(--txt-color) r g b / 50%);
    color: var(--txt-color);
    padding: 3px 10px;
    border-radius: 8px;
}

.comic-option input[type="checkbox"] {
    scale: 1.3;
    margin-right: 3px;
}

.comic-option .info-text {
    font-size: 14px;
    color: rgb(from var(--txt-color) r g b / 80%);
    margin-top: 5px;
}

button#upload-btn {
    width: 40px;
    height: 20px;
    margin: 0px 5px;
}

.dropzone.dragover {
    border-color: #00aaff;
    background-color: #f0faff;
}


.post-content {
    height: 60vh;
    display: flex;
    gap: 10px;
}

.text-content-container,
.view-content-container {
    flex: 1;
}

.text-content {
    height: 100%;
}

.text-content-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wr_viewer {
    background-color: rgb(from var(--bg-color) r g b / 70%);
    border: 1px solid rgb(from var(--bd-color) r g b / 70%);
    padding: 20px;
    overflow: auto;
    letter-spacing: -0.3px;
    color: rgb(from var(--txt-color) r g b / 90%);
    height: calc(100% - 40px);
    border-radius: 8px;
}

#wr_editor {
    color: rgb(from var(--txt-color) r g b / 100%);
    background: rgb(from var(--input-color) r g b / 50%);
    padding: 12px 15px;
    border-radius: 8px;
    height: 100%;
    line-height: 1.7;
    letter-spacing: -0.3px;
    font-size: 12px;
    font-family: 'Pretendard';
    max-width: 100%;
}

.frm_input::placeholder,
#wr_editor::placeholder {
    color: rgb(from var(--txt-color) r g b / 60%);
}

/* 글꼴 선택 */
.post-font-option {
    display: flex;
    gap: 10px;
}

.post-font .title-text {
    font-size: 15px;
    width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.post-font {
    display: flex;
    gap: 5px;
    flex: 1;
}

.post-font.font-small {
    flex: 0.5;
}

.input-px {
    position: relative;
    display: flex;
    gap: 8px;
}

.input-px .form-control {
    padding: 0px 10px;
    width: 160px;
    border-radius: 10px;
    border: 0;
}

.input-px .unit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    /* 클릭 방지 */
    font-size: 14px;
}

.text-fam-nav button {
    font-size: 12px;
    border-radius: 5px;
    width: 75px;
    height: 32px;
}

.text-align-nav {
    display: flex;
    gap: 3px;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .series-option {
        flex-direction: column;
        gap: 15px;
    }

    .wr-thumb {
        flex-direction: column;
        align-items: flex-start;
    }

    .wr-thumb input[type="file"] {
        width: 100%;
        margin-bottom: 10px;
    }

    #write_form {
        padding: 20px 15px;
    }
}