/* ============================================================
   全局 Loading 反馈组件
   - .btn:disabled         按钮变灰、文字弱化
   - .loading-inline       文字 + spinner 区域占位
   - .loading-overlay      全屏/局部遮罩,带 spinner
   - .spinner              旋转圆环
   调色板沿用 settings.css 的深蓝主色 (#2b5797 / #1e3f6f)。
   ============================================================ */

/* ========== 按钮 busy 态 ========== */
.btn:disabled,
button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary:disabled,
.auth-btn:disabled,
.modal-actions .btn-primary:disabled {
    background: linear-gradient(145deg, #b8c4d6, #93a3bb) !important;
    color: #f5f5f5 !important;
}

/* ========== Spinner 旋转圆环 ========== */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinner-rotate 0.7s linear infinite;
    vertical-align: -2px;
    margin-right: 6px;
}

.spinner.dark {
    border-color: rgba(43, 87, 151, 0.25);
    border-top-color: #2b5797;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

/* ========== 区域 inline 占位 ========== */
.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6c7a89;
    font-size: 0.85rem;
    padding: 4px 0;
}

.loading-inline .spinner {
    width: 12px;
    height: 12px;
}

/* ========== 卡片式 loading 占位(用于信息卡 / 公开列表刷新) ========== */
.loading-card {
    background: #f6f9fd;
    border: 1px dashed #c8d6e6;
    border-radius: 8px;
    padding: 14px 16px;
    color: #6c7a89;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== 全屏/局部遮罩(用于创建房间等待) ========== */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 50;
    border-radius: inherit;
    color: #2b5797;
    font-size: 0.95rem;
    font-weight: 500;
}

.loading-overlay.show {
    display: flex;
}

.loading-overlay .spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
    border-color: rgba(43, 87, 151, 0.2);
    border-top-color: #2b5797;
}

/* 用于遮罩覆盖 modal 内容 */
.modal-body {
    position: relative;
}