@charset "UTF-8";
/* ========================================
   載入中效果（元件見 js/CleanupApply/utils/loading.js）
   ======================================== */

/* Motion Prompt #070 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#070
   轉圈：0.15 秒線性淡入；每秒 1.3 圈（一圈 0.769 秒）等速旋轉。
   完成：轉圈 0.1 秒淡出，打勾圓 0.2 秒淡入、0.25 秒由 0.7 倍放大到 1 倍（easeOutCubic）。 */
.mp-spinner {
    display: inline-flex;
    width: 1.1em;
    height: 1.1em;
    flex: none;
    vertical-align: middle;
    animation: mp-fade-in 0.15s linear both;
}

.mp-spinner-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.mp-spinner:not(.mp-spinner--done) .mp-spinner-svg {
    animation: mp-spin 0.769s linear infinite;
}

.mp-spinner-track,
.mp-spinner-arc {
    fill: none;
    stroke-width: 6;
}

.mp-spinner-track {
    stroke: rgba(1, 79, 90, 0.16);
}

.mp-spinner-arc {
    stroke: #014f5a;
    stroke-linecap: round;
}

.mp-spinner--done {
    animation: mp-fade-in 0.2s linear both;
}

.mp-spinner--done .mp-spinner-svg {
    animation: mp-check-in 0.25s cubic-bezier(0.33, 1, 0.68, 1) both;
}

.mp-done-circle {
    fill: #014f5a;
}

.mp-done-check {
    fill: none;
    stroke: #fff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes mp-spin {
    to { transform: rotate(360deg); }
}

@keyframes mp-check-in {
    from { transform: scale(0.7); }
    to { transform: scale(1); }
}

@keyframes mp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 按鈕忙碌中：保留按鈕尺寸，轉圈與文字並排 */
.is-busy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: progress;
}

/* 地圖讀取提示：不遮住地圖，讓使用者等待時仍可拖曳、縮放。
   行動版查詢結果 sheet 升起時，與右下角圖例共用 --map-fab-bottom 一起上移（見 utils/mapFab.js） */
.map-loading {
    position: absolute;
    left: 50%;
    bottom: var(--map-fab-bottom, 24px);
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(20, 24, 40, 0.14);
    color: #014f5a;
    font-size: 0.9rem;
    transform: translateX(-50%);
    pointer-events: none;
    animation: mp-fade-in 0.15s linear both;
}

.map-loading[hidden] {
    display: none;
}

/* 桌面版：放到地圖上方中央，避開右下角圖例，也比較容易被看到 */
@media (min-width: 769px) {
    .map-loading {
        top: 16px;
        bottom: auto;
        font-weight: 500;
    }
}

.map-loading-icon {
    display: inline-flex;
}

.map-loading .mp-spinner {
    width: 18px;
    height: 18px;
}

/* 查詢結果標題下方的地圖讀取狀態 */
.filter-results-map-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0.35rem 0 0;
    color: #014f5a;
    font-size: 0.85rem;
    animation: mp-fade-in 0.15s linear both;
}

.filter-results-map-status[hidden] {
    display: none;
}

.filter-results-map-status .mp-spinner {
    width: 14px;
    height: 14px;
}

/* Motion Prompt #069 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#069
   骨架屏：同形狀的灰色 #e9e7e5 圓角色塊，0.15 秒線性淡入；
   寬 160 的白色光帶（兩側透明、中間不透明度 0.75）每 0.9 秒由左至右掃過一次，
   光帶中心由 -200 走到「寬度 + 200」；真實內容回來時 0.3 秒線性淡入。
   光帶畫在整個容器上：色塊之間的白底疊上白光看不出差異，效果等同只畫在色塊上。 */
.mp-skeleton {
    position: relative;
    overflow: hidden;
    animation: mp-fade-in 0.15s linear both;
}

.mp-skeleton::after,
.my-calendar.is-loading .fc-view-harness::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -280px;
    width: 160px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    animation: mp-shine 0.9s linear infinite;
}

@keyframes mp-shine {
    to { left: calc(100% + 120px); }
}

.mp-skeleton-block {
    display: block;
    background: #e9e7e5;
    border-radius: 5px;
}

.mp-skeleton-line {
    height: 10px;
}

.mp-skeleton-title {
    height: 14px;
    border-radius: 7px;
}

.mp-reveal {
    animation: mp-fade-in 0.3s linear both;
}

/* 資訊分頁：區塊標題 + 2×2 卡片 + 兩行說明 */
.mp-skeleton--info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0 12px;
}

.mp-skeleton--info .mp-skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mp-skeleton--info .mp-skeleton-card {
    height: 72px;
    border-radius: 8px;
}

/* 查詢結果：與 .filter-result-item 同尺寸的列 */
.mp-skeleton--results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0.8rem 0.75rem 0.9rem;
}

.mp-skeleton--results .mp-skeleton-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 54px;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e3eef2;
    border-radius: 8px;
    background: #fff;
}

.mp-skeleton--results .mp-skeleton-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.mp-skeleton--results .mp-skeleton-badges {
    display: flex;
    gap: 6px;
}

.mp-skeleton--results .mp-skeleton-badge {
    width: 32px;
    height: 20px;
    border-radius: 10px;
}

/* 日曆場次載入：上午／下午按鈕變成灰色色塊，日曆本身仍可切換月份 */
.my-calendar.is-loading .fc-view-harness {
    overflow: hidden;
}

.my-calendar.is-loading .fc-daygrid-day {
    background-color: transparent !important;
}

.my-calendar.is-loading .day-session-pill {
    background: #e9e7e5 !important;
    border-color: transparent !important;
    color: transparent !important;
    box-shadow: none !important;
    pointer-events: none;
}

.my-calendar.is-revealing .day-session-pills {
    animation: mp-fade-in 0.3s linear both;
}

@media (prefers-reduced-motion: reduce) {
    /* 光帶與淡入是裝飾，關閉；轉圈是「仍在處理」的唯一訊號，保留但放慢 */
    .mp-skeleton::after,
    .my-calendar.is-loading .fc-view-harness::after {
        animation: none;
        display: none;
    }

    .mp-spinner,
    .mp-spinner--done,
    .mp-spinner--done .mp-spinner-svg,
    .mp-skeleton,
    .mp-reveal,
    .map-loading,
    .filter-results-map-status,
    .my-calendar.is-revealing .day-session-pills {
        animation: none;
    }

    .mp-spinner:not(.mp-spinner--done) .mp-spinner-svg {
        animation-duration: 1.6s;
    }
}
