/* Review-form photo picker, enhanced by assets/js/forms.js initPhotoUpload().
   Tokens mirror .form-control (global.css) so it sits in the form like any
   other field, and theme-switch automatically via the CSS variables. */
.photo-upload {
    margin-top: 5px;
}
.photo-upload__trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-height: 158px;
    padding: 26px 18px;
    border-radius: 14px;
    border: 1.5px dashed var(--color-border-secondary);
    background: var(--color-bg-third);
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.photo-upload__trigger:hover,
.photo-upload__trigger.is-dragover {
    border-color: var(--color-text-third);
}
/* Solid border while a file is dragged over — a clear drop affordance. */
.photo-upload__trigger.is-dragover {
    border-style: solid;
}
/* Let drag events target the dropzone itself, not its inner children
   (otherwise moving over them fires dragenter/dragleave and the state flickers). */
.photo-upload__trigger > * {
    pointer-events: none;
}
/* Icon in a soft round badge so the empty zone reads as an upload affordance. */
.photo-upload__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    color: var(--color-text-third);
}
.photo-upload__icon .icon {
    font-size: 26px;
    line-height: 1;
}
.photo-upload__title {
    color: var(--color-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
}
.photo-upload__sub {
    color: var(--color-text-link);
    font-size: 13px;
    line-height: 18px;
}
.photo-upload__formats {
    margin-top: 4px;
    color: var(--color-text-link);
    font-size: 12px;
    line-height: 16px;
    opacity: 0.8;
}
.photo-upload__previews {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
/* No top gap while nothing is chosen (the list is empty). */
.photo-upload__previews:empty {
    margin: 0;
}
.photo-upload__item {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.photo-upload__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-upload__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(16, 12, 12, 0.6);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}
.photo-upload__remove .icon {
    font-size: 14px;
    line-height: 1;
}
.photo-upload__remove:hover {
    background: rgba(16, 12, 12, 0.8);
}

@media (max-width: 768px) {
    .photo-upload__trigger {
        min-height: 140px;
        padding: 22px 16px;
    }
    .photo-upload__icon {
        width: 46px;
        height: 46px;
        margin-bottom: 8px;
    }
    .photo-upload__icon .icon {
        font-size: 22px;
    }
    .photo-upload__item {
        width: 72px;
        height: 72px;
    }
}
