/* =====================================================
   INRADR — Tenant overview ("Übersicht")
   inradr-design layer: own inradr-* classes and --inradr-* tokens only, no DevExpress selectors.

   Consumers: OverviewCardListRenderer.razor (appointment and note cards) and QuickAccessRenderer.razor (quick
   access buttons and the popup body). Ported from A inradr-features/inradr-tenant-view.css and
   inradr-embedded-crud-feature.css (CSS migration plan, tenant-overview backlog row; OpenSpec change
   add-tenant-overview): the Bootstrap .card markup became inradr-overview-card, the entity-type buttons keep A's
   active btn--secondary look (commit e1fc774), and A's !important state rules are gone — the DxButton states come
   from the adapter tokens in inradr-feature-button.css. Card texts, card frame and quick access follow the live
   inradr-app values (owner check 2026-10-01): body-size texts in the inherited text colour, a bold list title, no
   accent strip (A's card-accent had no height), the quick access title underlined like a group caption.

   The KPI tiles, the overview's form layout and the hiding of an empty quick access group are DevExpress adapters
   in inradr-feature/inradr-feature-overview.css.
   ===================================================== */

/* --- card list: appointments, notes --- */
.inradr-overview-list {
    box-sizing: border-box;
    border: 1px solid var(--inradr-color-border);
    border-radius: var(--inradr-radius-md);
    padding: var(--inradr-space-sm);
    background: var(--inradr-color-surface);
}

.inradr-overview-list__header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--inradr-space-xs);
    margin-bottom: var(--inradr-space-sm);
    padding-bottom: var(--inradr-space-2xs);
    border-bottom: 1px solid var(--inradr-color-border);
}

.inradr-overview-list__title {
    font-size: var(--inradr-text-body-bold-size);
    font-weight: var(--inradr-text-body-bold-weight);
    line-height: var(--inradr-text-body-line-height);
    color: inherit;
}

.inradr-overview-list__actions {
    display: flex;
    gap: var(--inradr-gap-btn-action);
    margin-left: auto;
}

.inradr-overview-list__items {
    display: flex;
    flex-direction: column;
    gap: var(--inradr-space-2xs);
}

.inradr-overview-list__empty {
    padding: var(--inradr-space-md) 0;
    text-align: center;
    font-size: var(--inradr-text-caption-size);
    color: var(--inradr-color-text-muted);
}

/* --- card --- */
.inradr-overview-card {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--inradr-color-border);
    border-radius: var(--inradr-radius-sm);
    background: var(--inradr-color-surface);
    transition: box-shadow 0.15s ease;

    &:hover {
        box-shadow: var(--inradr-elevation-2-shadow);
    }
}

.inradr-overview-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--inradr-space-xxs);
    min-width: 0; /* lets long text wrap instead of widening the card */
    padding: var(--inradr-space-xs) var(--inradr-space-2xs);
}

/* Title and buttons on one line, the investment below the title (A: order 2 and 3, padding 8px 0). */
.inradr-overview-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-block: var(--inradr-space-xs);
}

.inradr-overview-card__title {
    font-size: var(--inradr-text-body-size);
    font-weight: var(--inradr-text-body-weight);
    line-height: var(--inradr-text-body-line-height);
    color: inherit;
    overflow-wrap: anywhere; /* a long compound word wraps instead of being cut at the card edge */
}

.inradr-overview-card__actions {
    display: flex;
    flex-shrink: 0;
    order: 2;
    gap: var(--inradr-space-xxs);
    margin-left: var(--inradr-space-2xs);
}

.inradr-overview-card__title-suffix {
    order: 3;
    width: 100%;
    font-size: var(--inradr-text-body-size);
    line-height: 1.2; /* A's line box (16.8px) */
    color: inherit;
}

.inradr-overview-card__description {
    font-size: var(--inradr-text-body-size);
    line-height: var(--inradr-text-body-line-height);
    color: var(--inradr-color-text-body);
    overflow-wrap: anywhere;
}

/* Rendered on every card, empty without a period or reminder, so every card ends alike (A). */
.inradr-overview-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--inradr-space-xs);
    margin-top: var(--inradr-space-xxs);
}

.inradr-overview-card__period {
    font-size: var(--inradr-text-body-size);
    color: inherit;
}

.inradr-overview-card__reminder {
    margin-left: auto;
}

/* --- quick access --- */
.inradr-quick-access {
    display: flex;
    flex-direction: column;
    gap: var(--inradr-space-sm);
}

/* An H2 with the 80x4 accent underline, like the group captions around it (A: a layout group caption). */
.inradr-quick-access__title {
    position: relative;
    padding-bottom: var(--inradr-space-xs);
    font-family: var(--inradr-font-heading);
    font-size: var(--inradr-text-h2-size);
    font-weight: var(--inradr-text-h2-weight);
    line-height: var(--inradr-text-h2-line-height);
    color: var(--inradr-color-text-heading);

    &::after {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        bottom: 0;
        width: var(--inradr-section-underline-w);
        height: var(--inradr-section-underline-h);
        background-color: var(--inradr-color-accent);
        border-radius: var(--inradr-radius-xs);
    }
}

/* One equal column per button, as many as fit (A: minmax(160px, 1fr)). */
.inradr-quick-access__buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--inradr-space-2xs);
}

/* --- entity type button: a quick access button, icon and caption centred ---
   The height follows the caption: a caption that does not fit wraps to a second line instead of being cut, and the
   other buttons of the grid row stretch to the same height. */
.inradr-entity-type-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--inradr-space-xs);
    height: auto;
    min-height: calc(var(--inradr-height-control) + var(--inradr-space-xs));
}

/* The embedded XAF image as a mask, so the glyph takes the button's text colour; the URL comes inline. */
.inradr-entity-type-button__icon {
    flex: 0 0 auto;
    width: var(--inradr-space-sm);
    height: var(--inradr-space-sm);
    background-color: currentcolor;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

.inradr-entity-type-button__caption {
    min-width: 0;
    text-align: center;
    overflow-wrap: anywhere;
}

/* --- quick access popup body --- */
.inradr-crud-popup__body {
    display: flex;
    flex-direction: column;
    gap: var(--inradr-space-sm);
}

.inradr-crud-popup__placeholder {
    padding: var(--inradr-space-md) 0;
    text-align: center;
    font-size: var(--inradr-text-caption-size);
    font-style: italic;
    color: var(--inradr-color-text-secondary);
}
