.structforms-public-field--file {
    position: relative;
}

.structforms-file-upload {
    display: block;
    width: 100%;
}

.structforms-file-upload__input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.structforms-file-upload__dropzone {
    position: relative;
    display: block;
    width: 100%;
    min-height: 180px;
    padding: 28px 22px !important;
    border: 2px dashed #cbd5e1 !important;
    border-radius: 16px !important;
    background: #f8fafc !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}

.structforms-file-upload__dropzone:hover {
    border-color: #94a3b8 !important;
    background: #f1f5f9 !important;
}

.structforms-file-upload.is-dragover .structforms-file-upload__dropzone {
    border-color: #2271b1 !important;
    background: #eff6ff !important;
    box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.08) !important;
}

.structforms-file-upload.has-files .structforms-file-upload__dropzone {
    border-style: solid !important;
    border-color: #b6c2cf !important;
    background: #ffffff !important;
}

.structforms-file-upload__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    pointer-events: none;
}

.structforms-file-upload__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #dbe4ec;
    font-size: 22px;
    line-height: 1;
    color: #1f2933;
}

.structforms-file-upload__title {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 700;
    color: #1f2933;
}

.structforms-file-upload__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #52606d;
}

.structforms-file-upload__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #1f2933 !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    pointer-events: auto;
    transition: all 0.2s ease !important;
}

.structforms-file-upload__dropzone:hover .structforms-file-upload__button {
    border-color: #98a2b3 !important;
    background: #ffffff !important;
}

.structforms-file-upload__meta {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #667085;
}

.structforms-file-upload__list {
    display: none;
    margin-top: 14px;
    padding: 0;
    list-style: none;
}

.structforms-file-upload.has-files .structforms-file-upload__list {
    display: block;
}

.structforms-file-upload__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 12px !important;
    background: #ffffff !important;
}

.structforms-file-upload__item + .structforms-file-upload__item {
    margin-top: 10px;
}

.structforms-file-upload__file {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
}

.structforms-file-upload__file-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f2f4f7;
    color: #344054;
    font-size: 16px;
    line-height: 1;
}

.structforms-file-upload__file-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.structforms-file-upload__file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    color: #1f2933;
}

.structforms-file-upload__file-size {
    font-size: 12px;
    line-height: 1.4;
    color: #667085;
}

.structforms-file-upload__remove {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px !important;
    border: 1px solid #f1b3b0 !important;
    border-radius: 10px !important;
    background: #fff5f5 !important;
    color: #b42318 !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.structforms-file-upload__remove:hover {
    background: #ffe9e8 !important;
    border-color: #ea9085 !important;
    color: #912018 !important;
}

.structforms-public-field--has-error .structforms-file-upload__dropzone {
    border-color: #f04438 !important;
    background: #fff6f6 !important;
    box-shadow: none !important;
}

@media (max-width: 767px) {
    .structforms-file-upload__dropzone {
        min-height: 160px;
        padding: 22px 16px !important;
        border-radius: 14px !important;
    }

    .structforms-file-upload__item {
        align-items: flex-start;
        flex-direction: column;
    }

    .structforms-file-upload__remove {
        width: 100%;
    }

    .structforms-file-upload__file {
        width: 100%;
    }
}