/* 線上投稿 單元 */

@charset "UTF-8";

/* 20260806新增 線上投稿 */
.submission-1-word {
    font-size: 2.5rem;
    color: #000;
    line-height: 1.5;
    margin-bottom: 16px;
    text-align: center;
}

.submission-2-word {
    font-size: 2.25rem;
    color: #36842A;
    line-height: 1.5;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.submission-card-row {
    display: flex;
    gap: 62px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;
    /* 讓兩張卡片等高 */
    margin-bottom: 80px;
}

.submission-card {
    flex: 1 1 480px;
    display: flex;
    flex-direction: column;
    /* 讓內部按鈕可以置底 */
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

.submission-card-body {
    flex: 1 1 auto;
    /* 佔滿剩餘空間，把按鈕推到底部 */
    padding: 70px 50px 0;
}

.submission-card-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 20px;
}

.submission-card.blue .submission-card-title {
    color: #0E4C8D;
}

.submission-card.teal .submission-card-title {
    color: #0E878D;
}

.submission-card-text {
    font-size: 1.375rem;
    line-height: 1.6;
    color: #000;
    margin: 0 0 20px;
    z-index: 1;
    position: relative;
}

.submission-card-body {
    position: relative;
}

.submission-card .submission-card-illustration {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 0;
}

.submission-card-body {
    padding-bottom: 120px;
}

.submission-card.blue .submission-card-illustration {
    background: url(../images/contribute02.png) no-repeat 94%;
    height: 183px;
    width: 100%;
}

.submission-card.teal .submission-card-illustration {
    background: url(../images/contribute01.png) no-repeat 96%;
    height: 126px;
    width: 100%;
}


.submission-card-btn {
    display: block;
    width: 100%;
    padding: 25px 10px;
    text-align: center;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    margin-top: auto;
    /* 置底 */
}

.submission-card.blue .submission-card-btn {
    background: #1d4e89;
}

.submission-card.blue .submission-card-btn:hover {
    background: #163c6b;
}

.submission-card.teal .submission-card-btn {
    background: #1a8a8a;
}

.submission-card.teal .submission-card-btn:hover {
    background: #146e6e;
}

.s-link-bar {
    gap: 12px;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.s-step-link {
    max-width: 240px;
    width: 50%;
    padding: 15px 10px;
    background: #6D6B67;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
}

.s-step-link.active {
    background: #36842A;
}

.s-step-link:hover {
    background: #7D0021;
}

.s-step-link.active:hover {
    background: #36842A;
}


.icon-draft-example i {
    background: url(../images/icon-draft-example.png) no-repeat center;
    width: 130px;
    height: 101px;
    background-size: cover;
}

.icon-draft-example {
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.draft-example-area {
    padding: 20px 50px;
    border-radius: 20px;
    border: 1px solid #948D82;
    display: flex;
    background: #fff;
    font-size: 1.5rem;
    gap: 50px;
    margin-bottom: 40px;
}

.draft-example-area ul {
    width: 100%;
}

.draft-example-area ul li a {
    background: #F2F0F0;
    border-radius: 75px;
    color: #000;
    display: block;
    padding: 10px 40px;

}

.draft-example-area ul li a:hover {
    background: #e7ffcb;
}



.draft-example-area ul li+li {
    margin-top: 16px;
}

.go-write {
    background: #36842A;
    color: #fff;
    font-size: 1.875rem;
    text-align: center;
    border-radius: 75px;
    padding: 15px;
    width: 100%;
    max-width: 375px;
    font-weight: 700;
    display: block;
    margin: 0 auto;
}

.go-write:hover {
    background: #7D0021;
}

/* ----投稿表單--- */

.submission-form-wrap {
    font-size: 1.375rem;
    padding-left: 6px;
    padding-top: 15px;
}

.submission-form-notice {
    color: #FF2E00;
    margin: 0 0 20px;
}

/* ===== 表單列 ===== */
.submission-form-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}


.submission-form-label {
    flex: 0 0 190px;
    padding-top: 10px;
    white-space: nowrap;
    text-align: right;
}

.submission-form-field {
    flex: 1;
    min-width: 0;
}

.submission-text-input {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #948D82;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    resize: vertical;
    height: 50px;

}

.submission-text-input::placeholder {
    color: #948D82;
}


.field-hint {
    color: #FF2E00;
    font-size: 1.25rem;
}

/* 欄位下方的即時字數統計，例如 2/50 */
.char-count {
    font-size: 0.875rem;
    color: #999;
    margin: 2px 0 0;
    text-align: right;
}

/* 接近或達到字數上限時，顏色轉紅提醒使用者 */
.char-count.near-limit {
    color: #FF2E00;
}

/* 電話欄位（室話 / 行動 並排） */
.phone-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.phone-group .phone-item {
    flex: 1;
    min-width: 180px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.phone-sub-label {
    margin-bottom: 4px;
    display: block;
    white-space: nowrap;
}

/* ===== 上傳檔案區 ===== */
.upload-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.upload-item {
    flex: 1;
    min-width: 260px;
}

.upload-item .upload-title {

    margin-bottom: 2px;
}

.upload-item .upload-rule {
    font-size: 1.25rem;
    color: #FF2E00;
    margin: 0 0 10px;
}

.dropzone {
    border: 1px dashed #948D82;
    border-radius: 10px;
    background: #fafafa;
    padding: 26px 16px;
    text-align: center;
}

.dropzone .cloud-icon {
    width: 100%;
    height: 39px;
    background: url(../images/icon-upload.png) no-repeat center;
    background-size: contain;
    display: block;
    margin-bottom: 8px;
}

.dropzone .dropzone-text {
    font-size: 1.125rem;
    color: #000;
    margin: 0 0 12px;
}

.btn-upload {
    display: inline-block;
    background: #36842A;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 4px;
    font-size: 1.125rem;
    cursor: pointer;
    width: 175px;
}

.btn-upload:hover {
    background: #225e19;
}

/* 已上傳檔名顯示列 */
.file-display {
    display: none;
    /* 預設隱藏，選好檔案後由 JS 顯示 */
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 9px 12px;
    padding-left: 18px;
    border: 1px solid #948D82;
    border-radius: 10px;
    background: #fff;
}

.file-display.show {
    display: flex;
}

.file-display .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 10px;
}

.file-display .btn-remove {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #DE4523;
    color: #fff;
    font-size: 2.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: math;
}


.file-error {
    color: #bc0000;
    margin-top: 6px;
    display: none;
}

.file-error.show {
    display: block;
}

/* ===== 同意條款 checkbox ===== */
.s-form-bottom {
    padding-left: 146px;
}

.agree-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 26px 0 16px;
}

/* 自訂 checkbox：外層容器，用來疊放隱藏的原生 input 與可視化的方框 */
.custom-checkbox {
    position: relative;
    display: inline-flex;
    width: 55px;
    height: 55px;
    flex: 0 0 auto;
    margin-top: 2px;
    border-radius: 10px;
}

/* 原生 checkbox 仍保留在 DOM 中（維持勾選狀態邏輯），但視覺上隱藏並鋪滿整個方框範圍 */
.custom-checkbox input[type="checkbox"] {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    /* 預設不可直接點擊：cursor 顯示禁止圖示 */
    cursor: not-allowed;
}

/* 可視化的方框，預設為白底灰框 */
.custom-checkbox .checkbox-box {
    position: absolute;
    inset: 0;
    background: #f0f0f0;
    border: 1px solid #666;
    border-radius: 10px;
    transition: background-color .15s ease, border-color .15s ease;
    pointer-events: none;
    /* 點擊事件仍交給下方的 input（雖然 disabled 不會反應） */
}

/* 勾選時：方框變成綠色底，並用 ::after 畫出白色打勾符號 */
.custom-checkbox input[type="checkbox"]:checked+.checkbox-box {
    background: #36842A;
    border-color: #36842A;
}

.custom-checkbox input[type="checkbox"]:checked+.checkbox-box::after {
    content: "";
    position: absolute;
    left: 16px;
    top: 1px;
    width: 20px;
    height: 38px;
    border: solid #fff;
    border-width: 0 5px 5px 0;
    transform: rotate(45deg);
}

.agree-row a {
    color: #006DCF;
    cursor: pointer;
}

.privacy-note {
    color: #FF2E00;
    margin: 0 0 24px;
}

/* ===== 送出按鈕 ===== */
.submit-row {
    text-align: center;
    margin-top: 50px;
}

.btn-submit {
    background: #36842A;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 75px;
    cursor: pointer;
    width: 96%;
    font-size: 1.5rem;
    font-weight: 700;
    max-width: 547px;
}

.btn-submit:hover {
    background: #7D0021;
}

.btn-submit:disabled {
    background: #a9b7ae;
    cursor: not-allowed;
}

/* ===== 燈箱 (Modal) ===== */
.s-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.s-modal-overlay.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.s-modal-box {
    background: #fff;
    width: 96%;

    max-width: 1059px;
    max-height: 85vh;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    font-size: 1.375rem;
}

.s-modal-header {
    background: #DE4523;
    color: #fff;
    padding: 16px;

    font-weight: bold;
    text-align: center;
}

.s-modal-content {
    padding: 20px 30px;
    overflow-y: auto;
    color: #000;
}

.s-modal-content p {
    margin: 0 0 10px;
}

.s-modal-footer {
    display: flex;
}

.s-modal-footer button {
    flex: 1;
    padding: 12px 8px;
    border: none;
    height: 72px;
    font-size: 1.625rem;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
}

.btn-disagree {
    background: #948D82;

}

.btn-disagree:hover {
    background: #837c70;
}

.btn-agree {
    background: #36842A;
}

.btn-agree:disabled {
    background: #a5c0af;
    color: #eee;
    cursor: not-allowed;
}

.btn-agree:not(:disabled):hover {
    background: #296d1e;
}

.scroll-hint {
    font-size: 1.125rem;
    color: #333;
    text-align: center;
    padding: 6px;
    display: block;
    background: #ffe1d5;
}

.submission-form-row.set-bg-highlight {
    background: #E7FFCB;
}

.set-blank {
    display: block;
}

.tech-form-wrap .set-bg-highlight.set-first {
    border-radius: 10px 10px 0 0;
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 0;
}

.tech-form-wrap .set-bg-highlight.set-last {
    border-radius: 0 0 10px 10px;
    padding-bottom: 20px;
}

.submission-select {
    position: relative;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background: url(../images/icon-s-select.svg) no-repeat right;
    background-color: #fff;
    display: block;
    padding: 3px 10px;
    padding-left: 16px;
    padding-right: 56px;
    border-radius: 10px;
    height: 50px;
    border: 1px solid #948D82;
    width: 100%;
}

.tech-form-wrap .set-bg-highlight .submission-select {
    width: 98%;
}

.btn-send-code {
    color: #fff;
    background: #DE4523;
    border-radius: 0 10px 10px 0;
    border: none;
    width: 280px;
    white-space: nowrap;
}

.search-verify .submission-form-label {
    flex: 0 0 120px;
}

.search-list .submission-form-label {
    flex: 0 0 120px;
}

.submission-form-row--code .submission-text-input {
    flex: auto;
    border-radius: 10px 0 0 10px;
}


/* Radio group */
.radio-group {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 28px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 34px;
    height: 34px;
    border: 1px solid #6D6B67;
    border-radius: 50%;
    margin: 0;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    background: #fff;
}


.radio-option input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    background: #36842A;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.search-list--form-field {
    display: flex;
    gap: 20px;
}


.s-result-card-wrap {
    border: 1px solid #948D82;
    border-radius: 10px;
    background: #fff;
    margin-top: 30px;
    margin-bottom: 30px;
}


.s-result-card-wrap h2 {
    font-size: 1.625rem;
    color: #3E3E3E;
    border-bottom: 1px solid #948D82;
    padding: 22px 22px;
    font-weight: 700;
    margin: 0;
}

.s-search-result-content {
    padding: 22px 22px;
}

.submission-progress-wrap {
    border-radius: 10px;
    background: #fff;
    font-size: 1.375rem;
    border: 1px solid #948D82;
    overflow: hidden;
}


.submission-progress-wrap h3 {
    color: #fff;
    background: #32ABBC;
    padding: 10px 10px;
    text-align: center;
    margin: 0;
    font-size: inherit;
    border-bottom: 1px solid #948D82;
}

.submission-progress-content {
    padding: 17px 22px 5px;
    padding-left: 0;
}

.submission-progress-content .submission-form-label {
    padding-top: 0;
}

.submission-progress-content .submission-form-field {
    color: #7B746A;
}

.submission-review-list li+li {
    margin-top: 12px;
}


.submission-text-input:disabled {
    background: #EAEAE9;
    color: #7B746A;
}

.text-no-modify {
    background: #EAEAE9;
    color: #000;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid #7B746A;
}

.set-w-pl {
    padding-left: 206px;
}


.s-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 1.125rem;
    table-layout: fixed;
}

.s-table thead th {
    background: #32ABBC;
    color: #fff;
    font-weight: 700;
    padding: 12px 4px;
    border-bottom: 16px solid #fff;
    white-space: nowrap;
    text-align: center;
}


.s-table tbody td {
    padding: 8px 4px;
    text-align: center;

}

.s-table td:first-child,
.s-table th:first-child {
    padding-left: 16px;
    width: 36%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 1;
    /*max-width: 1px;  forces ellipsis to respect column width with table-layout fixed */
}

.s-table th:first-child {
    padding-left: 0;
    text-align: center;
}

.s-table tbody tr:nth-child(even) {
    background: #fff;
}

.s-table tbody tr:nth-child(odd) {
    background: #f3f3f3;
}

.s-table .status-fail {
    color: #e64a3f;
}




.s-btn-link {
    background: #36842A;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-block;
    color: #fff;
    border: 1px solid #948D82;
}

.s-btn-link:hover {
    background: #7D0021;
}



/* RWD*/
@media (max-width: 1200px) {
    .submission-card-row {
        flex-wrap: wrap;
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .submission-card-illustration {
        height: 126px;
        background-size: contain;
    }

    .submission-card-body {
        padding: 50px 25px 130px;
    }

    .submission-1-word,
    .submission-2-word,
    .submission-card-title {
        font-size: 1.875rem;
    }

    .draft-example-area {
        padding: 20px;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .submission-progress-content {
        padding-left: 16px;
    }

    .set-w-pl {
        padding-left: 0;
    }

    .submission-form-label .set-blank {
        display: inline-block;
    }

    .submission-form-row.set-bg-highlight {
        padding-left: 14px;
    }
}

@media (max-width: 1023px) {

    .submission-form-row {
        flex-direction: column;
        gap: 6px;
    }

    .submission-form-row .submission-form-label {
        flex: none;
        padding-top: 0;
        font-weight: bold;
    }

    .submission-form-field {
        width: 100%;
    }

    .phone-group {
        flex-direction: column;
        gap: 10px;
    }

    .upload-group {
        flex-direction: column;
    }

    .btn-submit {
        padding: 14px 20px;
    }

}





@media (max-width: 768px) {

    .custom-checkbox {
        width: 30px;
        height: 30px;
    }

    .custom-checkbox input[type="checkbox"]:checked+.checkbox-box::after {
        left: 9px;
        top: 4px;
        width: 10px;
        height: 18px;
        border-width: 0 3px 3px 0;
    }

    .custom-checkbox .checkbox-box {
        border-radius: 5px;
    }

    .submission-card {
        flex: 1 1 100%;
    }

    .draft-example-area ul li a {
        border-radius: 15px;
    }

    .search-verify .submission-form-field {
        display: block !important;
    }

    .btn-send-code {
        border-radius: 10px;
        width: 100%;
        height: 45px;
        margin-bottom: 30px;
        margin-top: 12px;
    }

    .submission-form-row--code .submission-text-input {
        border-radius: 10px;
    }

    .file-display .file-name {
        white-space: normal;
    }
}

@media (max-width: 768px) {

    /* 表格RWD */
    .s-table thead {
        display: none;
    }

    .s-table,
    .s-table tbody,
    .s-table tr,
    .s-table td {
        display: block;
        width: 100%;
    }

    .s-table .s-table tbody tr {
        margin-bottom: 14px;
        border-radius: 4px;
        padding: 14px 16px;
        background: #f8f8f8;
    }


    .s-table tbody td {
        text-align: left;
        padding: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        max-width: none;
        white-space: normal;
    }

    .s-table tbody td:last-child {
        border-bottom: none;
    }

    .s-table td:first-child,
    .s-table th:first-child {
        width: 100%;
        white-space: normal;
    }

    .s-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #3fa9b5;
        flex: 0 0 auto;
        margin-right: 12px;
    }

    .s-table tbody td:first-child {
        padding-left: 8px;
        align-items: flex-start;
    }

    .s-table tr {
        border-bottom: 2px solid #ccc;
    }

    .search-list--form-field {
        flex-wrap: wrap;
    }

    .s-result-card-wrap h2 {
        padding: 16px;
    }

    .s-search-result-content {
        padding: 10px;
    }
}

/* =========================================================
   以下為後端整合時新增（2026/08）
   ========================================================= */

/* 投稿須知頁：開放狀態提示 */
.submission-open-state {
    margin: 0 0 24px;
    padding: 16px 20px;
    border-radius: 10px;
    line-height: 1.8;
}

.submission-open-state.is-open {
    background: #eaf5e8;
    border-left: 5px solid #36842A;
    color: #2b5c22;
}

.submission-open-state.is-close {
    background: #fdf0f3;
    border-left: 5px solid #7D0021;
    color: #7D0021;
}

.submission-open-state a {
    color: #7D0021;
    text-decoration: underline;
}

/* 非開放期間停用的「我要投稿」按鈕 */
.s-step-link.is-disabled {
    background: #C4C2BE;
    cursor: not-allowed;
}

.s-step-link.is-disabled:hover {
    background: #C4C2BE;
}

.go-write.is-disabled {
    background: #C4C2BE;
    cursor: not-allowed;
}

.go-write.is-disabled:hover {
    background: #C4C2BE;
}

/* 投稿完成 / 修正送出完成 */
.submission-done {
    padding: 30px 20px;
    text-align: center;
    line-height: 2;
}

.submission-done h3 {
    margin-bottom: 16px;
    color: #36842A;
    font-size: 1.8rem;
    font-weight: 700;
}

.submission-done strong {
    color: #7D0021;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.submission-done .btn-area {
    margin-top: 24px;
}

/* 查詢投稿進度：發送驗證碼／驗證結果訊息 */
.submission-search-msg {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: 8px;
    line-height: 1.7;
}

.submission-search-msg.is-ok {
    background: #eaf5e8;
    border-left: 5px solid #36842A;
    color: #2b5c22;
}

.submission-search-msg.is-error {
    background: #fdf0f3;
    border-left: 5px solid #7D0021;
    color: #7D0021;
}
