@charset "utf-8";

/* ------------------------------------------------------------
   前台共用 Loading
   結構（由 App_Code/utc.loading.cs 的 FrontLoading.Render 輸出）：
     .loading.loading-backdrop   半透明遮罩（cursor: wait）
     .loading.loading-box        置中白卡（spinner-grow + 文字）
   顯示/隱藏：各頁 JS 統一切換 .loading.hidden class
   ------------------------------------------------------------ */

.loading.loading-backdrop {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    z-index: 9999;
    cursor: wait;
    font-size: 0;
}

/* 地圖頁麵有固定 header 時，遮罩自 header 下方開始 */
.loading.loading-header-offset {
    top: 90px;
    height: calc(100% - 90px);
}

.loading.loading-box {
    width: auto;
    height: auto;
    min-height: 1.5em;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .2);
    color: #231814;
    z-index: 10000;
    cursor: default;
}

.loading-text {
    font-size: var(--size_16, 1.6rem);
    line-height: 1.4;
    color: #231814;
}

@media (max-width: 540px) {
    .loading.loading-header-offset {
        top: 75px;
        height: calc(100% - 75px);
    }

    .loading.loading-box {
        max-width: min(90vw, 320px);
    }
}

/* 隱藏規則放在檔案最後，同權重下可壓過上方顯示樣式與 uDefault 的 .loading 顯示規則 */
.loading.hidden {
    display: none;
}

.loading[hidden] {
    display: none;
}
