/* Failed / uploading photo tiles for /publicar and seller create-edit. */

.kl-photo-tile {
    position: relative;
    width: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--paper, #f6f1ea);
}

.kl-photo-tile img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.kl-photo-tile--uploading {
    overflow: hidden;
}

.kl-photo-tile__uploading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
}

.kl-photo-tile__progress {
    width: 80%;
    height: 6px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.kl-photo-tile__progress-bar {
    width: 40%;
    height: 100%;
    border-radius: 99px;
    background: var(--red-accent, #c4392c);
    animation: kl-photo-progress 1.1s ease-in-out infinite;
}

@keyframes kl-photo-progress {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

.kl-photo-tile__status {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: #1a1a1a;
}

.kl-photo-tile--failed,
.publicar__thumb.kl-photo-tile--failed,
.photo-thumb.kl-photo-tile--failed {
    width: 148px;
    height: auto;
    overflow: visible;
    aspect-ratio: auto;
    border: 2px solid #ED0000;
    background: #fff;
}

.kl-photo-tile--failed img {
    height: 96px;
}

.kl-photo-tile__failed {
    padding: 6px 6px 8px;
}

.kl-photo-tile__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.kl-photo-tile__retry,
.kl-photo-tile__remove,
.kl-photo-tile__retry-all,
.kl-photo-publish-note__link {
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    padding: 8px 10px;
    border-radius: 8px;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.kl-photo-tile__retry,
.kl-photo-tile__remove {
    width: 100%;
}

.kl-photo-tile__retry,
.kl-photo-tile__retry-all {
    border: none;
    background: #1a1a1a;
    color: #fff;
}

.kl-photo-tile__remove {
    border: 1px solid #ED0000;
    background: #fff;
    color: #ED0000;
}

.kl-photo-tile__retry:focus-visible,
.kl-photo-tile__remove:focus-visible,
.kl-photo-tile__retry-all:focus-visible,
.kl-photo-publish-note__link:focus-visible {
    outline: 3px solid var(--red-accent, #c4392c);
    outline-offset: 2px;
}

.kl-photo-tile__x {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.kl-photo-tile__x:disabled {
    opacity: .4;
    cursor: default;
}

.kl-photo-cap {
    margin: 0 0 8px;
    font-size: 0.875rem;
    color: var(--gray-600, #666);
}

.kl-photo-fail-summary {
    margin: 0 0 10px;
    font-size: 0.875rem;
    color: #1a1a1a;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.kl-photo-publish-note {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: var(--gray-600, #666);
}

.kl-photo-publish-note__link {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--red-accent, #c4392c);
    text-decoration: underline;
    padding: 0 4px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .kl-photo-tile {
        width: 96px;
    }

    .kl-photo-tile img {
        height: 96px;
    }

    .kl-photo-tile--failed,
    .publicar__thumb.kl-photo-tile--failed,
    .photo-thumb.kl-photo-tile--failed {
        width: 148px;
        height: auto;
        overflow: visible;
        aspect-ratio: auto;
    }

    .kl-photo-tile--failed img {
        height: 96px;
    }

    .kl-photo-tile__retry,
    .kl-photo-tile__remove,
    .kl-photo-tile__retry-all,
    .kl-photo-publish-note__link {
        min-height: 44px;
        min-width: 44px;
    }
}
