/* Shared upload surface. File reading, processing and tier checks belong to each tool. */
.fx-upload {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    min-width: 0;
    min-height: 310px;
    margin: 0;
    padding: 40px 24px;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid var(--fx-border-strong);
    border-radius: var(--fx-radius-lg);
    background: var(--fx-bg-deep);
    color: var(--fx-text-main);
    font-family: var(--fx-font-main);
    text-align: center;
    cursor: pointer;
    transition: border-color .22s ease, box-shadow .22s ease;
}
.fx-upload::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 110%, rgba(var(--fx-ac1-rgb),.16), transparent 70%);
    opacity: .65;
    transition: opacity .22s ease;
}
.fx-upload > :not(input) { pointer-events: none; }
/* A real, focusable file input covers the surface: no synthetic picker or extra click. */
.fx-upload input[type="file"] {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}
.fx-upload .fx-upload-icon {
    display: block;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    margin: 0 0 18px;
    background: var(--fx-ac1);
    -webkit-mask: var(--fx-upload-icon) center / contain no-repeat;
    mask: var(--fx-upload-icon) center / contain no-repeat;
    transition: transform .22s ease;
}
.fx-upload .fx-upload-title {
    display: block;
    margin: 0 0 9px;
    font-size: clamp(19px,2vw,23px);
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: -.4px;
}
.fx-upload .fx-upload-copy {
    display: block;
    max-width: 430px;
    margin: 0;
    color: var(--fx-text-muted);
    font-size: 13px;
    line-height: 1.65;
}
.fx-upload .fx-upload-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    margin: 22px 0 15px;
    padding: 10px 22px;
    box-sizing: border-box;
    border: 1px solid rgba(var(--fx-ac1-rgb),.4);
    border-radius: var(--fx-radius-pill);
    background: var(--fx-ac1-soft);
    color: var(--fx-text-main);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
    transition: border-color .22s ease, background .22s ease;
}
.fx-upload .fx-upload-action svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--fx-ac1); }
.fx-upload .fx-upload-meta { margin: 0; color: var(--fx-text-dim); font-size: 11px; line-height: 1.7; }
.fx-upload .fx-upload-paste { display: block; margin-top: 4px; }
.fx-upload:is(:focus-within,.drag) { border-color: var(--fx-ac1); box-shadow: 0 0 0 3px var(--fx-ac1-soft); }
.fx-upload:is(:focus-within,.drag)::before { opacity: 1; }
.fx-upload:is(:focus-within,.drag) .fx-upload-action { border-color: var(--fx-ac1); background: rgba(var(--fx-ac1-rgb),.2); }
.fx-upload.drag .fx-upload-icon { transform: translateY(-4px); }
@media (hover:hover) {
    .fx-upload:hover { border-color: var(--fx-ac1); }
    .fx-upload:hover::before { opacity: 1; }
    .fx-upload:hover .fx-upload-action { border-color: var(--fx-ac1); background: rgba(var(--fx-ac1-rgb),.2); }
}
@media (max-width:600px) {
    .fx-upload { min-height: 290px; padding: 30px 18px; }
    .fx-upload .fx-upload-paste { display: none; }
}
@media (prefers-reduced-motion:reduce) {
    .fx-upload, .fx-upload::before, .fx-upload .fx-upload-icon, .fx-upload .fx-upload-action { transition: none; }
    .fx-upload.drag .fx-upload-icon { transform: none; }
}
