﻿/* Modal 基本 */
.modal {
    display: none; /* 初始隱藏 */
    position: fixed;
    inset: 0;
    z-index: 1050;
    overflow-y: auto;
    text-align: center;
}

/* 背景遮罩 */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
}

/* Modal Dialog 容器 */
.modal-dialog {
    display: inline-block;
    vertical-align: middle;
    margin: 1.75rem auto;
    max-width: 1200px;
    width: 90%;
}

/* Modal Content */
.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    padding: 3rem;
    text-align: left;
    max-height: 90vh;
    overflow-y: auto;
}

    .modal-content ul, .modal-content ol {
        padding-top: 10px;
        padding-bottom: 10px;
        padding-left: 30px;
    }

/* 關閉按鈕 */
.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 內容圖片響應式 */
.modal-body img {
    float: right;
    margin-left: 1rem;
    max-width: 50%;
    height: auto;
    border-radius: 0.25rem;
}

#newsModalTitleContent {
    font-size:2rem;
    font-weight:600;
}

@media (max-width: 640px) {
    .modal-body img {
        float: none;
        display: block;
        margin: 0 0 1rem 0;
        width: 100%;
        max-width: 100%;
    }
}

/* 標題 */
.modal-body h3 {
    margin-bottom: 1rem;
}

/* 單位、時間 */
.modal-unit,
.modal-time {
    color: #6c757d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* hr */
.modal-body hr {
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid #dee2e6;
}
