/* Graphical file upload dropzone */

.fu {
    position: relative;
    display: block;
    border: 1.5px dashed #d5e2c8;
    border-radius: 16px;
    background:
        radial-gradient(circle at 12% 20%, rgba(127, 201, 69, .1), transparent 45%),
        linear-gradient(180deg, #fbfef8, #f7faf4);
    padding: 1rem 1.05rem;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
    overflow: hidden;
}

.fu:hover,
.fu.is-drag {
    border-color: #7fc945;
    background:
        radial-gradient(circle at 12% 20%, rgba(127, 201, 69, .16), transparent 45%),
        linear-gradient(180deg, #f5faee, #eef8e4);
    box-shadow: 0 10px 24px rgba(127, 201, 69, .12);
    transform: translateY(-1px);
}

.fu.has-file {
    border-style: solid;
    border-color: #d8efb8;
    background: #fff;
}

.fu input[type="file"] {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    z-index: 2;
}

.fu-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .85rem;
    align-items: center;
    pointer-events: none;
}

.fu-ico {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(180deg, #8fd84f, #62a832);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 16px rgba(127, 201, 69, .28);
    flex: 0 0 auto;
}

.fu-ico svg {
    width: 22px;
    height: 22px;
}

.fu-ico.file {
    background: linear-gradient(180deg, #5ec2ff, #2f80ed);
    box-shadow: 0 8px 16px rgba(47, 128, 237, .22);
}

.fu-copy .title {
    margin: 0;
    font-size: .92rem;
    font-weight: 800;
    color: #222;
    line-height: 1.35;
}

.fu-copy .hint {
    margin: .2rem 0 0;
    color: #8a8a8a;
    font-size: .76rem;
    font-weight: 600;
}

.fu-copy .name {
    margin: .35rem 0 0;
    color: #3f7a18;
    font-size: .8rem;
    font-weight: 800;
    direction: ltr;
    text-align: right;
    word-break: break-all;
}

.fu-preview {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #d8efb8;
    background: #f3f5f6;
    display: none;
}

.fu.has-file .fu-preview.is-on {
    display: block;
}

.fu-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .28rem .7rem;
    background: #fff;
    border: 1px solid #d8efb8;
    color: #3f7a18;
    font-size: .74rem;
    font-weight: 800;
    white-space: nowrap;
}

.fu.has-file .fu-badge {
    background: #f3faeb;
}

.fu.has-error {
    border-color: #fda4af;
    border-style: solid;
    background:
        radial-gradient(circle at 12% 20%, rgba(244, 63, 94, .08), transparent 45%),
        linear-gradient(180deg, #fff8f8, #fff5f5);
}

.fu-error {
    display: block;
    margin-top: .35rem;
    color: #be123c;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.45;
}

.fu-clear {
    position: absolute;
    top: .55rem;
    left: .55rem;
    z-index: 3;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 9px;
    background: #fff1f2;
    color: #e11d48;
    cursor: pointer;
    display: none;
    place-items: center;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(225, 29, 72, .12);
}

.fu.has-file .fu-clear {
    display: grid;
}

@media (max-width: 560px) {
    .fu-inner {
        grid-template-columns: auto 1fr;
    }
    .fu-badge { display: none; }
}
