﻿/* mail plane 样式 */
.mail-plane {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: #fff;
    /* 防止触摸穿透回滚 */
    -webkit-overflow-scrolling: touch;
}

/* 阻止 body 滚动（打开弹窗时添加 no-scroll） */
.no-scroll {
    overflow: hidden !important;
    touch-action: none !important;
    height: 100% !important;
}

/* header */
.mail-header {
    height: 54px;
    box-sizing: border-box;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: rgba(0,0,0,0.12);
    justify-content: center;
    color:var(--btn_color_q);
}

.mail-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--btn_color_q, #fff);
}

/* 统计栏 */
.mail-stats-bar {
    text-align: center;
    font-size: 14px;
    color: #ffd88a;
    margin: 6px 0;
}

/* loop item icon */
.mail-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    color: #ffd88a;
}

    .mail-icon.placeholder {
        visibility: hidden;
    }

/* 状态图标（右侧） */
.mail-status {
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.03);
    margin-left: 6px;
}

.mail-unclaimed {
    background: linear-gradient(90deg,#ffb84a,#ff7a7a);
    color: #1b0b00;
}

.mail-claimed {
    background: linear-gradient(90deg,#3b3b3b,#2b2b2b);
    color: #9aa;
}

/* 已读/未读区分（如果需要额外样式） */
.mail-read {
    opacity: 0.95;
}

.mail-unread {
}

/* footer 按钮 */
.mail-button {
    background: var(--btn_bg_s);
    color: var(--btn_color_q);
    border: 1px solid var(--btn_color_q);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

     .mail-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* 圆形关闭按钮（右下角） */
.mail-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg,#2b2b2b,#111);
    color: #fff;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 详情弹窗 */
.mail-detail-overlay {
    backdrop-filter: blur(2px);
}

.mail-detail-box {
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    max-height: 86vh;
    overflow: hidden;
}

    .mail-detail-box .mail-detail-content {
        color: #dcdcdc;
    }

/* 兼容 bag.renderItems 生成的容器紧凑显示 */
.bag-preview-container {
    gap: 6px;
    padding: 6px;
}

/* 小屏幕优化 */
@media (max-width: 720px) {
    .mail-detail-box {
        width: 96%;
        padding: 8px;
    }

    .mail-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: 20px;
    }
}
