@charset "utf-8";
/* notice 스킨은 기본게시판(default) 스킨과 동일한 디자인을 사용합니다. */
@import url("../default/_main.css");
@import url("/common/css/board_write.css");
@import url("/common/css/board_view.css");

@charset "utf-8";

@charset "utf-8";

/* =========================================================
   BOARD WRITE STYLES (anti_csi matching screenshot)
   - default (일반게시판)
   - notice (공지사항)
   - gallery (갤러리)
   - promotion (홍보자료)
========================================================= */

/* 1. 전체 컨테이너 규격 (1440px) */
.board-write,
.sub-content.board-write {
    width: 100%;
    margin: 0 auto;
    padding-bottom: 80px;
    box-sizing: border-box;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #222222;
}

.board-write .inner,
.board-write .wrap,
.board-write .inner.wrap,
.sub-content.board-write .inner,
.sub-content.board-write .wrap {
    width: 100% !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

/* 박스 형태 제거: 평면형 깔끔한 레이아웃 (스크린샷 일치) */
.board-write-box,
.board-write-box.default-write-box,
.board-write-box.notice-write-box,
.board-write-box.gallery-write-box,
.board-write-box.media-write-box,
.bbs-form.board-write-box {
    width: 100% !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* 폼 본체 */
.write-form,
.write-form.bbs-form-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

/* 각 입력 행 */
.write-row {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.write-row label,
.write-row .write-label {
    width: 140px;
    min-width: 140px;
    font-size: 15px;
    font-weight: 600;
    color: #222222;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.write-row label span.required,
.write-row label span,
.write-label span.required,
.write-label span {
    color: #ef4444;
    font-weight: 700;
}

.write-field {
    flex: 1;
    width: 100%;
    min-width: 0;
}

/* 제목 인풋 */
.write-input,
.write-select,
.write-row input[type="text"],
.write-row input[type="url"],
.write-row input[type="password"],
.write-row select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #d7dee9;
    border-radius: 8px;
    font-size: 15px;
    color: #222222;
    background-color: #ffffff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.write-input:focus,
.write-select:focus,
.write-row input[type="text"]:focus,
.write-row input[type="url"]:focus,
.write-row input[type="password"]:focus,
.write-row select:focus {
    border-color: #7ea0ef;
    box-shadow: 0 0 0 3px rgba(31, 75, 184, 0.08);
}

.write-input::placeholder,
.write-row input::placeholder {
    color: #98a2b3;
}

.write-select,
.write-row select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 16px) center;
    padding-right: 40px;
    cursor: pointer;
}

/* 비회원 이름 / 비밀번호 2열 */
.write-user-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
}

.write-user-row .write-col {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.write-user-row .write-col .write-label {
    width: 90px;
    min-width: 90px;
}

/* 옵션 행 (공지사항 / 비밀글 체크박스) - 좌측 정렬 & 자연스러운 여백 */
.write-options-row {
    display: block !important;
    width: 100% !important;
    margin-top: 14px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
}

.write-options-field {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.custom-check-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #333333 !important;
    user-select: none !important;
    margin: 0 !important;
}

.custom-checkbox {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    accent-color: #222222 !important;
    margin: 0 !important;
}

.custom-check-label.is-fixed {
    color: #6b7280;
    cursor: default;
}

/* 에디터 행 - 1440px 100% 전체 너비 차지 (스크린샷 일치) */
.write-content-row {
    display: block !important;
    width: 100% !important;
    margin-top: 4px;
    margin-bottom: 20px;
}

.write-content-row .write-field {
    width: 100% !important;
}

.write-content-row #cke_board_content {
    width: 100% !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* 업로드 영역 (스크린샷 일치: 안내문구 상단, 파일선택 버튼 하단 좌측정렬) */
.write-upload-row {
    display: block !important;
    width: 100% !important;
    margin-top: 10px;
    margin-bottom: 24px;
}

.upload-control-box {
    width: 100%;
}

.upload-rect {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 14px !important;
}

.upload-guide-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666666;
    line-height: 1.4;
}

.upload-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 40px !important;
    padding: 0 18px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333333 !important;
    background: #ffffff !important;
    border: 1px solid #333333 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.upload-btn:hover {
    background: #222222 !important;
    color: #ffffff !important;
    border-color: #222222 !important;
}

.upload-btn svg {
    vertical-align: middle;
}

.file-upload-box.attached-file-box {
    width: 100%;
    margin-top: 10px;
}

.file-upload-box.hidden {
    display: none !important;
}

.board-upload-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.board-upload-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    background: #fbfbfc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    box-sizing: border-box;
    transition: background 0.15s ease;
}

.board-upload-list__item:hover {
    background: #f4f6f8;
}

.board-upload-list__item .file-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.board-upload-list__link {
    font-size: 14px;
    color: #333333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-upload-list__link:hover {
    color: #0284c7;
    text-decoration: underline;
}

.board-upload-list__delete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    height: 28px;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    line-height: 1;
}

.board-upload-list__delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* 최하단 버튼 영역 - 중앙 나란히 정렬 (스크린샷 일치: [ 목록 ] [ 저장 ]) */
.board-write-actions,
.board-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 50px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
}

.board-write-actions a,
.board-write-actions button,
.board-write-actions .board-btn,
.board-write-actions .bbs-btn,
.board-actions a,
.board-actions button,
.board-actions .board-btn,
.board-actions .bbs-btn {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    height: 48px !important;
    min-width: 120px !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 24px !important;
    border: 1px solid #333333 !important;
    background: #ffffff !important;
    color: #222222 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.board-write-actions a:hover,
.board-write-actions button:hover,
.board-write-actions .board-btn:hover,
.board-actions a:hover,
.board-actions button:hover,
.board-actions .board-btn:hover {
    background: #222222 !important;
    color: #ffffff !important;
    border-color: #222222 !important;
}

.board-write-actions a svg,
.board-write-actions button svg,
.board-actions a svg,
.board-actions button svg {
    margin-right: 6px;
    vertical-align: middle;
}

/* 홍보자료(promotion) 썸네일 설정 */
.media-write-head {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #222222;
}

.media-write-head span {
    font-size: 22px;
    font-weight: 700;
    color: #222222;
}

.media-thumb-row {
    align-items: flex-start;
}

.media-thumb-field {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumb-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.thumb-switch input[type="checkbox"] {
    display: none;
}

.thumb-switch .switch-ui {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.thumb-switch .switch-ui::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.thumb-switch input[type="checkbox"]:checked + .switch-ui {
    background-color: #222222;
}

.thumb-switch input[type="checkbox"]:checked + .switch-ui::after {
    transform: translateX(20px);
}

.thumb-switch-text {
    font-size: 15px;
    font-weight: 600;
    color: #333333;
}

.write-help {
    font-size: 13px;
    color: #666666;
    margin: 0;
}

.file-upload[data-thumb-upload] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    box-sizing: border-box;
}

.file-upload[data-thumb-upload].is-disabled {
    opacity: 0.5;
    pointer-events: none;
    background: #f1f5f9;
}

.file-upload[data-thumb-upload] input[type="file"] {
    display: none;
}

.file-upload[data-thumb-upload] .upload-name {
    flex: 1;
    font-size: 13.5px;
    color: #64748b;
}

.file-upload[data-thumb-upload] .upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    background: #ffffff;
    border: 1px solid #333333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 반응형 모바일 미디어 쿼리 */
@media (max-width: 768px) {
    .board-write .inner,
    .board-write .wrap {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .write-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .write-row label,
    .write-row .write-label {
        width: 100%;
        min-width: 0;
        font-size: 14px;
    }

    .write-user-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .write-user-row .write-col {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .write-user-row .write-col .write-label {
        width: 100%;
        min-width: 0;
    }

    .write-input,
    .write-select,
    .write-row input[type="text"],
    .write-row input[type="url"],
    .write-row input[type="password"],
    .write-row select {
        height: 44px;
        font-size: 14px;
        padding: 0 14px;
    }

    .board-write-actions,
    .board-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        margin-top: 36px !important;
    }

    .board-write-actions a,
    .board-write-actions button,
    .board-write-actions .board-btn,
    .board-actions a,
    .board-actions button,
    .board-actions .board-btn {
        min-width: 100px !important;
        width: auto !important;
        height: 44px !important;
        padding: 0 18px !important;
        font-size: 14px !important;
    }
}

