/* ================================================================
   FriendsByChance — components/tile-view.css
   A list page's TILED VIEW (components/tile-view.js): the modes' bar at
   the right pane's top, the grid, a tile and the room round it.
   ================================================================ */

/* The modes' bar: the app's square buttons, one row, above the pane's
   history; a mode the room does not allow greyed (disabled). */
.fbc-tiles-bar {
    flex:            none;
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             4px;
    padding:         6px 10px;
    border-bottom:   1px solid var(--color-divider);
}

/* The grid: columns and rows set by the script for the mode and the room
   (the left pane's width, the dent); the tiles from its top-left. */
.fbc-tiles {
    flex:           1 1 auto;
    min-width:      0;
    overflow-y:     auto;
    overflow-x:     hidden;
    display:        grid;
    grid-auto-flow: row;
    align-content:  start;
    justify-content: start;
    background:     var(--color-bg);
    padding-bottom: 24px;
}
/* The rows of the first column the left pane's head covers. */
.fbc-tiles-dent { grid-column: 1; }
.fbc-tiles-empty {
    grid-column: 1 / -1;
    padding:     24px;
    color:       var(--color-text-muted);
}

/* A tile's room: its padding is the TILE BACKGROUND — shaded, for a group
   of My Journeys' tiles, from the script (its hue and level). */
.fbc-tile-cell {
    display:    flex;
    min-width:  0;
    min-height: 0;
    padding:    var(--fbc-tile-gap);
}
.fbc-tile {
    flex:          1;
    min-width:     0;
    overflow:      hidden;
    position:      relative;
    background:    var(--color-surface);
    border:        1px solid var(--color-divider);
    border-radius: 10px;
    padding:       10px 12px;
    box-shadow:    0 1px 3px rgba(0, 0, 0, 0.08);
}
/* What does not fit fades out at its foot, rather than being cut. */
.fbc-tile-body {
    height:   100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
            mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
}
/* Selected — every tile of that item, wherever it is shown: well visible. */
.fbc-tile.fbc-tile--selected {
    border-color: var(--color-primary);
    box-shadow:   0 0 0 3px var(--color-primary);
}

/* A host drawing its own room in its tiles (bleed: My Journeys' header,
   its picture and colour edge to edge). */
.fbc-tiles--bleed .fbc-tile { padding: 0; }
