/* Border and the hand-drawn corners come from the theme's `.card`; the
   overflow clips image and content to those corners. The text takes the
   theme's ink: it used to be painted white for a dark card that is long gone,
   and stood white on white in light mode (#742). */
.building-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.building-card__image {
    width: 100%;
}

.building-card__image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* No still yet and no painted fallback (the medical practice) — hold the space
   with a flat panel instead of a broken-image icon until the render lands. */
.building-card__image img:not([src]) {
    background: rgba(var(--app-white-rgb), 0.06);
}

.building-card__content {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .building-card {
        flex-direction: row-reverse;
    }

    .building-card__image {
        width: 40%;
        flex-shrink: 0;
    }

    .building-card__image img {
        height: 100%;
    }

    .building-card__content {
        flex: 1;
    }
}

.building-card__title {
    color: var(--bs-emphasis-color);
}

.building-card__desc {
    color: var(--bs-secondary-color);
    font-size: 0.9em;
}

.building-card__construction {
    background: rgba(var(--bs-warning-rgb), 0.2);
    border: 1px solid rgba(var(--bs-warning-rgb), 0.5);
    border-radius: 6px;
    color: var(--bs-warning-text-emphasis);
}

.building-card__upgrade {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
}

.building-card__upgrade-title {
    color: var(--bs-emphasis-color);
    margin-bottom: 0.4rem;
}

.building-card__upgrade-cost {
    color: var(--bs-emphasis-color);
}

.building-card__upgrade-time {
    color: var(--bs-secondary-color);
    font-size: 0.85em;
}

.building-card__max-level {
    color: var(--bs-success-text-emphasis);
}

.building-card__confirm-img {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
}
