/* ===== 车牌显示组件 - 共享样式 ===== */

/* 外层包装（带底色） */
.plate-display {
    text-align: center;
    margin: 0;
    padding: 3px;
    border-radius: 10px;
    background: var(--color-surface-muted, #fefefe);
    transition: background .3s;
}

.plate-display.pd-blue {
    background: #1f4daf;
    border: 0.5px solid #000;
}

.plate-display.pd-yellow {
    background: #FFBE00;
    border: 0.5px solid #000;
}

.plate-display.pd-black {
    background: #000;
}

.plate-display.pd-white {
    background: #fff;
    border: 0.5px solid #000;
}

.plate-display.pd-green {
    background: #37a53f;
}

.plate-display.pd-sm-green {
    background: linear-gradient(180deg, #e3ffeb 25%, #53e753 75%);
}

.plate-display.pd-gradgreen {
    background: linear-gradient(270deg, #14e25c 72.5%, #FFBE00 27.5%);
}

.plate-display.pd-default {
    background: #ffffff;
    border: 0.5px solid #1a1a1a;
}

/* 车牌徽章主体 */
.plate-badge {
    border-radius: 10px;
    color: #fff;
    white-space: nowrap;
    aspect-ratio: 440 / 140;
    padding: 0 3%;
    width: 100%;
    max-width: 380px;
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    gap: 0;
    border: 2px solid rgba(255, 255, 255, .3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .15),
        inset 0 -1px 0 rgba(0, 0, 0, .1),
        0 2px 8px rgba(0, 0, 0, .15);
    overflow: hidden;
}

/* 精灵图字符 */
.plate-char {
    display: inline-block;
    height: 66%;
    margin: 0 3px;
    aspect-ratio: 1 / 1.87;
    background-repeat: no-repeat;
    background-size: 1000% 800%;
    flex-shrink: 0;
}

/* 文字回退（无精灵图时） */
.plate-text-fallback {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 40px;
    font-weight: 600;
    letter-spacing: 4;
}

/* 文字字符（精灵图未命中时） */
.plate-char-text {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    font-weight: 700;
    font-size: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 62%;
    aspect-ratio: 1 / 1.87;
    flex-shrink: 0;
    line-height: 1;
}

/* 铆钉装饰 */
.plate-rivet {
    position: absolute;
    height: 10px;
    border-radius: 50rem;
    border: 0.5px solid #505050;
    background: #fff;
    z-index: 1;
}

.plate-rivet:nth-child(1) {
    top: 3px;
    left: 25%;
    width: 10px;
}

.plate-rivet:nth-child(2) {
    top: 3px;
    right: 25%;
    width: 10px;
}

.plate-rivet:nth-child(3) {
    bottom: 3px;
    left: calc(25% - 7px);
    width: 24px;
}

.plate-rivet:nth-child(4) {
    bottom: 3px;
    right: calc(25% - 7px);
    width: 24px;
}

/* 空状态 */
.plate-badge.empty .plate-rivet {
    display: none;
}

.plate-badge.empty {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--color-text-muted, #6b7280);
    border-color: var(--color-border, #e5e7eb);
    background: var(--color-surface-muted, #fefefe);
    text-shadow: none;
    min-width: auto;
    aspect-ratio: unset;
    padding: 10px 24px;
    box-shadow: none;
}

.plate-badge.empty .plate-char {
    display: none;
}

/* ===== 各类型车牌样式 ===== */
.plate-badge.plate-blue {
    border-color: #ffffff;
    color: #fff;
}

.plate-badge.plate-yellow {
    border-color: #000000;
    color: #1a1a1a;
}

.plate-badge.plate-black {
    border-color: #ffffff;
    color: #fff;
}

.plate-badge.plate-white {
    border-color: #000000;
    color: #1a1a1a;
}

.plate-badge.plate-green {
    border-color: #ffffff;
    color: #fff;
}

.plate-badge.plate-sm-green {
    border-color: #000000;
    color: #060606;
    aspect-ratio: 480 / 140;
}

.plate-badge.plate-sm-green .plate-char,
.plate-badge.plate-gradgreen .plate-char {
    height: 62%;
}

.plate-badge.plate-gradgreen {
    border-color: #000000;
    color: #1a1a1a;
    aspect-ratio: 480 / 140;
}

.plate-badge.plate-default {
    border-color: #1a1a1a;
    color: #fff;
}

.plate-badge.plate-default .plate-char {
    height: 58%;
}

.plate-badge.plate-default .plate-dot {
    display: none;
}

/* 分隔圆点 */
.plate-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin: 0 3px;
    flex-shrink: 0;
    align-self: center;
}