﻿.thread-modal {
    width: 1000px;
}

    .thread-modal .thread {
        background: #fff;
        border: 1px solid #e9e9e9;
        border-radius: 16px;
        padding: 12px 14px;
        box-shadow: 0 1px 2px rgba(0,0,0,.02);
        margin: 1em;
        margin-top: 1em;
    }

    .thread-modal .post-header,
    .thread-modal .reply-header {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .thread-modal .avatar {
        width: 40px;
        height: 40px;
        border-radius: 999px;
        border: 1px solid #dfe6ff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
    }

        .thread-modal .avatar.sm {
            width: 32px;
            height: 32px;
            font-size: 13px;
        }

    .thread-modal .head-main {
        flex: 1;
        min-width: 0;
    }

    .thread-modal .row1 {
        display: flex;
        align-items: baseline;
        gap: 6px;
        flex-wrap: wrap;
    }

    .thread-modal .row2 {
        color: #888;
        font-size: 12px;
    }

    .thread-modal .name {
        font-weight: 700;
        font-size: 14px;
    }

    .thread-modal .type-chip {
        font-size: 12px;
        padding: 2px 8px;
        border: 1px solid #eee;
        border-radius: 999px;
        background: #fafafa;
    }

    .thread-modal .badge {
        padding: 2px 8px;
        font-size: 12px;
        border-radius: 999px;
        border: 1px solid #e0e0e0;
        background: #FFE4E6;
        color: #333;
    }

    .thread-modal .post-body, .thread-modal .reply-body {
        margin-top: 10px;
    }

    .thread-modal .post-text {
        font-size: 14px;
        line-height: 1.7;
        color: #222;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

        .thread-modal .post-text a {
            color: #0b57d0;
            text-decoration: none;
            border-bottom: 1px dashed #9ab7f3;
        }

            .thread-modal .post-text a:hover {
                border-bottom-color: #0b57d0;
            }

    .thread-modal .replies {
        margin-top: 10px;
        padding-left: 16px;
        border-left: 2px solid #f0f0f0;
    }

    .thread-modal .reply {
        padding: 10px 0 6px;
        border-bottom: 1px dashed #efefef;
    }

        .thread-modal .reply:last-child {
            border-bottom: none;
        }

    .thread-modal .photo {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 12px;
        border: 1px solid #f0f0f0;
        background: #fafafa;
    }

        .thread-modal .photo.sm {
            max-height: 360px;
            object-fit: contain;
        }

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #dfe6ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .avatar.sm {
        width: 32px;
        height: 32px;
    }

/* 圖像填充容器，保留邊距更好看；若想滿版可改成 100% */
.avatar-img {
    width: 70%;
    height: 70%;
    object-fit: contain; /* 不裁切，完整顯示 icon */
    display: block;
    opacity: .7;
}

/* 大螢幕可微放大（可選） */
@media (min-width: 1280px) {
    .avatar {
        width: 44px;
        height: 44px;
    }

        .avatar.sm {
            width: 36px;
            height: 36px;
        }
}


@media (max-width: 1280px) {
    .thread-modal {
        width: 100%;
    }
}


/* 顏色變體 */
.avatar-teacher {
    background: #F0F7FF;
    border-color: #D6E6FF;
}
/* 淺藍 */
.avatar-family {
    background: #FFF0F3;
    border-color: #FFD6E0;
}
/* 淺紅(粉) */
.avatar-notice,
.avatar-record {
    background: #EDFFF3;
    border-color: #CCEBD7;
}
/* 淺綠 */


.thread-modal .thread-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
    display: flex;
    justify-content: end;
    gap: 8px;
}

.thread-modal .btn-link {
    background: transparent;
    border: none;
    padding: 4px 6px;
    color: #0b57d0;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px dashed rgba(11,87,208,.35);
}

    .thread-modal .btn-link:hover {
        border-bottom-color: #0b57d0;
    }

.thread-modal .composer {
    margin-top: 8px;
}

.thread-modal .composer-text {
    width: 100%;
    box-sizing: border-box;
    min-height: 32px;
    resize: vertical;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
}

    .thread-modal .composer-text:focus {
        outline: none;
        border-color: #c7d7fe;
        box-shadow: 0 0 0 3px rgba(199,215,254,.35);
    }

.thread-modal .composer-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: end;
}

.thread-modal .btn {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    background: #f9f9f9;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

    .thread-modal .btn:hover {
        background: #f1f1f1;
    }

    .thread-modal .btn.small {
        padding: 6px 10px;
        font-size: 12px;
    }

    .thread-modal .btn.ghost {
        background: transparent;
    }

/* 標記為我的任務/職務 */
.myjob-mark {
    border: 1px solid #ffb347 !important; /* 淡橘邊框 */
    background: linear-gradient(180deg, #fff7ec 0%, #ffffff 30%) !important;
}
