body.rom-wdt-upload-open {
    overflow: hidden;
}

.rom-wdt-upload {
    align-items: center;
    background: rgba(17, 24, 39, 0.58);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 999999;
}

.rom-wdt-upload.is-open {
    display: flex;
}

.rom-wdt-upload__panel {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
    color: #1f2937;
    max-width: 560px;
    padding: 24px;
    position: relative;
    width: min(560px, 100%);
}

.rom-wdt-upload__close {
    align-items: center;
    background: transparent;
    border: 0;
    color: #6b7280;
    display: flex;
    font-size: 30px;
    height: 38px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 14px;
    top: 12px;
    width: 38px;
}

.rom-wdt-upload__header {
    align-items: center;
    display: flex;
    gap: 14px;
    padding-right: 36px;
}

.rom-wdt-upload__icon {
    align-items: center;
    background: #0f766e;
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    flex: 0 0 44px;
    font-size: 26px;
    font-weight: 700;
    height: 44px;
    justify-content: center;
    line-height: 1;
}

.rom-wdt-upload h2 {
    color: #111827;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 4px;
}

.rom-wdt-upload p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
}

.rom-wdt-upload__dropzone {
    align-items: center;
    background: #f8fafc;
    border: 2px dashed #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    margin-top: 22px;
    min-height: 180px;
    outline: none;
    padding: 24px;
    text-align: center;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.rom-wdt-upload__dropzone:focus,
.rom-wdt-upload__dropzone:hover,
.rom-wdt-upload__dropzone.is-dragging {
    background: #ecfeff;
    border-color: #0f766e;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.rom-wdt-upload__input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.rom-wdt-upload__drop-title {
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

.rom-wdt-upload__hint,
.rom-wdt-upload__file-size,
.rom-wdt-upload__message {
    color: #6b7280;
    font-size: 13px;
}

.rom-wdt-upload__file {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 14px;
    padding: 12px 14px;
}

.rom-wdt-upload__file-name {
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.rom-wdt-upload__progress {
    background: #e5e7eb;
    border-radius: 999px;
    height: 8px;
    margin-top: 14px;
    overflow: hidden;
}

.rom-wdt-upload__progress span {
    background: #0f766e;
    display: block;
    height: 100%;
    transition: width 0.12s ease;
    width: 0;
}

.rom-wdt-upload__message {
    min-height: 20px;
    margin-top: 12px;
}

.rom-wdt-upload__message.is-error {
    color: #b91c1c;
}

.rom-wdt-upload__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.rom-wdt-upload__primary,
.rom-wdt-upload__secondary {
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    min-height: 40px;
    padding: 9px 15px;
}

.rom-wdt-upload__primary {
    background: #0f766e;
    color: #ffffff;
}

.rom-wdt-upload__primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.rom-wdt-upload__secondary {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

@media (max-width: 600px) {
    .rom-wdt-upload {
        padding: 14px;
    }

    .rom-wdt-upload__panel {
        padding: 20px;
    }

    .rom-wdt-upload__actions {
        flex-direction: column-reverse;
    }

    .rom-wdt-upload__primary,
    .rom-wdt-upload__secondary {
        width: 100%;
    }
}
