.ad-mask-wrap {
    position: relative;
    overflow: hidden;
}

.uninf-ad-mask {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 86px;
    padding: 0;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.94);
    border: 1px dashed #0b95cf;
}

.youfu_family .uninf-ad-mask {
    top: 34px;
}

.uninf-ad-content {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
    font-size: 14px;
    line-height: 22px;
    background: #fff;
    overflow: hidden;
}

.uninf-ad-content strong {
    display: block;
    color: #0b95cf;
    font-size: 16px;
}

.uninf-ad-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.uninf-ad-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 4px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.94);
}

.uninf-ad-panel > a:only-child {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.uninf-ad-demo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #333;
    text-decoration: none;
}

.uninf-ad-demo-link .uninf-ad-demo-logo {
    max-width: 64px;
    max-height: 48px;
}

.uninf-ad-demo-link span {
    text-align: center;
}

.uninf-ad-demo-card {
    position: relative;
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    container-type: size;
    background: #fff;
    border: 1px solid #e5e9ef;
}

.uninf-ad-demo-card::before {
    content: "";
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: stretch;
    min-height: 0;
    background: url("/Content/v2/images/logo.png") center / 82% auto no-repeat,
        linear-gradient(135deg, #e4f4fc, #f2f6f9);
}

.uninf-ad-demo-card.has-media::before {
    display: none;
}

.uninf-ad-demo-art {
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    background: linear-gradient(135deg, #e4f4fc, #f2f6f9);
}

.uninf-ad-demo-art img {
    max-width: 86%;
    max-height: 86%;
    object-fit: contain;
}

.uninf-ad-demo-card.media-top,
.uninf-ad-demo-card.media-bottom {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 3fr) minmax(0, 2fr);
}

.uninf-ad-demo-card.media-top::before,
.uninf-ad-demo-card.media-bottom::before,
.uninf-ad-demo-card.media-top .uninf-ad-demo-art,
.uninf-ad-demo-card.media-bottom .uninf-ad-demo-art {
    grid-column: 1;
    grid-row: 1;
}

.uninf-ad-demo-card.media-top .uninf-ad-demo-art img,
.uninf-ad-demo-card.media-bottom .uninf-ad-demo-art img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

.uninf-ad-demo-card.media-top .uninf-ad-demo-copy,
.uninf-ad-demo-card.media-bottom .uninf-ad-demo-copy {
    grid-column: 1;
    grid-row: 2;
    padding: 8px 10px;
}

.uninf-ad-demo-card.media-bottom {
    grid-template-rows: minmax(0, 2fr) minmax(0, 3fr);
}

.uninf-ad-demo-card.media-bottom::before,
.uninf-ad-demo-card.media-bottom .uninf-ad-demo-art {
    grid-row: 2;
}

.uninf-ad-demo-card.media-bottom .uninf-ad-demo-copy {
    grid-row: 1;
}

.uninf-ad-demo-copy {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 8px 28px 8px 10px;
}

.uninf-ad-demo-card .uninf-ad-demo-copy strong,
.uninf-ad-demo-card .uninf-ad-demo-copy span {
    padding: 0;
}

.uninf-ad-demo-card .uninf-ad-demo-copy span {
    margin-top: 4px;
}

.uninf-ad-demo-copy em {
    align-self: flex-start;
    margin-top: 8px;
    padding: 0 6px;
    color: #e94242;
    font-size: 12px;
    font-style: normal;
    line-height: 18px;
    border: 1px solid #e94242;
    border-radius: 12px;
}

@container (max-height: 130px) {
    .uninf-ad-demo-copy em {
        display: none;
    }
}

@container (max-height: 90px) {
    .uninf-ad-demo-copy span,
    .uninf-ad-demo-card > span {
        display: none;
    }
}

.uninf-ad-demo-card strong {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    display: -webkit-box;
    overflow: hidden;
    padding: 8px 28px 0 10px;
    color: #30343b;
    font-size: 16px;
    line-height: 1.35;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.uninf-ad-demo-card span {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    display: -webkit-box;
    overflow: hidden;
    padding: 4px 10px 8px;
    color: #58616d;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.uninf-ad-demo-card::after {
    content: "广告";
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0 3px;
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    background: rgba(0, 0, 0, 0.55);
}

.uninf-ad-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    width: 22px;
    height: 22px;
    padding: 0;
    color: #666;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    background: #eee;
    border: 1px solid #ddd;
}

.uninf-ad-close:hover {
    background: #ddd;
}
