/* --- 订单状态页 - 自定义动画样式 --- */

/* 1. 状态图标柔和呼吸动画 */
@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-pulse-subtle { 
    animation: pulse-subtle 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; 
}

/* 2. 商家改单/调价时的卡片高亮提醒动画 */
.highlight-change {
    animation: highlight-flash 1.8s ease-in-out;
}

@keyframes highlight-flash {
    0% { background-color: rgba(254, 240, 138, 0.8); }
    50% { background-color: rgba(254, 240, 138, 0.4); }
    100% { background-color: transparent; }
}

/* 3. 打印模式隐藏不需要的元素 */
@media print {
    header, #action-buttons, #order-modified-banner { 
        display: none !important; 
    }
    body { 
        background: #fff !important; 
        padding-bottom: 0 !important; 
    }
}

/* 4. 確保左下角聊天浮動按鈕永遠在最上層且可點擊 */
#global-chat-float-btn {
    z-index: 9999 !important;
    position: fixed !important;
    /* 必須將 bottom 和 right 設為 auto，才不會綁死上下位置 */
    bottom: auto !important;
    right: auto !important;
    /* 初始預設位置（隨後會由 JS 的拖拽接管） */
    top: 100px !important;
    left: 20px !important;
}

/* 手機版小螢幕適度微調底部安全距離 */
@media (max-width: 768px) {
    main {
        padding-bottom: 5rem !important;
    }
}

/* --- 📱 行動端 Fixed Dock 懸浮欄安全區優化 --- */
html, body {
    min-height: 100dvh;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    /* 自動適應手機底部工具列與黑條安全距離 */
    .fixed.bottom-0 {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }
}