#searchForm .photo-search-field {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
}

/* Beats the header's own input padding, leaving room for the image button over its right end. */
header #searchBar .photo-search-field input.searchFormInput {
    min-width: 0;
    padding-right: 184px;
}

/* Brand colors are variables with Ostbye fallbacks because victor.css loads before this file. */
#searchForm .photo-search-button,
#searchBar .photo-search-row {
    align-items: center;
    gap: 6px;
    color: var(--photo-search-ink, #1f2f58);
    font-family: "sofia-pro", sans-serif;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease;
}

#searchForm .photo-search-button .material-symbols-outlined,
#searchBar .photo-search-row .material-symbols-outlined {
    font-size: 20px;
    color: var(--photo-search-icon, #c98a12);
}

#searchForm .photo-search-button:hover,
#searchForm .photo-search-button:focus-visible,
#searchBar .photo-search-row:hover,
#searchBar .photo-search-row:focus-visible {
    background: #f2f4f7;
}

/* 2021.css gives every search input z-index: 1, which would paint it over the button. */
#searchForm .photo-search-button {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 5px;
    display: inline-flex;
    height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 100px;
    background: none;
    transform: translateY(-50%);
}

#searchForm .photo-search-button::before {
    content: "";
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: -5px;
    width: 1px;
    background: #d0d5dd;
}

#searchBar .photo-search-row {
    display: none;
    width: calc(100% - 40px);
    min-height: 48px;
    margin: 0 20px 12px;
    padding: 0 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    text-align: left;
}

#searchBar .photo-search-row .photo-search-row-chevron {
    margin-left: auto;
    color: var(--photo-search-ink, #1f2f58);
}

#search.photo-search-unseen {
    position: relative;
}

#search.photo-search-unseen::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #eca521;
}

@media (max-width: 575.98px) {
    #searchForm .photo-search-button {
        display: none;
    }

    header #searchBar .photo-search-field input.searchFormInput {
        padding-right: 28px;
    }

    #searchBar .photo-search-row {
        display: flex;
    }

    #searchBar.has-terms .photo-search-row {
        display: none;
    }
}

.photo-search-fineprint {
    flex: 1 1 200px;
    margin: 0;
    font-size: 13px;
    color: #667085;
}

.photo-search-dialog {
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    font-family: "sofia-pro", sans-serif;
    color: #222;
}

.photo-search-dialog::backdrop {
    background: rgba(0, 0, 0, .5);
}

.photo-search-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 8px 20px;
}

.photo-search-dialog-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.photo-search-close {
    display: inline-flex;
    padding: 6px;
    border: 0;
    background: none;
    color: #555;
    cursor: pointer;
}

.photo-search-crop {
    height: min(60vh, 480px);
    margin: 0 20px;
    background: #f2f2f2;
}

/* Cropper.js needs the image constrained to its box before it starts. */
.photo-search-crop img {
    display: block;
    max-width: 100%;
}

.photo-search-status {
    margin: 12px 20px 0;
    font-size: 14px;
    color: #555;
}

.photo-search-status:empty {
    margin-top: 0;
}

.photo-search-status.is-error {
    color: #b42318;
}

.photo-search-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px 8px;
    padding: 16px 20px 20px;
}

.photo-search-primary,
.photo-search-secondary {
    min-height: 40px;
    padding: 8px 18px;
    border: 2px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.photo-search-primary {
    border-color: var(--photo-search-accent, #eca726);
    background: var(--photo-search-accent, #eca726);
    color: var(--photo-search-on-accent, #1f2f58);
    font-weight: 600;
}

.photo-search-primary:disabled {
    opacity: .5;
    cursor: default;
}

.photo-search-dialog.is-busy .photo-search-crop {
    opacity: .6;
    pointer-events: none;
}

.photo-search-summary {
    display: flex;
    align-items: start;
    gap: 16px;
    margin-bottom: 16px;
}

.photo-search-photo {
    flex: none;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    background: #fff;
    margin-top: .3rem;
}

.photo-search-heading {
    min-width: 0;
}

.photo-search-heading h1 {
    margin: 0;
}

.photo-search-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    margin-top: 8px;
    font-size: 14px;
}

.photo-search-new,
.photo-search-send {
    padding: 0;
    border: 0;
    background: none;
    color: var(--photo-search-link, #3485ba);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.photo-search-new:hover,
.photo-search-send:hover {
    text-decoration: underline;
}

.photo-search-new {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.photo-search-new .material-symbols-outlined {
    font-size: 18px;
}

.photo-search-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.photo-search-rating-question {
    color: #667085;
}

.photo-search-choices {
    display: flex;
    gap: 6px;
}

.photo-search-choices button {
    height: 30px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 100px;
    background: #fff;
    color: #344054;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.photo-search-choices button:hover {
    border-color: #98a2b3;
}

.photo-search-choices button.is-selected {
    border-color: var(--photo-search-accent, #eca521);
    background: var(--photo-search-tint, #fff8e6);
    color: var(--photo-search-ink, #1f2f58);
    font-weight: 500;
}

.photo-search-note-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
    font-size: 14px;
}

.photo-search-note-row[hidden] {
    display: none;
}

.photo-search-note {
    flex: 0 1 360px;
    min-width: 0;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font: inherit;
    font-size: 14px;
}

.photo-search-saved {
    font-size: 13px;
    color: #667085;
}

.photo-search-offsite {
    margin-bottom: 20px;
}

.photo-search-offsite h2 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--photo-search-ink, #1f2f58);
}

.photo-search-offsite ul {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0 0 4px;
    overflow-x: auto;
    list-style: none;
}

.photo-search-offsite li {
    flex: none;
    width: 112px;
    font-size: 13px;
    line-height: 1.3;
}

.photo-search-offsite img {
    display: block;
    width: 112px;
    height: 112px;
    margin-bottom: 6px;
    object-fit: contain;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    background: #fff;
}

.photo-search-offsite strong {
    display: block;
    font-weight: 600;
    color: #222;
}

.photo-search-offsite span {
    display: -webkit-box;
    overflow: hidden;
    color: #667085;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.photo-search-log-photo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    background: #fff;
}

.photo-search-log-results {
    display: flex;
    gap: 6px;
}

.photo-search-log-results figure {
    margin: 0;
    width: 72px;
    font-size: 12px;
    text-align: center;
}

.photo-search-log-results img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
