/* =====================================================
   UFZ Upload — image dropzone with preview
===================================================== */

.custom-upload-wrap {
    border: 1.5px dashed rgba(183, 215, 27, .45);
    border-radius: 14px;
    background: #161616;
    padding: 18px;
    margin: 0;
    transition: .18s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-upload-wrap:hover {
    border-color: var(--ufz-accent, #b7d71b);
    background: #181818;
}

.custom-upload-wrap.has-image {
    border-style: solid;
    border-color: var(--ufz-accent, #b7d71b);
    background: rgba(183, 215, 27, .05);
}

.custom-upload-wrap input[type="file"],
input#custom_image {
    display: none !important;
}

.upload-top {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.upload-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(183, 215, 27, .12);
    border: 1px solid rgba(183, 215, 27, .35);
    font-size: 20px;
}

.upload-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.upload-label {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

#file-name {
    font-size: 13px;
    color: #9a9a9a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-upload-wrap small {
    font-size: 11px;
    color: #6c6c6c;
    margin: 0;
}

.upload-preview {
    display: none;
    width: 100%;
    max-height: 220px;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
}

.custom-upload-wrap.has-image .upload-preview {
    display: block;
}

.upload-preview img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    display: block;
}

/* When upload sits inside its own cfg section, keep spacing tight */
.ufz-cfg-section .custom-upload-wrap {
    border: 1.5px dashed rgba(183, 215, 27, .45);
}

/* Legacy fallbacks (in case summary renders without new wrapper) */
form.cart {
    display: flex;
    flex-direction: column;
}

.wapf-product-totals {
    order: 2;
}
