/*
 * «آموزش عکاسی ورزشی» (تسک ۱۴۰۵/۰۸/۲۲ ۰۲): the name that links to the
 * photographer's card, the edit window's face-and-name head, and the
 * striped results of «افزودن عکاس از بانک عکاسان».
 */

/* بند ۴ — the name looks as it always did; hover shows it is a link. */
.edu-name {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a.edu-name:hover,
a.edu-name:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.edu-name.is-off {
    cursor: help;
}

.edu-priority-hint {
    display: inline-flex;
    width: 1.05rem;
    height: 1.05rem;
    margin-inline-start: 0.25rem;
    vertical-align: middle;
    opacity: 0.8;
    cursor: help;
}

.edu-priority-hint svg {
    width: 100%;
    height: 100%;
}

/* بند ۵ — the edit window: the portrait centred at the top, the name under it. */
.edu-edit-modal .fi-modal-header {
    justify-content: center;
    padding-block: 1.25rem 0.25rem;
    /* As much room on both sides, so the face is centred on the window, not beside the close button. */
    padding-inline: 3.5rem !important;
    position: relative;
}

/* The close button keeps its corner but takes no room from the face. */
.edu-edit-modal .fi-modal-close-btn {
    position: absolute !important;
    inset-block-start: 1rem;
    inset-inline-end: 1rem;
    margin: 0 !important;
}

.edu-edit-modal .fi-modal-header > div {
    flex: 1 1 auto;
    width: 100%;
}

.edu-edit-modal .fi-modal-heading {
    /* Filament keeps room beside a heading for the close button; the face is centred on the window instead. */
    margin-inline: 0 !important;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
}

.edu-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    text-align: center;
}

.edu-face__img {
    width: 72px;
    height: 72px;
    border-radius: 9999px;
    object-fit: cover;
    background: #ececec;
    box-shadow: 0 0 0 1px rgb(127 127 127 / 0.3);
}

/* The size and weight of the fields' own labels («توضیح اختصاصی در صفحه آموزش»). */
.edu-edit-modal .fi-modal-heading .edu-face__name {
    font-size: 0.875rem !important;
    line-height: 1.5rem !important;
    font-weight: 500 !important;
    color: inherit;
}

.edu-edit-modal .fi-modal-content {
    padding-block-start: 0.75rem;
    row-gap: 1rem;
}

/* بند ۶ — the results open in the window's flow, in a box of their own that
   scrolls, so the buttons stay under them instead of under the list. */
.edu-add-modal .fi-select-input-ctn .fi-dropdown-panel {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    /* The panel's own ceiling (agency-filters.css), lower here: short screens
       give the list less, so the window still fits with its buttons. Only the
       list inside scrolls, as everywhere else in the panel. */
    --afs-panel-max: max(10rem, min(20rem, calc(100dvh - 25rem)));
    margin-block-start: 0.375rem;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}

.edu-add-modal .fi-modal-window {
    max-height: calc(100dvh - 2rem);
}

.edu-add-modal .fi-select-input-option {
    padding: 0;
    border-bottom: 1px solid rgb(127 127 127 / 0.22);
}

.edu-add-modal .fi-select-input-option:last-child {
    border-bottom: 0;
}

.edu-add-modal .fi-select-input-option:nth-child(even) {
    background: rgb(127 127 127 / 0.08);
}

.edu-add-modal .fi-select-input-option:hover,
.edu-add-modal .fi-select-input-option.fi-selected,
.edu-add-modal .fi-select-input-option:focus {
    background: rgb(245 158 11 / 0.16);
}

.edu-pick {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    height: 3.25rem;
    padding-inline: 0.625rem;
    min-width: 0;
}

.edu-add-modal .fi-select-input-option img.edu-pick__img,
.edu-pick__img {
    flex: 0 0 auto;
    width: 36px !important;
    height: 36px !important;
    max-width: none !important;
    border-radius: 9999px !important;
    object-fit: cover;
    background: #ececec;
}

.edu-pick__rule {
    flex: 0 0 1px;
    align-self: stretch;
    margin-block: 0.5rem;
    background: rgb(127 127 127 / 0.35);
}

.edu-pick__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25rem;
}

.edu-pick__name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
}

.edu-pick__code,
.edu-pick__note {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.75rem;
    opacity: 0.7;
}

.edu-pick__note {
    color: rgb(239 68 68);
    opacity: 1;
}

/* The chosen one in the field itself: the same face and name, a line high. */
.edu-add-modal .fi-select-input-value-label .edu-pick {
    height: auto;
    padding-inline: 0;
}

.edu-add-modal .fi-select-input-value-label img.edu-pick__img {
    width: 24px !important;
    height: 24px !important;
}

.edu-add-modal .fi-select-input-value-label .edu-pick__rule,
.edu-add-modal .fi-select-input-value-label .edu-pick__code,
.edu-add-modal .fi-select-input-value-label .edu-pick__note {
    display: none;
}
