/* «جستجوی عکس با لینک» (تسک ۱۴۰۵/۰۷/۲۱/۰۴).

   The box follows the code box of «بارگذاری عکس از طریق کد گالری»: the field
   takes about half of it on a desktop with «جستجو» beside it, and on a narrow
   screen the button drops under the field. Every rule is scoped to this page's
   own classes; the colours are the panel's. */

.fi-photo-link-search {
    display: grid;
    gap: 1rem;
}

.fi-photo-link-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
}

.fi-photo-link-field {
    flex: 0 1 50%;
    min-width: 0;
}

.fi-photo-link-label {
    display: inline-flex;
    margin-block-end: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Pushed down past the field's own label, so the button lines up on the input. */
.fi-photo-link-submit {
    flex: 0 0 auto;
    padding-block-start: 1.75rem;
}

.fi-photo-link-help {
    margin-block-start: 0.375rem;
    font-size: 0.8125rem;
    opacity: 0.7;
}

.fi-photo-link-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-block-start: 0.75rem;
    color: #f87171;
    font-size: 0.875rem;
    font-weight: 500;
}

.fi-photo-link-error svg {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
}

/* ── The answer ─────────────────────────────────────────────────────────── */

.fi-photo-link-result {
    display: grid;
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    padding: 1.25rem;
    border-radius: 0.75rem;
    background: rgb(24 24 27);
    border: 1px solid rgb(255 255 255 / 0.1);
    color: rgb(244 244 245);
}

.fi-photo-link-picture {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
    border-radius: 0.5rem;
    background: rgb(9 9 11);
    overflow: hidden;
}

/* The photograph's own proportions, whatever they are: sized by width, never
   stretched to a box. */
.fi-photo-link-picture img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 26rem;
    object-fit: contain;
}

.fi-photo-link-missing {
    padding: 1rem;
    font-size: 0.875rem;
    opacity: 0.7;
    text-align: center;
}

.fi-photo-link-details {
    display: grid;
    gap: 1.25rem;
    min-width: 0;
}

.fi-photo-link-facts {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.fi-photo-link-fact {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding-block-end: 0.75rem;
    border-block-end: 1px solid rgb(255 255 255 / 0.08);
}

.fi-photo-link-fact:last-child {
    border-block-end: 0;
    padding-block-end: 0;
}

.fi-photo-link-fact dt {
    font-size: 0.8125rem;
    opacity: 0.65;
}

.fi-photo-link-fact dd {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.fi-photo-link-number {
    color: #fbbf24;
    font-size: 1.0625rem;
}

.fi-photo-link-gallery {
    color: #fbbf24;
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.fi-photo-link-gallery:hover {
    color: #fcd34d;
}

.fi-photo-link-photographer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fi-photo-link-avatar {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    border-radius: 9999px;
    object-fit: cover;
}

.fi-photo-link-none {
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.7;
}

@media (max-width: 47.99em) {
    .fi-photo-link-field,
    .fi-photo-link-submit {
        flex: 1 0 100%;
    }

    .fi-photo-link-submit {
        padding-block-start: 0;
    }

    .fi-photo-link-result {
        grid-template-columns: minmax(0, 1fr);
        padding: 1rem;
    }

    .fi-photo-link-fact {
        grid-template-columns: 5.5rem minmax(0, 1fr);
    }

    .fi-photo-link-actions .fi-btn {
        width: 100%;
        justify-content: center;
    }
}
