/* ============================================================
   AI-panda: рекламный блок
   ============================================================ */
.aipanda-ad-unit {
    position: relative;
    background: var(--color-bg-primary, #fff);
    border: 1px dashed var(--color-border, #e5e7eb);
    border-radius: var(--radius-lg, 16px);
    padding: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 180px;
    box-sizing: border-box;
}

.aipanda-ad-unit__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted, #6B7280);
    font-weight: 600;
    opacity: 0.7;
    user-select: none;
}

.aipanda-ad-unit__inner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.aipanda-ad-unit__inner img,
.aipanda-ad-unit__img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm, 8px);
}

.aipanda-ad-unit__link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}
.aipanda-ad-unit__link:hover {
    opacity: 0.9;
}

.aipanda-ad-unit__inner > * {
    max-width: 100%;
}

/* В режиме списка — растягиваем на всю ширину */
#ai-cards-container.view-list .aipanda-ad-unit,
#prompt-cards-container.view-list .aipanda-ad-unit {
    flex: 1 1 100%;
    width: 100%;
    min-height: 120px;
}

@media (max-width: 768px) {
    .aipanda-ad-unit {
        padding: 12px;
        min-height: 140px;
    }
    .aipanda-ad-unit__label {
        font-size: 9px;
    }
}