343 lines
8.9 KiB
CSS
343 lines
8.9 KiB
CSS
/* ============================================================
|
||
* 徽章弹窗(zibll medal 1:1 风格)
|
||
* ------------------------------------------------------------
|
||
* 共享于用户中心与公开主页的服务端 HTML 徽章弹窗。
|
||
* ============================================================ */
|
||
|
||
/* ---------- 顶部资料卡入口(zibll user-medal-info parity) ---------- */
|
||
.aksrt-medal-entry,
|
||
.uc-header__meta-item {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
min-width: 0;
|
||
margin: 2px 8px 2px 0;
|
||
padding: .3em .6em;
|
||
border: 1px solid var(--color-line-soft, var(--main-border-color, rgba(136, 136, 136, .18)));
|
||
border-radius: var(--mini-radius, 4px);
|
||
background: var(--surface-2, rgba(136, 136, 136, .1));
|
||
box-shadow: var(--shadow-xs, 0 1px 3px rgba(0, 0, 0, .08));
|
||
color: var(--muted-2-color, var(--color-ink-3));
|
||
font: inherit;
|
||
font-size: 12px;
|
||
line-height: 1.44;
|
||
white-space: nowrap;
|
||
}
|
||
.aksrt-medal-entry {
|
||
cursor: pointer;
|
||
transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
|
||
}
|
||
.aksrt-medal-entry:hover,
|
||
.aksrt-medal-entry:focus-visible {
|
||
border-color: var(--focus-color-opacity3, var(--focus-color));
|
||
background: var(--focus-color-opacity1, rgba(59, 130, 246, .1));
|
||
box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, .1));
|
||
color: var(--focus-color);
|
||
opacity: 1;
|
||
}
|
||
.aksrt-medal-entry:focus-visible {
|
||
outline: 2px solid var(--focus-color);
|
||
outline-offset: 2px;
|
||
}
|
||
.aksrt-medal-entry__icons {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
flex: none;
|
||
min-width: 0;
|
||
}
|
||
.aksrt-medal-entry__icon {
|
||
width: auto;
|
||
height: 1.45em;
|
||
max-width: 2.2em;
|
||
margin: 0 1px;
|
||
object-fit: contain;
|
||
vertical-align: middle;
|
||
}
|
||
.aksrt-medal-entry__icon + .aksrt-medal-entry__icon { margin-left: -1px; }
|
||
.aksrt-medal-entry__fallback {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 1.6em;
|
||
height: 1.6em;
|
||
color: var(--focus-color);
|
||
background: var(--focus-color-opacity1);
|
||
border-radius: 50%;
|
||
}
|
||
.aksrt-medal-entry__count { margin-left: 2px; }
|
||
.aksrt-medal-entry__arrow { margin-left: 1px; font-size: .9em; }
|
||
|
||
@media (max-width: 767px) {
|
||
.aksrt-medal-entry,
|
||
.uc-header__meta-item {
|
||
margin-right: 4px;
|
||
max-width: 100%;
|
||
}
|
||
}
|
||
|
||
|
||
.medal-cat-box {
|
||
position: relative;
|
||
text-align: center;
|
||
padding: 8px 8px 4px;
|
||
margin-bottom: 16px;
|
||
background: var(--muted-border-color, rgba(136, 136, 136, 0.06));
|
||
border-radius: var(--main-radius, 8px);
|
||
}
|
||
.medal-cat-box:last-child { margin-bottom: 0; }
|
||
|
||
.medal-cat-head { margin-bottom: 6px; }
|
||
|
||
.medal-cat-name {
|
||
display: inline-block;
|
||
margin-top: -8px;
|
||
padding: 6px 22px;
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: var(--focus-color);
|
||
background: var(--focus-color-opacity1);
|
||
border-radius: 0 0 1000px 1000px;
|
||
}
|
||
|
||
/* ---------- 卡片网格(zibll .medal-list-box / .medal-list) ---------- */
|
||
.medal-list-box {
|
||
display: grid;
|
||
grid-template-columns: repeat(5, 1fr);
|
||
gap: 8px 4px;
|
||
}
|
||
|
||
.medal-list-box--grant { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||
.medal-grant-item { min-width: 0; }
|
||
.medal-grant-item .medal-card { height: 100%; }
|
||
.medal-grant-item > .but { display: block; width: 100%; }
|
||
|
||
.medal-list {
|
||
display: block;
|
||
width: auto !important;
|
||
margin: 0 !important;
|
||
min-width: 0;
|
||
padding: 0;
|
||
border: 0;
|
||
background: none;
|
||
font: inherit;
|
||
color: inherit;
|
||
cursor: pointer;
|
||
-webkit-appearance: none;
|
||
appearance: none;
|
||
}
|
||
|
||
.medal-card {
|
||
position: relative;
|
||
text-align: center;
|
||
padding: 8px 4px 6px;
|
||
border-radius: var(--mini-radius, 6px);
|
||
transition: transform 0.15s ease, background-color 0.15s ease;
|
||
}
|
||
.medal-list:hover .medal-card,
|
||
.medal-list:focus-visible .medal-card {
|
||
transform: translateY(-2px);
|
||
background: var(--focus-color-opacity1);
|
||
}
|
||
.medal-list:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; border-radius: var(--mini-radius, 6px); }
|
||
|
||
.medal-card .medal-icon {
|
||
width: auto;
|
||
height: 70px;
|
||
max-width: 100%;
|
||
object-fit: contain;
|
||
}
|
||
.medal-card .medal-icon--fa {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 56px;
|
||
height: 70px;
|
||
font-size: 34px;
|
||
color: var(--focus-color);
|
||
}
|
||
|
||
/* 未获得:灰度 + 透明(zibll .no-has) */
|
||
.medal-card.no-has {
|
||
-webkit-filter: grayscale(100%);
|
||
filter: grayscale(100%);
|
||
opacity: 0.6;
|
||
}
|
||
|
||
.medal-card__name {
|
||
margin-top: 6px;
|
||
font-size: 12px;
|
||
line-height: 1.4;
|
||
color: var(--muted-color, var(--color-ink-3));
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
.medal-card.is-has .medal-card__name { color: var(--key-color, var(--color-ink)); }
|
||
|
||
.medal-card__wear {
|
||
margin-top: 2px;
|
||
font-size: 11px;
|
||
line-height: 1.3;
|
||
color: var(--focus-color);
|
||
}
|
||
|
||
/* ---------- 单徽章详情卡(zibll .medal-single-card) ---------- */
|
||
.medal-single-card {
|
||
position: relative;
|
||
overflow: hidden;
|
||
text-align: center;
|
||
padding: 22px 14px 18px;
|
||
margin-bottom: 14px;
|
||
background: var(--muted-border-color, rgba(136, 136, 136, 0.06));
|
||
border-radius: var(--main-radius, 8px);
|
||
}
|
||
.medal-single-bg {
|
||
position: absolute;
|
||
top: 43px;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: auto;
|
||
z-index: 0;
|
||
max-width: 305px;
|
||
height: auto;
|
||
margin: 0 auto;
|
||
opacity: 0.5;
|
||
pointer-events: none;
|
||
}
|
||
.medal-single-bg img {
|
||
width: 100%;
|
||
height: auto;
|
||
object-fit: contain;
|
||
}
|
||
.medal-single-main { position: relative; }
|
||
|
||
.medal-single-card .medal-icon {
|
||
width: auto;
|
||
height: 120px;
|
||
max-width: 200px;
|
||
object-fit: contain;
|
||
}
|
||
.medal-single-card .medal-icon--fa {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
height: 120px;
|
||
font-size: 72px;
|
||
color: var(--focus-color);
|
||
}
|
||
|
||
.medal-single-name {
|
||
margin-top: 12px;
|
||
font-size: 16px;
|
||
font-weight: 700;
|
||
}
|
||
.medal-single-desc {
|
||
margin-top: 8px;
|
||
font-size: 12px;
|
||
line-height: 1.6;
|
||
}
|
||
.medal-single-state {
|
||
margin-top: 10px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
/* ---------- 弹窗骨架(远程弹窗 .medal-modal) ---------- */
|
||
.aksrt-modal-runtime.aksrt-badge-modal:not(.aksrt-modal-runtime--bottom) .aksrt-modal-runtime__dialog {
|
||
width: min(620px, calc(100vw - 32px));
|
||
}
|
||
.aksrt-modal-runtime.aksrt-badge-modal--single:not(.aksrt-modal-runtime--bottom) .aksrt-modal-runtime__dialog {
|
||
width: min(400px, calc(100vw - 32px));
|
||
}
|
||
.aksrt-modal-runtime.aksrt-badge-modal--grant:not(.aksrt-modal-runtime--bottom) .aksrt-modal-runtime__dialog {
|
||
width: min(520px, calc(100vw - 32px));
|
||
}
|
||
|
||
.medal-modal { position: relative; padding: 6px 4px 12px; }
|
||
.medal-modal__empty {
|
||
padding: 24px 0;
|
||
text-align: center;
|
||
color: var(--muted-2-color, var(--color-ink-4));
|
||
}
|
||
|
||
.medal-modal__head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
margin-bottom: 12px;
|
||
padding-right: 28px;
|
||
}
|
||
.medal-modal__avatar {
|
||
width: 42px;
|
||
height: 42px;
|
||
border-radius: 50%;
|
||
object-fit: cover;
|
||
box-shadow: 0 0 0 2px var(--focus-color-opacity1);
|
||
}
|
||
.medal-modal__title {
|
||
display: flex;
|
||
align-items: center;
|
||
flex-wrap: wrap;
|
||
min-width: 0;
|
||
font-size: 15px;
|
||
font-weight: 700;
|
||
}
|
||
.medal-modal__title .medal-icon {
|
||
width: auto;
|
||
height: 1.6em;
|
||
margin-left: 4px;
|
||
object-fit: contain;
|
||
}
|
||
|
||
.medal-modal__scroll {
|
||
max-height: 50vh;
|
||
max-height: 50dvh;
|
||
overflow-y: auto;
|
||
padding: 2px;
|
||
}
|
||
|
||
/* 底部操作区(zibll .modal-buts.but-average 语义) */
|
||
.medal-modal__buts {
|
||
display: flex;
|
||
margin: 12px -4px -12px;
|
||
border-top: 1px solid var(--main-border-color, var(--color-line));
|
||
}
|
||
.medal-modal__buts > .but {
|
||
flex: 1;
|
||
padding: 0.7em;
|
||
background: transparent;
|
||
border-radius: 0;
|
||
}
|
||
.medal-modal__buts > .but + .but { border-left: 1px solid var(--main-border-color, var(--color-line)); }
|
||
.medal-modal__buts > .but:hover { background: var(--focus-color-opacity05); opacity: 1; }
|
||
|
||
/* 单卡弹窗 */
|
||
.medal-modal--single { padding: 10px 8px 14px; text-align: center; }
|
||
.medal-modal__actions { margin-top: 4px; }
|
||
.medal-modal__actions .but.btn-block,
|
||
.medal-modal__actions .badg.btn-block { display: block; width: 100%; }
|
||
.medal-modal__back {
|
||
display: inline-block;
|
||
margin-top: 12px;
|
||
text-decoration: none;
|
||
}
|
||
.medal-modal__back:hover { color: var(--focus-color); }
|
||
|
||
/* ---------- 细滚动条(zibll .mini-scrollbar) ---------- */
|
||
.mini-scrollbar { scrollbar-width: thin; scrollbar-color: var(--muted-border-color, rgba(136, 136, 136, 0.3)) transparent; }
|
||
.mini-scrollbar::-webkit-scrollbar { width: 5px; height: 5px; }
|
||
.mini-scrollbar::-webkit-scrollbar-thumb { background: var(--muted-border-color, rgba(136, 136, 136, 0.3)); border-radius: 10px; }
|
||
.mini-scrollbar::-webkit-scrollbar-track { background: transparent; }
|
||
|
||
/* ---------- 响应式(zibll: 桌面 5 列 / 移动 4 列) ---------- */
|
||
@media (max-width: 768px) {
|
||
.medal-list-box { grid-template-columns: repeat(4, 1fr); }
|
||
.medal-list-box--grant { grid-template-columns: 1fr; }
|
||
.medal-card .medal-icon { height: 55px; }
|
||
.medal-card .medal-icon--fa { width: 44px; height: 55px; font-size: 26px; }
|
||
.medal-single-card .medal-icon { height: 96px; }
|
||
}
|
||
|
||
@media (max-width: 400px) {
|
||
.medal-list-box { grid-template-columns: repeat(3, 1fr); }
|
||
}
|