/* Search entry. Follow the shop header's existing buttons and breakpoints. */
#ss-source-header .ss-search > button.ss-photo-open {
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    border: 0;
    border-left: 1px solid #ddd;
    border-radius: 0;
    background: #c1f600;
    color: #10192d;
    cursor: pointer;
}

#ss-source-header .ss-search > button.ss-photo-open:hover,
#ss-source-header .ss-search > button.ss-photo-open[aria-expanded="true"] {
    background: #a9dc00;
}

#ss-source-header .ss-photo-open svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

#ss-source-header .ss-photo-open:focus-visible {
    outline: 2px solid #0d182a;
    outline-offset: -3px;
}

#ss-source-header .ss-tools > button.ss-photo-mobile-open,
#ss-source-header .ss-mobile-controls > button.ss-photo-mobile-open {
    display: none;
}

.ss-photo {
    --ss-photo-ink: #10192d;
    --ss-photo-muted: #4e5b6b;
    --ss-photo-paper: #f7f4ee;
    --ss-photo-white: #fffefa;
    --ss-photo-lime: #c1f600;
    --ss-photo-line: #d8d5ce;
    box-sizing: border-box;
    width: 100%;
    border-block: 1px solid var(--ss-photo-line);
    background: var(--ss-photo-paper);
    color: var(--ss-photo-ink);
    font-family: inherit;
    scroll-margin-top: 16px;
}

.ss-photo *, .ss-photo *::before, .ss-photo *::after {
    box-sizing: border-box;
}

.ss-photo[hidden], .ss-photo [hidden], #ss-source-header .ss-photo-open[hidden] {
    display: none !important;
}

.ss-photo-inner {
    width: 100%;
    max-width: 1380px;
    margin-inline: auto;
    padding: clamp(24px, 4vw, 54px) clamp(16px, 4vw, 54px);
}

.ss-photo-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: clamp(20px, 3vw, 36px);
}

.ss-photo .ss-photo-head h2 {
    margin: 0;
    color: var(--ss-photo-ink);
    font-family: inherit;
    font-size: clamp(26px, 4.25vw, 55px);
    font-weight: 860;
    line-height: 1.03;
    letter-spacing: -.046em;
    text-transform: uppercase;
}

.ss-photo .ss-photo-head h2::after {
    content: "";
    display: block;
    width: clamp(41px, 8vw, 105px);
    height: 5px;
    margin-top: 12px;
    background: var(--ss-photo-lime);
    transform: skewX(-24deg);
    transform-origin: left center;
}

.ss-photo .ss-photo-close {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid var(--ss-photo-line);
    border-radius: 50%;
    background: var(--ss-photo-white);
    color: var(--ss-photo-ink);
    font: 500 25px/1 system-ui, sans-serif;
    cursor: pointer;
}

.ss-photo .ss-photo-close:hover {
    border-color: var(--ss-photo-ink);
}

.ss-photo-grid {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
    gap: clamp(15px, 2.6vw, 32px);
}

.ss-photo-input, .ss-photo-output {
    min-width: 0;
}

.ss-photo-input {
    padding: clamp(12px, 1.6vw, 20px);
    border-radius: 13px;
    background: var(--ss-photo-ink);
    color: var(--ss-photo-white);
}

.ss-photo .ss-photo-drop {
    display: flex;
    width: 100%;
    min-height: 145px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 19px 12px;
    border: 1px dashed #d8e0e9;
    border-radius: 8px;
    background: #1b263c;
    color: var(--ss-photo-white);
    font: inherit;
    font-weight: 750;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
}

.ss-photo .ss-photo-drop:focus-visible,
.ss-photo .ss-photo-drop:hover,
.ss-photo .ss-photo-drop.ss-photo-dragover {
    border-color: var(--ss-photo-lime);
    background: #233044;
}

.ss-photo-button-icon {
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ss-photo-drop > svg, .ss-photo-drop .ss-photo-button-icon {
    width: 28px;
    height: 28px;
    color: var(--ss-photo-lime);
}

.ss-photo-drop > span {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 8px 13px;
    border-radius: 7px;
    background: var(--ss-photo-lime);
    color: var(--ss-photo-ink);
}

.ss-photo .ss-photo-hint {
    margin: 10px 0 0;
    color: var(--ss-photo-muted);
    font-size: 13px;
    line-height: 1.45;
}

.ss-photo .ss-photo-input .ss-photo-hint {
    color: #cbd3df;
}

.ss-photo-file {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.ss-photo-work {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.ss-photo-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #1b263c;
}

.ss-photo-preview {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    touch-action: pan-y;
}

.ss-photo-image.ss-photo-zoomed .ss-photo-preview {
    cursor: move;
    touch-action: none;
}

.ss-photo-image::before {
    position: absolute;
    z-index: 1;
    inset: 7px;
    background:
        linear-gradient(var(--ss-photo-lime), var(--ss-photo-lime)) left top / 15px 2px,
        linear-gradient(var(--ss-photo-lime), var(--ss-photo-lime)) left top / 2px 15px,
        linear-gradient(var(--ss-photo-lime), var(--ss-photo-lime)) right top / 15px 2px,
        linear-gradient(var(--ss-photo-lime), var(--ss-photo-lime)) right top / 2px 15px,
        linear-gradient(var(--ss-photo-lime), var(--ss-photo-lime)) left bottom / 15px 2px,
        linear-gradient(var(--ss-photo-lime), var(--ss-photo-lime)) left bottom / 2px 15px,
        linear-gradient(var(--ss-photo-lime), var(--ss-photo-lime)) right bottom / 15px 2px,
        linear-gradient(var(--ss-photo-lime), var(--ss-photo-lime)) right bottom / 2px 15px;
    background-repeat: no-repeat;
    content: "";
    pointer-events: none;
}

.ss-photo-image.ss-photo-busy::after,
.ss-photo-busy .ss-photo-image::after {
    position: absolute;
    z-index: 2;
    top: 10%;
    inset-inline: 0;
    height: 2px;
    background: var(--ss-photo-lime);
    box-shadow: 0 0 14px var(--ss-photo-lime);
    animation: sspj-photo-scan 1.25s ease-in-out infinite alternate;
    content: "";
    pointer-events: none;
}

@keyframes sspj-photo-scan {
    to { top: 90%; }
}

.ss-photo-crop {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 13px;
    font-weight: 650;
}

.ss-photo-crop label { flex: 0 0 auto; }

.ss-photo-range {
    flex: 1 1 90px;
    min-width: 65px;
    max-width: 100%;
    accent-color: var(--ss-photo-lime);
    cursor: pointer;
}

.ss-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ss-photo .ss-photo-primary,
.ss-photo .ss-photo-secondary,
.ss-photo .ss-photo-clear,
.ss-photo .ss-photo-card-action {
    display: inline-flex;
    min-height: 43px;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: 14px;
    font-weight: 760;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
}

.ss-photo .ss-photo-primary {
    flex: 1 1 auto;
    background: var(--ss-photo-lime);
    color: var(--ss-photo-ink);
}

.ss-photo .ss-photo-primary:hover { background: #a9dc00; }

.ss-photo .ss-photo-secondary {
    flex: 1 1 auto;
    border-color: #a6b2c4;
    background: transparent;
    color: var(--ss-photo-white);
}

.ss-photo .ss-photo-secondary:hover { background: #28344a; }

.ss-photo .ss-photo-clear {
    min-height: 34px;
    padding: 5px 7px;
    background: transparent;
    color: inherit;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ss-photo button:disabled, .ss-photo input:disabled {
    opacity: .62;
    cursor: default;
}

.ss-photo .ss-photo-output h3 {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 0 10px;
    color: var(--ss-photo-ink);
    font-family: inherit;
    font-size: clamp(19px, 2.5vw, 30px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.ss-photo .ss-photo-output h3::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ss-photo-ink);
}

.ss-photo .ss-photo-status {
    margin: 0 0 12px;
    color: var(--ss-photo-muted);
    font-size: 14px;
    line-height: 1.45;
}

.ss-photo .ss-photo-status:empty { margin: 0; }

.ss-photo-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 1.4vw, 16px);
}

.ss-photo .ss-photo-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    min-width: 0;
    padding: clamp(5px, .7vw, 9px);
    border: 2px solid transparent;
    border-radius: 11px;
    background: var(--ss-photo-white);
    color: var(--ss-photo-ink);
    line-height: 1.3;
    text-decoration: none;
    transition: border-color .17s ease, background-color .17s ease;
}

.ss-photo .ss-photo-card:first-child { border-color: #a5d500; }

.ss-photo .ss-photo-card:hover { border-color: var(--ss-photo-ink); }

.ss-photo .ss-photo-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 6px;
    background: #edede9;
}

.ss-photo .ss-photo-card-title {
    display: block;
    padding: 0 2px;
    font-size: clamp(13px, 1.7vw, 17px);
    font-weight: 730;
    overflow-wrap: anywhere;
}

.ss-photo .ss-photo-card-action {
    width: 100%;
    border-color: var(--ss-photo-ink);
    color: var(--ss-photo-ink);
}

.ss-photo .ss-photo-card:first-child .ss-photo-card-action {
    border-color: var(--ss-photo-lime);
    background: var(--ss-photo-lime);
}

.ss-photo :is(button, a, input, canvas):focus-visible {
    outline: 2px solid #31549b;
    outline-offset: 2px;
}

.ss-photo .ss-photo-input :is(button, input, canvas):focus-visible {
    outline-color: var(--ss-photo-lime);
}

.ss-photo .ss-photo-preview:focus-visible { outline-offset: -3px; }

@media (max-width: 1024px) {
    #ss-source-header .ss-tools > button.ss-photo-mobile-open,
    #ss-source-header .ss-mobile-controls > button.ss-photo-mobile-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        order: 2;
        box-sizing: border-box;
        width: 29px;
        min-width: 29px;
        min-height: 40px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 4px;
        background: transparent;
        color: #10192d;
        cursor: pointer;
    }

    #ss-source-header .ss-tools > button.ss-photo-mobile-open:hover,
    #ss-source-header .ss-tools > button.ss-photo-mobile-open[aria-expanded="true"],
    #ss-source-header .ss-mobile-controls > button.ss-photo-mobile-open[aria-expanded="true"] {
        background: #e5f5bd;
    }
}

@media (max-width: 730px) {
    .ss-photo-grid { grid-template-columns: minmax(0, 1fr); }

    .ss-photo-input { padding: 12px; }

    .ss-photo-image { max-width: 430px; margin-inline: auto; }

    .ss-photo .ss-photo-card-action { font-size: 13px; padding-inline: 4px; }
}

@media (max-width: 380px) {
    #ss-source-header .ss-tools:has(> button.ss-photo-mobile-open) { gap: 4px; }

    #ss-source-header .ss-top:has(.ss-photo-mobile-open) > .ss-brand { max-width: 40%; }

    #ss-source-header .ss-tools > button.ss-photo-mobile-open { width: 24px; min-width: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .ss-photo .ss-photo-card { transition: none; }

    .ss-photo-image.ss-photo-busy::after, .ss-photo-busy .ss-photo-image::after { animation: none; }
}
