/* ============================================================
 * 意见箱浮动按钮 (Feedback FAB)
 * 文件：common/css/feedback_fab.css
 * 创建：2026-08-13 · 提意见/留言入口
 *
 * 设计目标：
 *   - 显眼但不抢戏（右下角，半透明渐变，呼吸动画）
 *   - 移动端友好：尺寸自适应，触摸区域 ≥ 44px
 *   - 不影响页面布局：fixed 定位 + z-index 合理
 *   - 暗色主题下也能看清
 * ============================================================ */

.fab-feedback {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9990;  /* 比 sidebar 通知 popup(9999) 低，避免遮挡；比页面内容高 */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35), 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.fab-feedback:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.45), 0 4px 10px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #f472b6 0%, #a78bfa 100%);
    color: #fff;
    text-decoration: none;
}
.fab-feedback:active {
    transform: translateY(0) scale(0.98);
}
.fab-feedback:focus-visible {
    outline: 3px solid #fde68a;
    outline-offset: 2px;
}
.fab-feedback__icon {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
    animation: fab-feedback-breath 2.4s ease-in-out infinite;
}
@keyframes fab-feedback-breath {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50%      { transform: rotate(-8deg) scale(1.08); }
}
.fab-feedback__label {
    white-space: nowrap;
}

/* 移动端：收窄为圆形按钮，只显示 icon */
@media (max-width: 640px) {
    .fab-feedback {
        right: 16px;
        bottom: 16px;
        padding: 14px;
        width: 56px;
        height: 56px;
        justify-content: center;
        gap: 0;
        font-size: 22px;
    }
    .fab-feedback__label {
        display: none;
    }
    .fab-feedback__icon {
        font-size: 24px;
    }
}

/* 在 leave_message.php / messages.php 页面自身不显示（避免和页面按钮重复） */
body.page-leave-message .fab-feedback,
body.page-messages .fab-feedback {
    display: none !important;
}

/* 极小屏幕再缩小一点点 */
@media (max-width: 380px) {
    .fab-feedback {
        right: 12px;
        bottom: 12px;
        width: 50px;
        height: 50px;
    }
    .fab-feedback__icon {
        font-size: 22px;
    }
}
