/* =========================================================
   GNUBOARD BOARD WRITE
   글쓰기 페이지 전용 CSS
========================================================= */

.board-write-wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    color: #222;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   TITLE
--------------------------------------------------------- */

.board-write-title {
    margin-bottom: 25px;
}

.board-write-title h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.8px;
}

.board-write-title p {
    margin: 8px 0 0;
    color: #888;
    font-size: 14px;
}


/* ---------------------------------------------------------
   FORM
--------------------------------------------------------- */

.board-write-form {
    border-top: 2px solid #222;
    background: #fff;
}


/* ---------------------------------------------------------
   ROW
--------------------------------------------------------- */

.board-write-row {
    display: flex;
    min-height: 58px;
    border-bottom: 1px solid #e8e8e8;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   LABEL
--------------------------------------------------------- */

.board-write-label {
    display: flex;
    align-items: center;

    width: 145px;
    flex-shrink: 0;

    padding: 15px 20px;

    background: #f8f9fb;

    color: #333;
    font-size: 14px;
    font-weight: 600;

    box-sizing: border-box;
}

.board-write-label.required::after {
    content: "*";
    margin-left: 4px;
    color: #e53935;
}


/* ---------------------------------------------------------
   FIELD
--------------------------------------------------------- */

.board-write-field {
    flex: 1;
    display: flex;
    align-items: center;

    min-width: 0;
    padding: 9px 12px;

    box-sizing: border-box;
}


/* ---------------------------------------------------------
   INPUT
--------------------------------------------------------- */

.board-write-field input[type="text"],
.board-write-field input[type="password"],
.board-write-field input[type="email"],
.board-write-field input[type="tel"],
.board-write-field input[type="url"],
.board-write-field select {
    width: 100%;
    height: 42px;

    padding: 0 13px;

    border: 1px solid #dfe3e8;
    border-radius: 5px;

    background: #fff;

    color: #333;
    font-size: 14px;

    outline: none;

    transition:
        border-color .2s,
        box-shadow .2s;

    box-sizing: border-box;
}

.board-write-field input:focus,
.board-write-field select:focus {
    border-color: #2867d8;

    box-shadow:
        0 0 0 3px rgba(40,103,216,.08);
}


/* ---------------------------------------------------------
   TITLE INPUT
--------------------------------------------------------- */

.board-write-field .write-subject {
    font-size: 15px;
    font-weight: 500;
}


/* ---------------------------------------------------------
   SELECT
--------------------------------------------------------- */

.board-write-field select {
    max-width: 220px;

    cursor: pointer;

    appearance: none;

    background-image:
        linear-gradient(45deg, transparent 50%, #777 50%),
        linear-gradient(135deg, #777 50%, transparent 50%);

    background-position:
        calc(100% - 17px) 17px,
        calc(100% - 12px) 17px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat: no-repeat;
}


/* ---------------------------------------------------------
   TEXTAREA
--------------------------------------------------------- */

.board-write-content {
    display: block;
    padding: 12px;
}

.board-write-content textarea {
    display: block;

    width: 100%;
    min-height: 360px;

    padding: 15px;

    border: 1px solid #dfe3e8;
    border-radius: 5px;

    background: #fff;

    color: #333;
    font-size: 14px;
    line-height: 1.7;

    resize: vertical;

    outline: none;

    box-sizing: border-box;

    transition:
        border-color .2s,
        box-shadow .2s;
}

.board-write-content textarea:focus {
    border-color: #2867d8;

    box-shadow:
        0 0 0 3px rgba(40,103,216,.08);
}


/* ---------------------------------------------------------
   FILE
--------------------------------------------------------- */

.board-file {
    display: flex;
    align-items: center;
    gap: 8px;

    width: 100%;
}

.board-file input[type="file"] {
    width: 100%;
    height: 42px;

    padding: 8px;

    border: 1px solid #dfe3e8;
    border-radius: 5px;

    background: #fff;

    font-size: 13px;

    box-sizing: border-box;
}


/* ---------------------------------------------------------
   FILE DESCRIPTION
--------------------------------------------------------- */

.board-file-help {
    margin-top: 7px;

    color: #999;
    font-size: 12px;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   CHECKBOX
--------------------------------------------------------- */

.board-write-check {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #555;
    font-size: 13px;

    cursor: pointer;
}

.board-write-check input {
    width: 16px;
    height: 16px;

    margin: 0;

    accent-color: #2867d8;
}


/* ---------------------------------------------------------
   RADIO
--------------------------------------------------------- */

.board-write-radio {
    display: flex;
    align-items: center;
    gap: 20px;
}

.board-write-radio label {
    display: flex;
    align-items: center;
    gap: 6px;

    color: #555;
    font-size: 13px;

    cursor: pointer;
}

.board-write-radio input {
    width: 16px;
    height: 16px;

    margin: 0;

    accent-color: #2867d8;
}


/* ---------------------------------------------------------
   PASSWORD
--------------------------------------------------------- */

.board-write-password {
    max-width: 300px;
}


/* ---------------------------------------------------------
   NAME
--------------------------------------------------------- */

.board-write-name {
    max-width: 300px;
}


/* ---------------------------------------------------------
   EMAIL
--------------------------------------------------------- */

.board-write-email {
    max-width: 450px;
}


/* ---------------------------------------------------------
   PHONE
--------------------------------------------------------- */

.board-write-phone {
    display: flex;
    align-items: center;
    gap: 7px;
}

.board-write-phone input {
    width: 100px !important;
}

.board-write-phone span {
    color: #999;
}


/* ---------------------------------------------------------
   URL
--------------------------------------------------------- */

.board-write-url {
    max-width: 600px;
}


/* ---------------------------------------------------------
   EDITOR
--------------------------------------------------------- */

.board-editor {
    width: 100%;
}

.board-editor .write-editor {
    width: 100%;
}


/* ---------------------------------------------------------
   CAPTCHA
--------------------------------------------------------- */

.board-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
}

.board-captcha img {
    height: 42px;

    border: 1px solid #ddd;
    border-radius: 4px;
}

.board-captcha input {
    max-width: 180px;
}


/* ---------------------------------------------------------
   BUTTON AREA
--------------------------------------------------------- */

.board-write-buttons {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 8px;

    margin-top: 25px;
}


/* ---------------------------------------------------------
   BUTTON
--------------------------------------------------------- */

.board-write-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 110px;
    height: 46px;

    padding: 0 20px;

    border: 1px solid #dfe3e8;
    border-radius: 5px;

    background: #fff;

    color: #444;
    font-size: 14px;
    font-weight: 500;

    text-decoration: none;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background .2s,
        border-color .2s,
        color .2s;
}

.board-write-btn:hover {
    border-color: #bbb;
    background: #f7f7f7;
}


/* ---------------------------------------------------------
   PRIMARY BUTTON
--------------------------------------------------------- */

.board-write-btn.primary {
    border-color: #2867d8;
    background: #2867d8;
    color: #fff;
}

.board-write-btn.primary:hover {
    border-color: #1e55b8;
    background: #1e55b8;
}


/* ---------------------------------------------------------
   CANCEL
--------------------------------------------------------- */

.board-write-btn.cancel {
    background: #fff;
    color: #555;
}


/* ---------------------------------------------------------
   HELP TEXT
--------------------------------------------------------- */

.board-write-help {
    margin: 6px 0 0;

    color: #999;
    font-size: 12px;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   REQUIRED
--------------------------------------------------------- */

.board-required {
    color: #e53935;
    font-size: 12px;
}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 768px) {

    .board-write-wrap {
        width: 100%;
    }

    .board-write-title h2 {
        font-size: 22px;
    }


    /* ROW */

    .board-write-row {
        display: block;
        min-height: auto;
    }


    /* LABEL */

    .board-write-label {
        width: 100%;
        min-height: 44px;

        padding: 12px 13px;

        background: #f7f8fa;

        font-size: 13px;
    }


    /* FIELD */

    .board-write-field {
        display: block;

        width: 100%;

        padding: 9px 0;
    }


    /* INPUT */

    .board-write-field input[type="text"],
    .board-write-field input[type="password"],
    .board-write-field input[type="email"],
    .board-write-field input[type="tel"],
    .board-write-field input[type="url"],
    .board-write-field select {
        height: 44px;
    }


    /* SELECT */

    .board-write-field select {
        max-width: 100%;
    }


    /* CONTENT */

    .board-write-content {
        padding: 9px 0;
    }

    .board-write-content textarea {
        min-height: 280px;
    }


    /* PHONE */

    .board-write-phone {
        width: 100%;
    }

    .board-write-phone input {
        flex: 1;

        width: auto !important;
    }


    /* MAX WIDTH */

    .board-write-password,
    .board-write-name,
    .board-write-email,
    .board-write-url {
        max-width: none;
    }


    /* CAPTCHA */

    .board-captcha {
        flex-wrap: wrap;
    }


    /* BUTTON */

    .board-write-buttons {
        margin-top: 18px;
    }

    .board-write-btn {
        flex: 1;

        min-width: 0;
        height: 46px;
    }

}


/* ---------------------------------------------------------
   SMALL MOBILE
--------------------------------------------------------- */

@media (max-width: 480px) {

    .board-write-title {
        margin-bottom: 18px;
    }

    .board-write-title h2 {
        font-size: 20px;
    }

    .board-write-title p {
        font-size: 12px;
    }

    .board-write-buttons {
        gap: 6px;
    }

    .board-write-btn {
        font-size: 13px;
    }

}