/*
 * The styling of three cells of the gallery lists — «عکاسان», «موقعیت» and
 * «لینک ویو» (تسک ۰۴، بند ۶).
 *
 * Each of these used to carry its own <style> block inside the cell's view,
 * so a page of a hundred galleries sent the same three blocks a hundred times
 * over: three hundred stylesheets, about half a megabyte, for the browser to
 * read and the page to morph on every search, filter and sort. They are the
 * same rules, word for word, once. The file is linked at the end of the page,
 * which is where those blocks stood, so they win against exactly what they
 * won against before.
 */

/* ── from filament/galleries/photographer-avatars.blade.php ── */

.fi-gallery-photographers {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* گالری-۰۲: the whole width of the cell, so the faces sit in the middle
       of the column and not at its start. Filament lays the cell out as a
       flex row, which makes this box a flex item and shrinks it to the
       portraits inside it — `justify-content` then has nothing to centre
       within, and a column whose heading is wider than its portraits (which
       is every column with a heading) drew them against the edge. */
    width: 100%;
    gap: 0.25rem;
    min-height: 2rem;
}

.fi-gallery-photographer {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    flex-shrink: 0;
}

.fi-gallery-photographer-avatar {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid var(--std-color-color-white);
    background-color: var(--std-color-gray-100);
}

/* «کل | عدم نمایش» under the portrait, on one line — small enough that a
   face and its figures together are still the height of a table row. */
.fi-gallery-photographer-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.1875rem;
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 600;
}

/* بند ۴: the total in white on the dark page the panel is read on (and the
   standard cell text on the light one, where white would not be seen). */
.fi-gallery-photographer-galleries {
    color: var(--std-color-gray-950);
}

.fi-gallery-photographer-stats-divider {
    color: var(--std-color-gray-400);
    font-weight: 400;
}

/* بند ۵: the galleries the site does not show, in the panel's red. */
.fi-gallery-photographer-hidden-galleries {
    color: var(--std-color-danger-600);
}

.dark .fi-gallery-photographer-avatar {
    border-color: var(--std-color-gray-900);
    background-color: var(--std-color-gray-800);
}

.dark .fi-gallery-photographer-galleries {
    color: var(--std-color-color-white);
}

.dark .fi-gallery-photographer-stats-divider {
    color: var(--std-color-gray-500);
}

.dark .fi-gallery-photographer-hidden-galleries {
    color: var(--std-color-danger-400);
}

.fi-gallery-photographers-empty {
    font-size: 0.875rem;
    color: var(--std-color-gray-400);
}

/* ── from filament/galleries/location-state.blade.php ── */

.fi-gallery-location {
    display: flex;
    align-items: center;
    justify-content: center;
    /* The cell is a flex row, so a box left to its own width hugs the edge
       of the column however much centring the stylesheet asks for. */
    width: 100%;
}

.fi-gallery-location-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    flex: 0 0 auto;
    cursor: help;
}

.fi-gallery-location-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.fi-gallery-location-missing {
    background-color: var(--std-color-mix-danger-400-10);
    color: var(--std-color-danger-600);
}

.dark .fi-gallery-location-missing {
    color: var(--std-color-danger-300);
}

.fi-gallery-location-placed {
    color: var(--std-color-gray-400);
}

/* ── from filament/galleries/view-link.blade.php ── */

.fi-gallery-view-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    /* فتوامان-۰۲ و گالری-۰۳: the whole width of the cell, for the same
       reason the photographers' faces need it — Filament's cell is a flex
       row, so a box left to its own width is pushed to the start of the
       column and only looks centred while the column happens to be exactly
       as wide as the icon. */
    width: 100%;
}

.fi-gallery-view-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    /* مشترک-ظاهر-۰۱: the icon keeps its size whatever else lands in the
       box. A flex item is shrinkable by default, so anything else sharing
       the row with it — as Filament's own cell link once did — squeezed the
       icon narrower than its own circle and left it flattened against the
       edge of the column. */
    flex: 0 0 auto;
}

.fi-gallery-view-link-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.fi-gallery-view-link-live {
    background-color: var(--std-color-mix-success-400-10);
    color: var(--std-color-success-600);
}

.dark .fi-gallery-view-link-live {
    color: var(--std-color-success-300);
}

.fi-gallery-view-link-dead {
    background-color: var(--std-color-mix-danger-400-10);
    color: var(--std-color-danger-600);
    cursor: not-allowed;
}

.dark .fi-gallery-view-link-dead {
    color: var(--std-color-danger-300);
}

.fi-gallery-view-link-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--std-color-warning-500);
    cursor: help;
}

.fi-gallery-view-link-warning svg {
    width: 1.125rem;
    height: 1.125rem;
}
