/* „Poze din telefon” (js/views/subViews/ProductPhotosBulk.js): many product photos at once, from the phone.
   Phone first (one column, big tap targets); from 1024 px the photos and the cards stand in a grid. */

.product-photos-bulk-entry {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    vertical-align: middle;
}

.product-photos-bulk {
    max-width: 100%;
}

.product-photos-bulk-title {
    margin: 0 0 10px;
    font-size: 18px;
}

.product-photos-bulk .btn {
    min-height: 44px;
}

.product-photos-bulk .btn-sm {
    min-height: 36px;
}

/* the file input lives inside its label: the label is the button */
.product-photos-bulk-choose {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 8px;
    overflow: hidden;
}

.product-photos-bulk-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.product-photos-bulk-choose:focus-within {
    outline: 2px solid #337ab7;
    outline-offset: 2px;
}

.product-photos-bulk-to-follow,
.product-photos-bulk-to-pick,
.product-photos-bulk-send {
    display: block;
    width: 100%;
    margin-bottom: 8px;
}

.product-photos-bulk-files,
.product-photos-bulk-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 10px 0;
}

.product-photos-bulk-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 0;
}

.product-photos-bulk-file.is-error {
    border-color: #ebccd1;
    background: #fdf6f6;
}

.product-photos-bulk-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #f5f5f5;
    overflow: hidden;
    color: #999;
    font-size: 24px;
}

.product-photos-bulk-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-photos-bulk-file-info {
    flex: 1 1 auto;
    min-width: 0;
}

.product-photos-bulk-file-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-photos-bulk-remove {
    flex: 0 0 44px;
    width: 44px;
    font-size: 22px;
    line-height: 1;
    padding: 0;
}

.product-photos-bulk-estimate {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.product-photos-bulk-note,
.product-photos-bulk-another-note {
    margin-bottom: 8px;
    font-size: 16px; /* no zoom on iOS when it gets the focus */
}

.product-photos-bulk-follow-head {
    margin-bottom: 8px;
}

.product-photos-bulk-follow-title {
    margin: 0 0 6px;
}

.product-photos-bulk-card {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.product-photos-bulk-card-review,
.product-photos-bulk-card-unmatched {
    border-color: #f0ad4e;
}

.product-photos-bulk-card-failed {
    border-color: #ebccd1;
}

.product-photos-bulk-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.product-photos-bulk-product {
    font-weight: 600;
}

.product-photos-bulk-compare {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.product-photos-bulk-compare.is-review {
    grid-template-columns: 1fr 1fr;
}

.product-photos-bulk-compare figure {
    margin: 0;
    min-width: 0;
}

.product-photos-bulk-compare figcaption {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.product-photos-bulk-compare img,
.product-photos-bulk-noimg {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    background: #f5f5f5;
}

.product-photos-bulk-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 32px;
}

.product-photos-bulk-food,
.product-photos-bulk-unmatched,
.product-photos-bulk-reshoot {
    margin: 8px 0 4px;
}

.product-photos-bulk-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.product-photos-bulk-actions .btn {
    width: 100%;
}

.product-photos-bulk-picker {
    margin-top: 8px;
}

.product-photos-bulk-search {
    font-size: 16px;
    min-height: 44px;
    margin-bottom: 6px;
}

.product-photos-bulk-options {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.product-photos-bulk-options li + li {
    border-top: 1px solid #eee;
}

.product-photos-bulk-option {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    background: #fff;
    text-align: left;
}

.product-photos-bulk-option:hover,
.product-photos-bulk-option:focus {
    background: #f0f6fc;
}

.product-photos-bulk-option.is-suggested {
    background: #f4faff;
}

.product-photos-bulk-option-name {
    font-weight: 600;
}

.product-photos-bulk-option-category {
    color: #777;
    font-size: 12px;
}

.product-photos-bulk-picker-cancel {
    width: 100%;
}

.product-photos-bulk-msg {
    margin-top: 10px;
}

.product-photos-bulk-msg.is-error {
    color: #a94442;
}

.product-photos-bulk-msg.is-success {
    color: #3c763d;
}

.product-photos-bulk-msg.is-info {
    color: #31708f;
}

.product-photos-bulk-msg .btn {
    margin-left: 6px;
}

/* a photo whose send got no answer: not sendable until the open jobs show whether it started */
.product-photos-bulk-file.is-uncertain {
    border-color: #faebcc;
    background: #fffbf0;
}

.product-photos-bulk-file-uncertain {
    color: #8a6d3b;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.product-photos-bulk-file-help {
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.product-photos-bulk-file-error {
    overflow-wrap: anywhere;
}

/* ×, „Închide” or Escape while sending: the question inside the modal */
.product-photos-bulk-close-ask {
    margin: 10px 0;
}

.product-photos-bulk-close-ask p {
    margin: 0;
    overflow-wrap: anywhere;
}

.product-photos-bulk-off-banner {
    margin: 10px 0;
}

.product-photos-bulk-estimate-retry {
    width: 100%;
    margin-bottom: 8px;
}

@media (min-width: 1024px) {
    .product-photos-bulk-choose,
    .product-photos-bulk-to-follow,
    .product-photos-bulk-to-pick,
    .product-photos-bulk-send,
    .product-photos-bulk-estimate-retry,
    .product-photos-bulk-picker-cancel {
        display: inline-block;
        width: auto;
    }

    .product-photos-bulk-files {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-photos-bulk-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-photos-bulk-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .product-photos-bulk-actions .btn {
        width: auto;
    }
}
