/* ============================================================
   custom.css — 額外功能樣式（不修改原有 style.css）
   包含: 燈箱、響應式微調、後台管理專用樣式
   原有網站配色和佈局完全不變
   ============================================================ */

/* --- 燈箱 (替代 lightview.js, 不依賴 prototype.js) --- */
#lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

#lightbox-overlay.active {
    display: flex;
}

#lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border: 4px solid #fff;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

#lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    font-family: Arial, sans-serif;
    z-index: 10000;
}

#lightbox-caption {
    position: fixed;
    bottom: 20px;
    left: 0; right: 0;
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-family: "標楷體", Verdana, sans-serif;
    z-index: 10000;
}

/* --- 響應式微調（手機時側欄變水平） --- */
@media (max-width: 780px) {
    body.sidebar-left {
        min-width: 0;
    }
    #wrapper #container {
        padding: 0 10px;
    }
    #wrapper #container .sidebar {
        margin: 10px 0 1em;
        width: 100%;
        float: none;
    }
    #sidebar-left .block {
        padding: 0;
    }
    body.sidebar-left #center {
        margin-left: 0;
    }
    body.sidebar-left #squeeze {
        margin-left: 0;
    }
    #wrapper #container #center .right-corner .left-corner {
        padding: 20px 10px 2em 10px;
    }
    /* 側欄選單水平排列 */
    #sidebar-left ul.menu li {
        float: left;
        margin: 0 2px 2px 0;
    }
    /* 設施表格適應手機 */
    table img {
        max-width: 100%;
        height: auto;
    }
}

/* --- 動態內容區（後台管理用） --- */
.admin-msg {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
}
.admin-msg-success {
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}
.admin-msg-error {
    background: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}
