/*
 * icon_card_listitem_widget — visual layer.
 *
 * The renderer (IconCardListitemWidgetRenderer.kt) emits this structure:
 *
 *   .icon-card-listitem-widget                ← root (outer wrapper)
 *     .icon-card-listitem-row                 ← horizontal flex: icon | body
 *       .icon-card-listitem-icon  > <i/>      ← left-side icon
 *       .icon-card-listitem-body              ← stacked title + subtitle + footer
 *         .icon-card-listitem-title           ← bold heading line
 *         .icon-card-listitem-subtitle        ← secondary line
 *         .icon-card-listitem-footer          ← tertiary metadata line
 *
 * Cousin of `card_listitem_widget` — same card chrome (white surface,
 * subtle border, hover lift) but a different content shape: the
 * thumbnail tile is replaced by a glyph icon, and the body has three
 * lines instead of two.
 */

.icon-card-listitem-widget {
    display: block;
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 1px 1px rgba(15, 23, 42, 0.06);
    transition:
        box-shadow 160ms ease,
        transform   160ms ease,
        border-color 160ms ease;
    box-sizing: border-box;
}

.icon-card-listitem-widget:hover {
    border-color: #cfd8e3;
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.08),
        0 2px 4px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

/* ── Inner row ─────────────────────────────────────────────────────────── */

.icon-card-listitem-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 60px;
}

/* ── Icon tile ─────────────────────────────────────────────────────────── */
/* Square tile with the glyph centered. Fixed width keeps multiple cards
   aligned in a column. The glyph itself inherits its size from the icon
   font's CSS — we just constrain the container. */

.icon-card-listitem-icon {
    /* `flex: 0 0 auto` lets the container size itself by its content
       (the glyph). `min-width` / `min-height` keep the default tile
       at 48×48 so a small or empty glyph still has a visible square,
       but the tile grows when authors set a larger `font-size` via a
       CSS class on this region.
       `overflow: visible` (default) is intentional — clipping is
       almost never what authors want when scaling up an icon, and
       the container grows anyway thanks to auto sizing. */
    flex: 0 0 auto;
    min-width: 48px;
    min-height: 48px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #1565c0;
    /* Small inner padding so the glyph never touches the rounded
       corners — looks cleaner at larger sizes. */
    padding: 4px;
    box-sizing: border-box;
}

.icon-card-listitem-icon > i,
.icon-card-listitem-icon > span {
    display: inline-block;
    line-height: 1;

    /* Make the glyph honour the CONTAINER's `font-size` instead of
       its own font's default (Material Icons ships with
       `.material-icons { font-size: 24px; … }`, LineIcons / FA also
       set their own size). Authors can then resize the icon by
       toggling a size CSS class on the `.icon-card-listitem-icon`
       region from the design panel — the size class sets `font-size`
       on the container and the glyph follows. */
    font-size: inherit;
    line-height: inherit;
}

/* ── Body (3-line stack) ──────────────────────────────────────────────── */

.icon-card-listitem-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

/* ── Title ─────────────────────────────────────────────────────────────── */

.icon-card-listitem-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Subtitle ──────────────────────────────────────────────────────────── */

.icon-card-listitem-subtitle {
    font-size: 13px;
    line-height: 1.4;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.icon-card-listitem-footer {
    font-size: 11px;
    line-height: 1.3;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
