/**
 * 插件模块 - 前台公共样式
 *
 * @package DSAP
 * @subpackage Plugins
 */

/* ============================================================
   全局重置
   ============================================================ */
.dsap-plugin-frontend {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    box-sizing: border-box;
}

.dsap-plugin-frontend *,
.dsap-plugin-frontend *::before,
.dsap-plugin-frontend *::after {
    box-sizing: border-box;
}

/* ============================================================
   工具类
   ============================================================ */
.dsap-plugin-text-center {
    text-align: center;
}

.dsap-plugin-text-muted {
    color: #8896a8;
}

.dsap-plugin-mt-10 {
    margin-top: 10px;
}

.dsap-plugin-mb-10 {
    margin-bottom: 10px;
}

.dsap-plugin-mt-20 {
    margin-top: 20px;
}

.dsap-plugin-mb-20 {
    margin-bottom: 20px;
}

.dsap-plugin-flex {
    display: flex;
}

.dsap-plugin-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsap-plugin-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dsap-plugin-flex-wrap {
    flex-wrap: wrap;
}

.dsap-plugin-gap-10 {
    gap: 10px;
}

.dsap-plugin-gap-20 {
    gap: 20px;
}

/* ============================================================
   加载动画
   ============================================================ */
.dsap-plugin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #8896a8;
}

.dsap-plugin-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #eef2f6;
    border-top-color: #7C9A92;
    border-radius: 50%;
    animation: dsap-plugin-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes dsap-plugin-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   错误状态
   ============================================================ */
.dsap-plugin-error {
    padding: 20px;
    background: #fdf0ed;
    border: 1px solid #f5d6d0;
    border-radius: 12px;
    color: #b13a2e;
    text-align: center;
}

.dsap-plugin-error .dsap-plugin-error-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.dsap-plugin-error .dsap-plugin-error-text {
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================================
   数据更新状态
   ============================================================ */
.dsap-plugin-updated {
    font-size: 11px;
    color: #8896a8;
    text-align: center;
    padding: 4px 0 8px 0;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 16px;
}

.dsap-plugin-updated .dsap-plugin-updated-icon {
    margin-right: 4px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
    .dsap-plugin-flex-between {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .dsap-plugin-flex-wrap {
        flex-direction: column;
        align-items: stretch;
    }
}